I'm setting up the keyboard layouts in Xubuntu 20.04.
I generally want to be able to input various Unicode characters, both in pure console and in X, using the same keystrokes. I know that console has a limited support for Unicode (512 glyphs), so I'm OK with console only working within this limited range.
I'm keeping "Use system defaults" ON in xfce4-keyboard-settings, understanding this option as "Use the /etc/default/keyboard
setup" and hoping to have a single config for both pure console and X.
I've run sudo dpkg-reconfigure keyboard-configuration
and I've chosen the "US intl., with AltGr dead keys" layout variant.
I've discovered that in pure console bash messes up some AltGr sequences by going into "(arg: x)" mode, googled that up to be related to some readline peculiarities and, considering this as offtopic for now, ruled this behavior out by starting the simplest sh
on top of bash.
At this point, I gladly have the keyboard layout working seemingly the same way under console and under X: AltGr+2 types in ², AltGr+` then e types in è.
For the Compose key, I've chosen Caps Lock.
Under X, the behavior is expected: Compose o o types in the degree sign, Compose e = types in the euro sign, etc. etc.
But in the console, almost no Compose sequences seem to work. No degree, no euro (while they can perfectly be displayed and even input through AltGr). The Compose key is not completely useless, as it still works with the most basic combinations like Compose ` e making up è. But this is far more limited than even 512 glyphs.
So why is the console Compose behavior so different and can it be tuned to support at least the seemingly simple things like degree and euro?
/etc/default/keyboard
to something the console can do, but the console is a lot less capable than X so not everything can be translated. Look, it's 2022, it must have been about a decade since anyone worked on console support other than routine maintenance. The Linux console just isn't going to ever have decent Unicode support. – Gilles 'SO- stop being evil' Sep 01 '22 at 21:40