slint
slint copied to clipboard
compiler: Have a `key-sequence` type
... which is lowered to a string for now.
Add a new type keyboard-shortcut, that is parsed from @keys(shift + control + a) and gets lowered to a string in Rust and C++ and the interpreter for now.
I wanted to keep this unmerged for the time being and build on top of this PR.
Newest version now accepts keys from the Keys namespace. To match up with what is defined in there, I also renamed the modifiers to start with uppercase characters. I have ignored the right-side variant of the modifier keys for now.
A bit of progress was made:
- Old branch: Rebased the entire thing on top of current master
- New commit: Printing was fixed to match inputs better (should be squashed)
- New commit: Add a
KeyboardShortcutstruct to the builtin structs and expose that to Slint- Rust works
- C++ still converts to a string somewhere and fails, should be easy to fix though
- Python and JS is untested so far