AsahiLinux / linux

Linux kernel source tree
Other
2.16k stars 85 forks source link

keymap and tty #268

Open nsklaus opened 4 months ago

nsklaus commented 4 months ago

at install time, the default keymap set for tty is fr. it is not correct, and for some reason that keymap doesn't work as it usually does on x86 linux. for example, the alt-gr gets stuck when trying to issue key combo like right-opt+right-shift+l (the letter L). this combo is what is usually used to input a pipe | . but that doesn't work with default fr keymap. that combo and many others like it trigger instead a stuck alt-gr behavior. which in turn render it very difficult to get the keyboard into a usable state. user is stuck with broken keyboard and only has option to force hard reboot. i must also mention that, with that fr keymap, many keys are not located where they should be on a french macbook keyboard.

if user manually change default keymap to mac-fr instead of fr then the situation is getting better (but not completely ok). for example most keys will now be in the proper location (with the exception of <> being swapped with #@), but combo still won't work, and trying to input pipe | (with right-opt+right-shift+l will still result in keyboard getting stuck in alt-gr mode, rendering keyboard unusable again. user has to find blindly by trial and error where are located special chars like : |,_,~,[],\ and so on on this mac-fr keymap. this makes it very difficult to work with keyboard on tty. which is unfortunate because, when user breaks something by error, and that can happen for a large number of reasons, he is usualy dropped on tty, tasked to fix the things he broke. but, as i've explained, the keymap situation on tty makes it another layer of complexity. first figuring how to use the keyboard with all the problem mentioned, then finally user can have a chance to try to fix things around. the problem i describe is furthermore accentuated since, the use of combo: fn+ctrl+opt+Fkeys is what is used to swap back and forth from tty to wayland and x11. but, when using that combo, it often trigger the stuck alt-gr behavior too.

all the above report was tested on normal fedora-kde-asahi with normal setup, on a french macbookpro, 14", m2pro.

nsklaus commented 4 months ago

for everyone else not using french keyboard, let's say you have american "qwerty" macbook. i bet the default keymap for tty set after the install is "us" which would be also wrong. it should be "mac-us" instead. if it's not, then your keys must be badly mapped too. it should be mac-(country) like: mac-de, mac-es, mac-se, mac-uk, mac-it, mac-pl ...

nsklaus commented 4 months ago

on mac-fr keymap in tty:

misplaced keys:

special chars: