pop-os / cosmic-files

COSMIC file manager
GNU General Public License v3.0
118 stars 87 forks source link

Hotkeys: capslock being active breaks a bunch of hotkeys #286

Open leviport opened 4 months ago

leviport commented 4 months ago

If I turn on capslock, I notice that hotkeys no longer work. The ones I've noticed so far:

Possibly more, but these are the quickest ones I could recreate

l-const commented 3 months ago

I think this is easy to fix, i am going to pick it up.

l-const commented 3 months ago

I noticed the same thing when copy-pasting with Ctrl + shift+ V in cosmic-term, maybe there is an issue already for that.

leviport commented 3 months ago

I'm not seeing one open for that in the cosmic-term repo. I'll open one now, good find

jackpot51 commented 3 months ago

This is not fully fixed, more work in libcosmic/iced is needed.

l-const commented 3 months ago

I did manage to fix it with checking if the char is alphabetic & loweracase/uppercase and doing an extra insertion in the HashMap here: https://github.com/l-const/cosmic-files/commit/ccc7afbb511573123dafd6b690a1f9936637b2d2 , but again this would need to be replicated across the apps in every macro definition, so it may not be an acceptable solution.

jackpot51 commented 3 months ago

The fix I have so far is identical but done at a lower layer. Unfortunately there is an issue with key bindings that are not using the alphabetic characters. For example, if you bind the 1 key, the key produced when shift or caps lock is used is dependent on the keyboard layout. For a US keyboard, it is !, but for other layouts it is something else. to_lowercase does not convert ! to 1, nor does to_uppercase convert 1 to !, as these are not properties of the 1 or ! character but instead of the keyboard mapping.

l-const commented 3 months ago

Yeah, alacritty seems to lowercase the input as well: https://github.com/alacritty/alacritty/blob/master/alacritty/src/input/keyboard.rs#L168C8-L188C11