3

I usually have German and English keyboard layouts on Ubuntu 20.04, but I recently started writing in Danish as well, and I can write most special letters (e.g. "æ" via AltGr-a, "ø" via AltGr-o etc.). However, I can't figure out how to get an "å". I guess it should be °a, but the ° isn't a dead key (unlike e.g. ^, ´ etc.). Any ideas how to fix this?

2
  • You can use a virtual keyboard of course, but it can be found in language specific extension of ascii table no ? alt-gr + number of the character (over 127)
    – francois P
    Oct 20, 2021 at 9:12
  • See @terdon's answer below - it's Unicode now, i.e. Ctrl-Shift-u followed by 00e5. But that's honestly a bit tedious. Oct 21, 2021 at 8:49

2 Answers 2

5

I use the English international with dead keys layout, and on my system I can get å with AltGr+Shift+0 (this combination is the dead key) and then a.

If that doesn't work for you for some reason, you can also enter the unicode code directly. First press Ctrl+Shift+u to enter unicode mode, then write the relevant code, 00e5 in this case, and finally Enter.

Another option (suggested by @vanadium in a comment) is to enable "compose key" in your keyboard settings. Then, you can use compose key+o+a to get å. You can chose various keys as the "compose key".

7
  • Thanks, the second suggestion does work, although it's pretty tedious. The first suggestion results in a literal ° being typed out, it's not a dead key on the German layout apparently. I guess I'll need to dive into Xmodmap and friends :-/ Oct 20, 2021 at 11:10
  • @FlorianEchtler also try some all possible keys. That's how I found that the AltGr+Shift+0 (that's zero, by the way, not the letter o) was a dead key for me: I just tried all the combinations of AltGr+Shift+key until I found one. So you probably have one as well.
    – terdon
    Oct 20, 2021 at 11:13
  • 1
    The following xmodmap command does what I was looking for: keycode 0x31 = dead_circumflex dead_abovering grave notsign U2032 U2033 bar bar (it turns the non-dead degree symbol on the upper left key into a dead_abovering symbol which can then be composed with a, u, etc.) Oct 20, 2021 at 13:53
  • 1
    @FlorianEchtler great! Please post that as an answer then, and accept it as soon as the system lets you, so the next person with a similar problem can find it.
    – terdon
    Oct 20, 2021 at 13:57
  • 1
    @vanadium nice! On my system only compose+o+a works (not a+o), but yes indeed!
    – terdon
    Oct 21, 2021 at 10:01
2

Based on the discussion with @terdon, I've figured out that I can use xmodmap -e "keycode 0x31 = dead_circumflex dead_abovering grave notsign U2032 U2033 bar bar" to turn the degree symbol on the upper-leftmost key into a dead key, i.e. I can now either type that key twice for a regular degree symbol, or type it once followed by "a" to get the letter "å" I was looking for all the time :-)

The original definition for the German keyboard is dead_circumflex degree grave notsign U2032 U2033 bar bar, so it's just changing degree to dead_abovering that does the trick.

3
  • xmodmap is not vary reliable anymore - switching keyboard layouts may stop it from working, for example.
    – vanadium
    Oct 21, 2021 at 8:51
  • Please see my updated answer. Vanadium had a very good suggestion.
    – terdon
    Oct 21, 2021 at 10:03
  • True, but I need to use xmodmap anyway for a non-standard laptop keyboard, so I'm sticking with that approach for now. Oct 24, 2021 at 8:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .