Skip to content

Instantly share code, notes, and snippets.

@mtigdemir
Forked from digiter/FixCommandForMacKeyboard.md
Last active November 10, 2019 20:15
Show Gist options
  • Save mtigdemir/b582ee061509b71fa241864ead2a9d9e to your computer and use it in GitHub Desktop.
Save mtigdemir/b582ee061509b71fa241864ead2a9d9e 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