nick-shmyrev / improved-osk-gnome-ext

Improved On Screen Keyboard for Gnome Shell
https://extensions.gnome.org/extension/4413/improved-osk/
94 stars 30 forks source link

Prevent switching layout to `us-extended.json` in terminal mode #36

Closed jlempen closed 1 year ago

jlempen commented 1 year ago

Add a new override for the getCurrentGroup() function in order to prevent the on-screen keyboard from switching to the us-extended.json layout in terminal mode. Now we have our shiny new extended, localized keyboard layout, we don't want it to be replaced by the us-extended.json layout when using the terminal.

jlempen commented 1 year ago

Hi @nick-shmyrev,

Thanks for your review and for your great work on this extension!

I pulled all your recent commits and added mine. I'm unable to reproduce the lock screen issue you mentioned. On my device, a Core m3 Surface Go 2 running an up-to-date Arch Linux with Gnome 43.3 on Wayland, the ch+FR.json OSK layout renders perfectly on the lock screen in both the landscape and portrait orientations. The GDM login screen renders fine as well, but I remember reading a comment from the lead developer of the gnome-shell OSK that the GDM login screen actually uses its own built-in us OSK and has nothing to do with the gnome-shell OSK.

Also, I do not get any JS ERROR related to the improved-osk-gnome-ext extension in the journalctl logs and the gnome-shell looking glass doesn't throw any errors for the extension.

With my commits, the default GNOME Console v43 doesn't switch to the us-extended.json layout and uses my extended ch+fr.json layout as expected. I have to summon the OSK manually by swiping up from the lower screen edge, though. That's expected as well, as the GNOME Console is a GTK4 app and GTK4 apps won't open the OSK automatically yet.

nick-shmyrev commented 1 year ago

@jlempen My bad, it looks like it's not the actual lock screen, but Gnome's screensaver(?). This happens in a VirtualBox VM running Fedora 37 with gnome-shell v43.3 under Wayland. This is what I'm seeing there:

image

I've also found a workaround: once on the screensaver's login screen, click/tap on the password input to hide the empty OSK container, then click on "Switch users" icon in the lower right corner. This will bring up the actual login screen, where you'll have access to Gnome's default OSK.

nick-shmyrev commented 1 year ago

PR #39 seems to have solved the issue with OSK not properly rendering in screensaver login dialog. Thanks @PhilDevProg!