slint
slint copied to clipboard
Expose keyboard modifiers in a way that permits access also from TouchArea's moved callback
Access to the keyboard modifier states (shift, control, etc.) is currently limited to key events, pointer-events, and pointer-scroll events. Sometimes it may be necessary to access the state from within the moved callback of TouchArea
as well. It would be nice if this as built-in functionality.
This could either mean we expose the keyboard modifier state as a global state (accessible anywhere), or perhaps we add an argument to the moved callback.
We could add a property TextInputInterface.keyboard-modifiers
of type KeyboardModifiers.
https://slint.dev/releases/1.3.2/docs/slint/src/language/builtins/globals#textinputinterface
https://slint.dev/releases/1.3.2/docs/slint/src/language/builtins/structs#keyboardmodifiers
we probably should make sure that this is read only and cannot be modified in slint code
I agree about TextInputInterface.keyboard-modifiers
. That seems like a pragmatic choice.