I would like to edit the layout of my keyboard just a bit - what's the best way?
- by Codemonkey
I'm using an Apple keyboard which has some annoyances compared to other keyboards. Namely, the Alt_L and Super_L keys are swapped, and the bar and less keys are swapped ("|" and "<").
I've written an Xmodmap file to swap the keys back:
keycode 49 = less greater less greater onehalf threequarters
keycode 64 = Super_L NoSymbol Super_L
keycode 94 = bar section bar section brokenbar paragraph
keycode 108 = Super_R NoSymbol Super_R
keycode 133 = Alt_L Meta_L Alt_L Meta_L
keycode 134 = Alt_R Meta_R Alt_R Meta_R
I did this by identifying the keys using xev and the default modmap xmodmap -pke and swapping the keycodes. xev now identifies all my keys as correct, which is awesome! I can also use the correct keys to type the bar and less than symbols. (I followed this answer on askubuntu: http://askubuntu.com/q/24916/52719)
But it seems the change isn't very deep. For instance, the Super key is now broken in the Compiz Settings Manager. No shortcuts involving the Super key works (but the Alt key does). Also the settings dialog for Gnome Do doesn't heed the changes in xmodmap, and I can't open the Gnome Do window anymore if I use any of the remapped keys.
So to summarize, everything broke.
I would like a deeper way of telling Ubuntu (or any other Linux distro for that matter) which keys are which on the keyboard. Is there a way to edit the Keyboard Layout directly? I'm using the Norwegian Bokmål keyboard layout. Does it reside in a file somewhere I could edit?
Any comments, previous experiences or relevant stray thoughts would be greatly appreciated -
Thanks