Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save slopeofhope81/3165f5a5cf06ae326094e6c397d60065 to your computer and use it in GitHub Desktop.
Save slopeofhope81/3165f5a5cf06ae326094e6c397d60065 to your computer and use it in GitHub Desktop.
Map Command Key to Control For ubuntu + mac keyboard

For each machine running xmodmap will give you the mapping and keycode, take a look first then write the script. I use ubuntu and mac keyboard. The below maps both left and right control and super.

Create an .Xmodmap file in your Linux home directory, with the following contents, then execute xmodmap .Xmodmap

clear control
clear mod4

keycode 37 = Super_L
keycode 105 = Super_R
keycode 133 = Control_L
keycode 134 = Control_R 

add control = Control_L
add control = Control_R
add mod4 = Super_L
add mod4 = Super_R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment