7

Short version

Currently, AltGr+- produces ¥. I wish for it to produce an en-dash. In /usr/share/X11/xkb/symbols/us, I replaced all occurances of "yen" with "endash" and restarted, but this made no difference.

For the record:

$ setxkbmap -query
rules:      evdev
model:      pc104
layout:     us
variant:    altgr-intl
options:    lv3:ralt_switch_multikey,numpad:pc

Longer version

I intially started by looking in /usr/share/X11/xkb/symbols/us, which contains a section marked xkb_symbols "altgr-intl" {. This section contains include "us(intl)" and include "level3(ralt_switch)", and no mention of AE11 (which is the keycode for -).

The section marked xkb_symbols "intl" { contains key <AE11> { [ minus, underscore, yen, dead_belowdot ] };, and so I modified the yen here in the AltGr position to endash. I restarted and this made no difference, so I did the brute force method as above (then restarted).

More troubleshooting

If I set setxkbmap -layout us -variant mac, AltGr+- produces an en-dash as expected (and as defined in the xkb_symbols "mac" { section).

I also tried swapping q and w in the xkb_symbols "basic" { and xkb_symbols "intl" { sections, but this change did not do anything after restarting. I also tried setxkbmap -layout us to select the basic layout, but this also had no effect.

Sparhawk
  • 6,929

1 Answers1

9

The solution is to delete the cached xkb configurations at /var/lib/xkb/*.xkm, then restart.

Some have complained that they were unable to use their keyboard "in X next time it was started (but only that once)", although I had no problem like this at all.

Thanks to bcooksley at the KDE forums for providing the answer.

Sparhawk
  • 6,929