kazysmaster / gnome-shell-extension-lockkeys

Numlock and Capslock indicator for gnome-shell
171 stars 49 forks source link

[bug] Inverted caps lock indicator #129

Open lonix1 opened 1 week ago

lonix1 commented 1 week ago

Sometimes when my laptop wakes from sleep, the caps lock indicator is inverted: it's off when caps is on, and on when caps is off.

Started after upgrading to ubuntu 24.04 (gnome 46.0).

I found two workarounds:

Any ideas?

kazysmaster commented 1 week ago

Try to disable-enable the extension. Otherwise it needs a fix that syncs it's state with the actual state of the keyboard when laptop resumes from suspend. I hope that there's a signal can be utilized.

lonix1 commented 1 week ago

Thanks.

Try to disable-enable the extension

Tried that but unfortunately it doesn't help. Which is strange as one would expect it to read the current state of the keyboard.

syncs it's state with the actual state of the keyboard ... hope that there's a signal can be utilized

Yes that would be the ideal solution, assuming it's even possible.

kazysmaster commented 1 week ago

Tried that but unfortunately it doesn't help. Which is strange as one would expect it to read the current state of the keyboard.

If that's the case then the problem is in Clutter.get_default_backend().get_default_seat().get_keymap().get_caps_lock_state() because the extension is getting it's state by calling this function when is enabled.

lonix1 commented 1 week ago

Currently it's working, so I can only test the next time it breaks. I'll have to remember to update this thread with any observations I make.