After a recent manjaro update, something in X/XKB must have changed, influencing the keypress event order perceived by X11. Console terminal is not affected.

My ergodox keyboard is configured to use the _SHIFTED_Underscore and _SHIFTED_Colon for easy software development with vim. These keys basically first send a left shift, followed by the semicolon-colon key: you get the colon without the need to press shift.

Using xev from the xorg-xev package, it became clear that a software upgrade reversed the order xev processed the shift and colon keypress: before, shift came before colon, after, colon came before shift, losing its shifted behaviour. I have no clue why this happened, or what is causing this, but I do want my easy-to-reach colon and underscore back!

After reading this nice introduction on xkb, I found the following work-around:

  • Using the ergodox configurator, replace the shifted keys as:
    • _SHIFTED_Underscore => KEY_Pause
    • _SHIFTED_Colon => KEY_NonUS_Backslash_Pipe
  • Edit the /usr/share/X11/xkb/symbols/us file as root, adding following line to the xkb_symbols "basic" section:
key <LSGT> {	[ colon,         semicolon	]	};
key <PAUS> {	[ underscore,         minus	]	};
  • Reload the us layout via the command setxkbmap -layout us

Now, xkb is responsible for translating the two keys I don’t actually use into the desired symbols, and the original behaviour of the semicolon-colon and dash-underscore is unaffected; I have them on other locations in the non-shifted version: I could not simply change the translation of <AC10> (semicolon-colon) and <AE11> (dash-underscore).