On an Asus X551M running Xubuntu 14.04, I would like to set the following keyboard configuration:
The pair of modifier keys immediately adjacent to the spacebar are mapped to control. The next closest pair are mapped to Alt.
That is, the bottom row of my keyboard looks like this:
[ctrl] [fn] [win] [alt] [ space ] [alt] [menu] [ctrl]
whereas I want it to behave logically like this:
[ctrl] [fn] [alt] [ctrl] [ space ] [ctrl] [alt] [ctrl]
(I never use the outermost pair of Ctrl keys, so their mapping is arbitrary.)
In the past I've done this by manually editing my xmodmap file, which never Just Works on the first try. Further, xmodmap locks up when loading config files, which is apparently a known issue. Everything I've read on the subject suggests that xmodmap is deprecated and I should use setxbdmap instead.
So I first tried:
setxbdmap -option altwin:ctrl_alt_win
which works almost perfectly. Now my keyboard is logically:
[ctrl] [fn] [alt] [ctrl] [ space ] [ctrl] [menu] [ctrl]
i.e. I just need to map the Menu key to Alt. Is there a way to do this using setxbdmap?
I next looked through /usr/share/X11/xbd/rules/evdev.lst until I found the line:
altwin:menu Add the standard behavior to Menu key
and tried that, but it seems to have made no difference. There is an option:
ctrl:menu_rctrl Menu as Right Ctrl
which is almost what I want except, naturally, that it maps Menu to Ctrl instead of Alt. So, is there any way to do this with setxbdmap?
.xsessionand tried both options for.xkb/symbols/local, but neither worked. This might be naive, but how doessetxbdmapknow to look at.xkb/symbols/local? – Patrick O'Neill Aug 25 '14 at 04:28setxbdmapline just generates a config file, but the config change itself is done byxkbcomp. The reason of these two steps is that here one modifies current settings instead of directly defining a keyboard map from scratch. One could also use a pipe between both, as described in the setxkbmap(1) man page. You can check withstracewhether the.xkb/symbols/localfile is read. – vinc17 Aug 25 '14 at 07:40