Intercepting key events regardless of focus #4231
Replies: 2 comments 2 replies
-
If you know that you are using Winit, then you could try to use the I have not tried this, but maybe you can intercept the events there :-) |
Beta Was this translation helpful? Give feedback.
-
I wonder if, in focus scope, we shouldn't maybe have a new
So if user press CTRL + C, then we save and nothing is sent to the line edit (so it override the LineEdit shortcut) otherwise, for other keys, the LineEdit keeps getting all the shortcut. @tronical: what do you think? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to be able to intercept key events without a FocusScope. With a LineEdit, for example, it steals the focus from whatever might have a FocusScope, so you can't handle keybinds while in it. Or have a "global" keybind that runs regardless of where focus might be.
I'm using winit, which has key events. However, with slint, we don't have access to this event loop and building another one is forbidden. There are some crates out there that support global keybinds, but I could not find one that supports both X11 and Wayland like winit does.
Is there something that would help me achieve this?
Beta Was this translation helpful? Give feedback.
All reactions