1

Under Xorg, I used ~/.Xmodmap in order to be able to type amongst others a German Umlaut (i.e., äüö) using the right Ctrl key and a, u, o, respectively (as well as Shift for capitals):

remove Control = Control_R
keycode 105 = Mode_switch
keysym e = e E EuroSign
keysym c = c C cent
keysym a = a A adiaeresis Adiaeresis
keysym o = o O odiaeresis Odiaeresis
keysym u = u U udiaeresis Udiaeresis
keysym s = s S ssharp

I haven't found a way to achieve the same under Wayland using xkb. So far, I've only managed to set my keyboard variant to altgr-intl, which then lets me use right Alt + q, for example, to get an ä.

Since I'm also using Sway, I can't use Alt + Shift + q though for the capital version, because in Sway this is the shortcut to closing a window - and I don't want to remap this.

So, how do I go about putting Umlauts to right-Ctrl + a, u, o, respectively, as I've had it before under Xorg?

0

I don't know hot to achieve your exact request, but you can assign a "compose" key to R-Ctrl, instead, with a similar result.

In Gnome, you can do that with the gnome-tweaks tool. I don't remember about Cinnamon but I'm sure there's a way because I used that as well. (I'm not sure about other DEs, and - as you - I'm not fluent with Wayland).

You can then type R-Ctrl " A to obtain Ä, etc. Note that it's a sequence, not a chord: you type R-Ctrl, then ", then A.

It's not as convenient and quick as your previous solution, but it's more flexible, and gives you access to lots of other fancy characters such as ø æ ⋄ → € ° · … ´ ≠

  • Thanks, but I'm after some configuration that does not require a DE/tool like Gnome, so that it is working irrespective of the DE one is using. Hence my mentioning of xmodmap/xkb. – nondeterministic Aug 13 at 18:50
0

This is actually trivially easy under all "normal" Linux flavors.

Find the "symbols" file your current keyboard is using.

I just recently purchased a Dell Insipiron 3780, which I ordered with the US International keyboard - this keyboard has the Euro symbol on the 5. I also use a wireless Logitech wireless KB/mouse combo model Y-R0042. This has the Euro key on the 5 (in the bottom right of the 5), but otheriwse looks like a normal US keyboard.

I chose the "English (US, euro on 5)" keyboard layout.

This layout is basically defined in the file /usr/share/X11/xkb/symbols/us

You can see that the syntax of this file relies upon the ability to inheret (for lack of a better word) already defined keyboards, so in my case the "English (US, euro on 5) inhereits from "English (US)" which is defined directly above it.

In that definition, you can see all the "normal" letters being defined (or maybe identified is a better word) by their location on the keyboard.

All I did is edit the four lines which actually matter and added the ä,ü,ö,ẞ to the approriate keys, which to my mind are the existing keys a,u,o,s

These are then accessed by holding down the "right-alt" (or possible "Alt Gr") key while typing the english equivalent letter.

So, here is the result of the edits I made for the four lines (I added the final two elements (e.g. udiaeresis, Udiaeresis) to each, previously they were empty):

key <AD07> { [ u, U, udiaeresis, Udiaeresis ] };
key <AD09> { [ o, O, odiaeresis, Odiaeresis ] };
key <AC01> { [ a, A, adiaeresis, Adiaeresis ] };
key <AC02> { [ s, S, U00DF, NoSymbol ] };

You will have to edit that via "sudo" (as root) Once the you save it, you will have to reload the keyboard, I simply logged out and logged back in, and Shazam !

This is by far the simplest solution I have seen. I suggest that you back up your original file first.

  • Can you confirm, you did this under Wayland? I would expect that Wayland doesn't read or know about this file. – nondeterministic Sep 24 at 7:29
  • Ahh, sorry, I didn't notice that part of the question. No, in fact, for some reason I am NOT running wayland - I thought it was defaulting to wayland, but it seems not. – SmittyBoy Sep 25 at 8:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.