arakiken / mlterm

Other
147 stars 13 forks source link

mlterm-fb caps lock issue #60

Closed cosminadrianpopescu closed 1 year ago

cosminadrianpopescu commented 1 year ago

When remapping caps lock to control with a script like this:

(dumpkeys | grep keymaps; echo "keycode 58 = Control") | loadkeys

when using mlterm-fb in tty will still do caps lock instead of control. Under X, running just mltert will correctly insert a ctrl and not a caps. Also the tty in which I'm starting the mlterm-fb is going to correctly interpret a ctrl instead of a caps

hramrach commented 1 year ago

Looks like the code in question is here https://github.com/arakiken/mlterm/blob/master/uitoolkit/fb/ui_display_linux.c#L764 and it only checks the keycode for the purpose of setting modifiers, not how it is translated in kcode_to_ksym https://github.com/arakiken/mlterm/blob/master/uitoolkit/fb/ui_display_linux.c#L133

hramrach commented 1 year ago

There is a patch but I did not get to testing it, YMMV

cosminadrianpopescu commented 1 year ago

I'll test the patch and let you know. Thank you.

hramrach commented 1 year ago

I guess it does not work for me because I have more than two input devices that look like a keyboard, and the one I am typing on appears late in the list, duh.