Skip to content

Instantly share code, notes, and snippets.

@korya
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korya/ebb4da00b837e6a2bd5a to your computer and use it in GitHub Desktop.
Save korya/ebb4da00b837e6a2bd5a to your computer and use it in GitHub Desktop.
Back to Ubuntun From MacOS
  1. In order to make our life easier: set Caps Lock key to behave as Escape.
  2. In order to keep Emacs-style shortcuts (Ctrl-O, Ctrl-W, etc.): keep left Ctrl key behaviour as is.
  3. In order to bring MacOS-style shortcuts (Cmnd-C, Cmnd-V, etc.): set left Alt key to behave as Ctrl_L.
  4. In order to have access to Alt_L button: set left Super key to behave as Alt_L.

The .Xmodmap file:

! Set 
remove Lock = Caps_Lock
keysym Caps_Lock = Escape

! First clear all modifiers & control
clear control
clear mod1
clear mod4

! make Alt_L to act as Contol_L
keycode  64 = Control_L NoSymbol Control_L
! make Super_L to act as Alt_L
keycode 133 = Alt_L Meta_L Alt_L 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 Alt_R 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