Swapping Apple and Ctrl Keys: Difference between revisions
Sebastians (talk | contribs) (Created page with "<source lang="bash"> cat > ~/.xmodmaprc ! Erase existing bindings clear Control clear Mod4 ! Map key 37 (left ctrl) to Super_L (i.e. 'cmd') keycode 37 = Super_L ! Map key 133 (l...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
In the terminal enter: | |||
<source lang="bash"> | <source lang="bash"> | ||
cat > ~/.xmodmaprc | cat > ~/.xmodmaprc | ||
Line 6: | Line 7: | ||
! Map key 37 (left ctrl) to Super_L (i.e. 'cmd') | ! Map key 37 (left ctrl) to Super_L (i.e. 'cmd') | ||
keycode 37 = Super_L | keycode 37 = Super_L | ||
! Map key 133 (left cmd) to Control_L (i.e. 'ctrl) | ! Map key 133 (left cmd) to Control_L (i.e. 'ctrl') | ||
keycode 133 = Control_L | keycode 133 = Control_L | ||
! And update modifier settings | ! And update modifier settings | ||
Line 12: | Line 13: | ||
add mod4 = Super_L | add mod4 = Super_L | ||
</source> | </source> | ||
Press ctrl+c to stop editing the file and log out and in. Upon login Gnome will ask to accept the .xmodmaprc file. Click on the load button. Done. | |||
== other option == | |||
Go to system settings > keyboard > layout settings > options > alt/win behaviour and select 'Control is mapped to Win key (and the usual Ctrl keys)'. Now shortscuts like ctrl+c will work with both the ctrl AND the cmd key. You will lose your super key, but I never missed it. | |||
[[Category:Cookbook]] | [[Category:Cookbook]] |
Latest revision as of 20:15, 18 October 2011
In the terminal enter:
cat > ~/.xmodmaprc
! Erase existing bindings
clear Control
clear Mod4
! Map key 37 (left ctrl) to Super_L (i.e. 'cmd')
keycode 37 = Super_L
! Map key 133 (left cmd) to Control_L (i.e. 'ctrl')
keycode 133 = Control_L
! And update modifier settings
add control = Control_L
add mod4 = Super_L
Press ctrl+c to stop editing the file and log out and in. Upon login Gnome will ask to accept the .xmodmaprc file. Click on the load button. Done.
other option
Go to system settings > keyboard > layout settings > options > alt/win behaviour and select 'Control is mapped to Win key (and the usual Ctrl keys)'. Now shortscuts like ctrl+c will work with both the ctrl AND the cmd key. You will lose your super key, but I never missed it.