Created
February 15, 2018 07:55
-
-
Save yemM/9f232e2483b67965e9a0d55158e02ab2 to your computer and use it in GitHub Desktop.
Xmodmap to get keyboard act as on Mac OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
! based on: http://www.emacswiki.org/emacs/SwapControlAltAndCapsLock#toc8 | |
! | |
! exec xmodmap .Xmodmap to get it working | |
!---------------------------------------------------------- | |
! Swap Control and Alt keys, both sides | |
!---------------------------------------------------------- | |
! First clear all modifiers & control | |
clear control | |
clear mod1 | |
clear mod4 | |
! Swap Control_L and Alt_L | |
keycode 64 = Control_L | |
keycode 37 = Control_L | |
! Alt_L Meta_L | |
! Menu becomes Alt_R Meta_R (AltGr) | |
keycode 133 = Alt_L | |
! Define Control_R and Alt_R similar to Control_L and Alt_L | |
! keycode 108 = Control_R | |
! keycode 107 = Alt_R | |
! keycode 105 = Meta_L | |
! We need to set keycodes first, as some programs (emacs!) read | |
! the key names and seem to ignore what's below. | |
add mod1 = Alt_L Meta_L Meta_R | |
add mod4 = Super_L Super_R | |
add control = Control_L Control_R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment