Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

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.

share|improve this answer
    
cheers, using a mac keyboard has never been so confusing until this swap. –  Dimitar Christoff Sep 14 '12 at 13:10
add comment

A quick way to do this would be to goto System -> Preferences -> Keyboard -> Layouts tab -> Options -> Alt/Win key behavior -> select Win key as control

Viola!

share|improve this answer
    
This option doesn't seem to exists in Unbuntu 13.10, did they remove it? –  Håkon K. Olafsen Mar 8 at 17:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.