ankostis / gnome-shell-quick-lang-switch

Gnome-shell extension to quickly switch keyboard language layout (no switcher popup)
https://extensions.gnome.org/extension/4559/quick-lang-switch/
GNU Affero General Public License v3.0
65 stars 7 forks source link

It does not work for me: GNOME 42.9, Ubuntu 22.04.3 LTS #15

Open chubin opened 8 months ago

chubin commented 8 months ago

I apologize if I am doing something wrong, but I believe that I do everything in accordance with the documentation, and it does not work for me still. Please help me to localize the problem.

~/.local/share/gnome-shell/extensions/quick-lang-switch@ankostis.gmail.com$ git log | head
commit 95b0be21b3e9f5b5a28e68a1c98ccd3b75476b25
Author: Kostis Anagnostopoulos <ankostis@gmail.com>
Date:   Wed Nov 15 15:35:06 2023 +0200

    doc: v10 CHANGES

commit 70979b71f356d2ce70b6036e956445fa1d3706d2
Author: Kostis Anagnostopoulos <ankostis@gmail.com>
Date:   Wed Nov 15 15:33:31 2023 +0200

The extension seems to be visible to GNOME but it does not work (and it is reported as OUTDATED; I am not sure, that it is important or not).

quick-lang-switch@ankostis.gmail.com
  Name: Quick Lang Switch
  Description: Quickly switch keyboard language layout without showing the switcher popup.

The language switcher popup by default takes ~0.7sec to appear, meaning that roughly 2-4 strokes are lost till the switch completes. This affects heavily users typing languages with non-latin based alphabets (e.g. Greek, Cyrilic, Arabic, Japanese), particularly when writting technical documents.
This extension reduces the switching time to 1/10th of a second (on a 2019 PC).  It fixes also focus issues with the active window.
  Path: ~/.local/share/gnome-shell/extensions/quick-lang-switch@ankostis.gmail.com
  URL: https://github.com/ankostis/gnome-shell-quick-lang-switch
  State: OUT OF DATE

As you can see from the first output, it is the latest version.

Gnome version 42.9 Ubuntu 22.04.3 LTS

chubin commented 8 months ago

Small, but important addition:

I've noticed, that the plugin does not work when caps-lock is configured as the layout change key. I've changed the key to ctrl-space today for a moment, and the plugin worked!

Please note that there is only a problem with the indicator, layout change itself works.

I solved the problem with the layout change indicator using gnome-tweaks, so this issue is not important for me any more, so please feel free to close it. If you want to help the bug though, I will be glad to help with experiments if my help is needed.

Thank you for your work on this plugin!

ankostis commented 7 months ago

I would close it but i haven't yet understood what is the buggy behavior of the indicator?

chubin commented 7 months ago

The buggy behavior was that the indicator took focus for a second (or how long?), as if the plugin were not installed.

So, to summarize, the plugin does not work (as if it were not installed) when Caps Lock is used to switch layouts, and works with other combinations (that I've tested).

ankostis commented 7 months ago

I'm puzzled. Are you sure it is the language indicator that steals the focus? Could it be some capslock indicator that is stealing your focus? -

To check, un-assign caps-lock as layout switch and simply press it.

Btw, are you on Wayland or X? (run echo $XDG_SESSION_TYPE)

chubin commented 7 months ago

I am absolutely sure. It was on Wayland and on X11 too.

When I pressed enter, the language indicator disappeared, so I had to switch the language with caps-enter all the time.

ankostis commented 7 months ago

I can't think of a way that the old pop-up appears since this extension works by monkeypatcing the code where it calls it. I cannot preclude another point in gnome code calling it, but it is strange that you are the first to report it.

I would appreciate if you search in the "tweaks" for any other setting linking caps-lock with the layout-switch, can you?