Keyboard – Remap Command Key to Control Key on Macbook 4,1

keyboardmac

How I can switch the left command key on the keyboard of my macbook, with the left ctrl key?

and if it is possible that the command right, continue acting like the super key / windows

Best Answer

Try this:

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

To end the input, press Ctrl+D.

To test you can run:

xmodmap ~/.xmodmaprc

Finally, you should add this command to startup applications.

This should get you started. If this does not quite work for you, checkout this for more info:

man xmodmap

To watch which key press corresponds to which internal keycode, run

xev

and press some keys when the little white window has the focus. The keycodes won't change (133 will always be 133, but you should see the name of 133 before as Control_L and after this procedure, after you log in again, it should be Super_L.

Related Question