Skip to content

Instantly share code, notes, and snippets.

@cyrillbolliger
Last active July 6, 2019 19:39
Show Gist options
  • Save cyrillbolliger/273739d049ccd0fc2f73646bc38a96d1 to your computer and use it in GitHub Desktop.
Save cyrillbolliger/273739d049ccd0fc2f73646bc38a96d1 to your computer and use it in GitHub Desktop.
Apple Keymappings for Ubuntu 18.04

Apple Keymappings for Ubuntu 18.04

Customize the keymappgins for Ubuntu 18.04 (GNOME), to get more apple like shortcuts using xmodmap:

  • switch the left control and command keys
  • make the right command key behave like a control key
  • use the left and the right alt keys for special symbols (level 3 shift)

Create a new file called .xmodmap in your home directory with the following keymappings:

clear control
clear mod4
clear mod1

keycode 105 =
keycode 206 =

keycode 133 = Control_L NoSymbol Control_L
keycode 134 = Control_R NoSymbol Control_R
keycode 37 = Super_L NoSymbol Super_L
keycode 64 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift

add control = Control_L
add control = Control_R
add mod4 = Super_L

Load the keymappings automatically on login: Create the file ~/.config/autostart/xmodmap.desktop and add the following autostart instructions:

[Desktop Entry]
Type=Application
Exec=xmodmap /home/<YOURUSERNAME>/.xmodmap
Hidden=false
X-GNOME-Autostart-enabled=true
Name=xmodmap
Comment=Apple-ish Keymappings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment