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

Built-in VirtualKeyboard element for improved support for in-process embedded virtual keyboards #5128

Open
tronical opened this issue Apr 24, 2024 · 0 comments
Labels
rfc Request for comments: proposals for changes

Comments

@tronical
Copy link
Member

This is a summary of a discussion we had on Mattermost:

When creating an in-process virtual keyboard, certain behaviours are either difficult or impossible to implement:

Scenario 1: A text input field is focused and the virtual keyboard is shown (after TextInputInterface.text-input-focused became true.

  1. It may be desirable to implement behaviour that when user clicks on any other UI element that does not accept the focus, the focus should be cleared and virtual keyboard should be hidden.
  2. Clicking on the currently focused text input field should continue to delivery these events directly there (for example for cursor placement).

Scenario 2: To avoid that gaps between keys in the virtual keyboard let touch events fall through and activate elements underneath, one currently has to work around this with a TouchArea.

Scenario 3: Regardless of a system virtual keyboard, you may want to have your own in-process virtual keyboard and use that instead of a system provided one. That implies overriding the behaviour of the Slint backend.

The idea we had was that perhaps we should have a VirtualKeyboardBase built-in element in Slint, that behaves (towards the compiler as well as the run-time) similar to PopupWindow:

  1. Its geometry conveys to the run-time where the keyboard is within the window. That addresses automatically scenarios Simon/glow #2.
  2. The presence of an instance could automatically activate a system override (scenario : make sure we release GL resources #3).
  3. Property based APIs on this VirtualKeyboardBase could be used to configure behaviour such as in scenario Try upgrading to a newer rust version #1.
@tronical tronical added the rfc Request for comments: proposals for changes label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc Request for comments: proposals for changes
Projects
None yet
Development

No branches or pull requests

1 participant