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.

I've been trying to migrate my keyboard mapping from xmodmap to xkb, but I'm having some trouble. I can see where to modify the "normal" keys, in /usr/share/X11/xkb/symbol/us for me, but this file seems devoid of "special" keys, including modifiers.

The full remapping that I wish to achieve is:

  • Swap left ctrl and shift
  • Replace right ctrl with shift
  • Replace right shift with '
  • Replace ' with /
  • Right blank key (keycode 97) to menu
  • Left blank key (keycode 92) to AltGr
  • AltGr encodings:
    • keycode 20 = minus underscore minus underscore endash emdash
    • keycode 60 = period greater period greater ellipsis
  • Fn+F5 and Fn+F6 control brightness
    • keycode 148 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
    • keycode 179 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp

How can I achieve this?

share|improve this question
    
Take a look at my answer Here, see if it helps. –  Mitch Aug 1 '13 at 17:18
    
@Mitch I actually did see that already, but as far as I can tell that is to create Xmodmaps? I already have an Xmodmap (which I find much more transparent than xkb), but I'm trying to move to xkb for several reasons: to have specific simultaneous keymaps for multiple keyboards; and to apply this keymap on startup rather than having to reconnect and trigger with a udev rule. –  Sparhawk Aug 1 '13 at 22:48

1 Answer 1

up vote 1 down vote accepted

The solution is to create AltGr encodings in /usr/share/X11/xkb/symbol/us, but swap most keys using /usr/share/X11/xkb/keycodes/evdev instead.

(However, I haven't worked out how to map Fn+F5 and Fn+F6 to XF86MonBrightnessDown and XF86MonBrightnessUp yet.)

share|improve this answer
    
Thanks for following up! –  Freedom_Ben Jan 24 at 18:56

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.