slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.93k stars 566 forks source link

help: can i catch keyboard shortcuts in slint ui #2578

Closed heng30 closed 1 year ago

FloVanGH commented 1 year ago

Hi, yes it's possible. You can read the keyboard modifiers of a KeyEvent, that e.g. is used as parameter of the callbacks of FocusScope https://slint-ui.com/releases/1.0.0/docs/slint/src/builtins/structs.html#keyevent.