I've found one of the odd things I've missed the most since switching from OS X to Arch is using the command button for my keyboard shortcuts, rather than the control button. My solution to swap the functionality of these keys was to use xmodmap for remapping and a custom .desktop file for automatically executing a command when Gnome starts.
Here are the relevant files:
remove control = Control_L remove mod4 = Super_L Super_R keysym Control_L = Super_L keysym Super_L = Control_L keysym Super_R = Control_L add control = Control_L Control_R add mod4 = Super_L Super_R
[Desktop Entry] Name=Xmodmap GenericName=Keyboard Remapping Comment=Remap the Control and Command Keys on the MBP 8,2 Exec=xmodmap /etc/X11/xinit/.Xmodmap Terminal=false Type=Application Categories=Keyboard; StartupNotify=false
That's it! Reboot, and it should work.
Note: ~/.config/autostart is unique to Gnome, but other display managers have similar mechanisms (according to my research, but YMMV). Also, this was on a Macbook Pro 8,2 but I expect it would work on any apple keyboard.
Last edited by mightyplatapus (2013-01-16 06:03:29)
Thanks! Worked perfectly. Lots of little things to get used to, but this helps a whole lot since I'm going back and forth between the two.
I used the same scripts, except that I didn't used the desktop entry, I launched it by hand.
But when I hibernate / suspend / or so, I had to launch it again every time.
So instead, I modified directly the keyboard layout.
It's globally in the files in
And I changed the file
swap LCTL and LWIN keycodes
<LALT> = 64; <LCTL> = 133; <SPCE> = 65; <RCTL> = 105; <RALT> = 108; // Microsoft keyboard extra keys <LWIN> = 37;