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

Virtual keyboard functionality and customization #98

Open
kosmosnautti opened this issue Oct 16, 2024 · 2 comments
Open

Virtual keyboard functionality and customization #98

kosmosnautti opened this issue Oct 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@kosmosnautti
Copy link

kosmosnautti commented Oct 16, 2024

So far this project has worked wonderfully, but I've come across a small problem regarding the virtual keyboard when using this with a touch screen.

I have a website using basically the whole size of the web view window. I also have input fields on different parts of the screen, and the problem is that whenever I click on a field that's on the lower part of the screen, the virtual keyboard pops up (as expected) and blocks the view to the actual input field of the website, so the problem is that I cannot see what I'm typing into the field.

I was thinking if it would be possible to add an option to for example resize the web view window when the virtual keyboard is opened (so that the web view window would be resized to start from the top of the screen and end at the top of the virtual keyboard), and then possibly scroll (if needed/possible) the web view window to the clicked input field, so that the field would be visible while typing? That's just the first solution that came to my mind, perhaps there are more elegant ones.

And last but not least, not an issue per se but more of a feature request: Would it be possible to also add some customization options for the virtual keyboard? What I'd like to see for example:

  • Adjustment of the size of the keyboard (mainly to make it a little smaller)
  • Definition of the starting layout/locale of the keyboard (or does this come from the OS settings?)
@Salamek Salamek added the enhancement New feature or request label Oct 16, 2024
@Salamek
Copy link
Owner

Salamek commented Oct 16, 2024

Well this will needs some R&D, there are like 3 ways how to do/fix this, none of them easy to implement:

  1. Keep using QWidgets, listen for virtual keyboard events and offset PageView up (+vkb height) without changing its w/h (to not change page layout, responsive css exists) and scroll to focused input, revert that when vkb is closed.
  2. Rewrite qiosk to use QML, then embed the QML vkb into qiosk, that allows to override bunch of things etc but i don't want to really do that
  3. Render floating input on top of vkb to display what is written

I think i will go with 1 for now...
Also qvirutalkeyboard uses system settings for input locale

@kosmosnautti
Copy link
Author

kosmosnautti commented Oct 17, 2024

Yeah, nbr. 1 on your list sounds reasonable. Didn't even think about responsive pages when I wrote the initial message, but you're right, the actual webview viewport size is best to be kept the same whether the virtual keyboard is open or not, just change the position of it on the screen. Looking forward for the enhancement!

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

No branches or pull requests

2 participants