Score:2

How can I type "å" on a non-Danish keyboard?

ru flag

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?

francois P avatar
it flag
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)
ru flag
See @terdon's answer below - it's Unicode now, i.e. `Ctrl-Shift-u` followed by `00e5`. But that's honestly a bit tedious.
Score:5
cn flag

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".

ru flag
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 :-/
terdon avatar
cn flag
@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.
ru flag
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.)
terdon avatar
cn flag
@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.
vanadium avatar
cn flag
I would add the possibility to set up a Compose key here. That linux only feature allows to enter foreign characters after hitting the Compose key. Compose followed by o a (or a o) will enter å. Enable a compose key under Keyboard settings.
terdon avatar
cn flag
@vanadium nice! On my system only compose+o+a works (not a+o), but yes indeed!
ru flag
Where is the option to configure the Compose key? Can't seem to find it. Or what's the default on 20.04?
Score:1
ru flag

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.

vanadium avatar
cn flag
`xmodmap` is not vary reliable anymore - switching keyboard layouts may stop it from working, for example.
terdon avatar
cn flag
Please see my updated answer. Vanadium had a very good suggestion.
ru flag
True, but I need to use xmodmap anyway for a non-standard laptop keyboard, so I'm sticking with that approach for now.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.