I had a neat little hack to get German "Umlaute" on a US ANSI keyboard with XModap. When I hold Caps-Lock, I get Umlaute in the places where they are on a German keyboard. Here my .Xmodmap file

remove Lock = Caps_Lock
keycode  66 = Mode_switch

keycode  26 = e E EuroSign cent
keycode  30 = u U udiaeresis Udiaeresis
keycode  34 = bracketleft braceleft udiaeresis Udiaeresis
keycode  47 = semicolon colon odiaeresis Odiaeresis
keycode  32 = o O odiaeresis Odiaeresis
keycode  48 = apostrophe quotedbl adiaeresis Adiaeresis
keycode  38 = a A adiaeresis Adiaeresis
keycode  20 = minus underscore ssharp ssharp
keycode  39 = s S ssharp
keycode 106 = Shift_R

Ever since I switched to Wayland/sway this does not work any more and I currently only see the option to do this in XKB. I could not figure out:

  • how do I make Caps-Lock not "sticky"?
  • how do I add the needed Level 3 to a given key?
  • 1
    first, try an international variant of the us layout (intl, alt-intl or altgr-intl). these will include common international symbols on lvl3 of alphabetic keys. second, set option lv3:caps_switch to set capslock to ISO_Level3_Shift. you may also want a Compose key to access compose sequences (eg option compose:menu). the international layouts will differ from your xmodmap, but are fairly standard in most XKB environments. see man xkeyboard-config for a list of layouts, variants and options. – quixotic Jul 19 '18 at 18:38
  • I will probably give that a try. At work I am stuck with windows anyway and it seems the "US International" bevaves the same as alt-intl, at least for the German special characters – dabai Jul 22 '18 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.