-
I've been working on adding Global Hot Key Support to Tomotroid. The basic support in the code has been there for a while now, just with hard coded hot keys. The default Hot Keys used were Ctrl+F1, Ctrl+F2, and Ctrl+F3. I'm now working on the UI part so the user can customize these global hotkeys. I have it set up using a Focus Scope so I could capture the keys pressed. However, I can't seem to capture which function key is pressed. I've tested this on both Windows 11 and Linux, and if I use any Function key the text value is always xEF (for some reason in VSCodium on Windows the debugger shows xEF, and on Linux it shows 239, either way same value). Meaning there is no way for me to determine which Function Key is pressed (or released) Is this possible with FocusScope at the moment? If not any thoughts on how I could work around this? Edit: I found the discussion I was thinking about: #3189 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The function key are supported in the FocusScope. The text is |
Beta Was this translation helpful? Give feedback.
The function key are supported in the FocusScope. The text is
Key.F1
,Key.F2
, ... (documented there https://slint.dev/releases/1.3.2/docs/slint/src/language/builtins/namespaces#key )Also in Rust the special key codes are accessible trouch the Key enum: https://docs.rs/slint/latest/slint/platform/enum.Key.html which is convertible to char or string
Ctrl should work the same way. Unless the keys is already handled by the window manager.