Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Automatically open keyboard when in text field #7

Closed
KCGD opened this issue May 1, 2023 · 18 comments
Closed

[Feature request] Automatically open keyboard when in text field #7

KCGD opened this issue May 1, 2023 · 18 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@KCGD
Copy link

KCGD commented May 1, 2023

This keyboard is much better than gnome's built-in osk. However, one feature I really liked about the default osk is (in touchscreen mode) it opens automatically when you enter a text field. Is there any way to add that feature to this keyboard?

@Vishram1123
Copy link
Owner

Please see #5; I will try to implement this, but right now my priority is getting the keyboard ready to be shipped on extensions.gnome.org (and not failing my finals), so this might take a bit longer to implement.

@Vishram1123 Vishram1123 closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
@KCGD
Copy link
Author

KCGD commented May 2, 2023

and not failing my finals

Understandable, take all the time you need :)

@Vishram1123 Vishram1123 reopened this May 4, 2023
@Vishram1123 Vishram1123 self-assigned this May 4, 2023
@Vishram1123 Vishram1123 added the enhancement New feature or request label May 4, 2023
@Vishram1123 Vishram1123 added the help wanted Extra attention is needed label May 23, 2023
@Vishram1123
Copy link
Owner

I have been breaking my head trying to do this all day, and I haven't figured out how to do this...

@Vishram1123
Copy link
Owner

Vishram1123 commented May 25, 2023

Check this branch, it has rudimentary automatic opening working (to an extent, only working very unreliably in certain applications).
EDIT: Please only use this for testing, as it isn't stable yet.

@KCGD
Copy link
Author

KCGD commented May 27, 2023

I'll give it a shot!

@KCGD
Copy link
Author

KCGD commented May 27, 2023

ok, so I tried the auto open branch but the keyboard did not open for anything (I tested firefox, gnome terminal, the activities menu searchbar, and gnome's settings) all in native wayland. I also tried mailspring just to see what how an xwayland program would act but same thing.

@Vishram1123
Copy link
Owner

Vishram1123 commented May 29, 2023

Interesting; it not that dysfunctional for me, but the only app it worked in properly was Thunderbird. I will have to modify my approach significantly.

EDIT: For now, please revert back to upstream to prevent any unexpected issues :)

@KCGD
Copy link
Author

KCGD commented May 29, 2023

Already reverted for now.

Could you please give me some info on how you test the auto-open branch? I'm a bit new to this and I want to make sure that I did it correctly.

@Vishram1123
Copy link
Owner

Vishram1123 commented May 29, 2023

I would just delete the existing version, clone the repo, checkout the auto-open branch (git checkout -b auto-open), copy gjsosk@vishram1123.com/ to ~/.local/share/gnome-shell/extensions, logout, and log back in.

Side note - I am going to implement four-finger tap for now, as the automatic opening isn't quite working

@KCGD
Copy link
Author

KCGD commented May 29, 2023

Ok that's good. That's pretty much what I did.

If I have some free time I might take a crack at it. I'll open up a PR if I find anything interesting. Thanks for looking into this :)

@Vishram1123
Copy link
Owner

I added an option for now to open with a four-finger tap (5 fingers on the desktop for some reason, it is a similar case with switching between desktops, requires 4 fingers on the desktop but three fingers in the app switcher and app grid, seems to be the way that the clutter.gestureaction has been implemented). I may remove this later in favor of the text field opening, but for now it is a better alternative to opening using the button in the top bar.

@PhilDevProg
Copy link

Interesting; it not that dysfunctional for me, but the only app it worked in properly was Thunderbird. I will have to modify my approach significantly.

It also works in Krita (maybe Qt apps in general) for me.

@Vishram1123
Copy link
Owner

I got it to work when tapping to open, could someone test it to make sure it works?

@PhilDevProg
Copy link

PhilDevProg commented Jun 8, 2023

I got it to work when tapping to open, could someone test it to make sure it works?

It works for me with everything (Firefox, LibreOffice, GNOME Text Editor, GNOME Settings, Shell Search Entry, ...) except Qt apps, the folder name entry in the App Grid and the WiFi password dialog of the Shell.

Btw, it only works with touch input and not with pen input. Since pens behave like a mouse on GNOME, I assume that there's currently no way to differentiate mouse and pen input, right? If that's the case, maybe there could be two modes: A touch-input-only mode and an all-input mode. Maybe the user could also switch between them in a menu in the quick settings like in the power profiles menu if #8 gets implemented.

@Vishram1123
Copy link
Owner

Vishram1123 commented Jun 18, 2023

It works for me with everything (Firefox, LibreOffice, GNOME Text Editor, GNOME Settings, Shell Search Entry, ...) except Qt apps, the folder name entry in the App Grid and the WiFi password dialog of the Shell.

Qt apps won't work because of this (tldr: text_input_unstable_v3 support refused by Qt, instead unsupported v4 is implemented), but I will try to get the dialogs to work. I can't figure out how the default OSK is able to grab focus as of right now... the keyboard can display at the same layer as these dialogs, but its "hitbox" (idk what to call it) is beneath.

Maybe the user could also switch between them in a menu in the quick settings like in the power profiles menu if #8 gets implemented.

Implemented in the latest commit

Edit: Fixed formatting

@Vishram1123
Copy link
Owner

For now I am closing this, and moving the above mentioned dialog issue to a new issue

@castleknox
Copy link

Check this branch, it has rudimentary automatic opening working (to an extent, only working very unreliably in certain applications). EDIT: Please only use this for testing, as it isn't stable yet.

Out of curiosity, is it possible to implement a fix in the extension to disable the default Gnome OSK when GJS-OSK is enabled?

@Vishram1123
Copy link
Owner

@castleknox done in 828ecdb, sorry this didn't see this until now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants