mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
linuxkms: Implement keyboard input and clamp mouse
Unfortunately, this is currently not mapped to the right keyboard layout Also keep the mouse clamped in the visible area. And make it start in the middle of the screen.
This commit is contained in:
parent
23ca0cb36c
commit
ad389aa4eb
10 changed files with 139 additions and 85 deletions
|
@ -67,7 +67,7 @@ namespace slint::platform::key_codes {{
|
|||
"#
|
||||
)?;
|
||||
macro_rules! print_key_codes {
|
||||
($($char:literal # $name:ident # $($qt:ident)|* # $($winit:ident)|* ;)*) => {
|
||||
($($char:literal # $name:ident # $($qt:ident)|* # $($winit:ident)|* # $($_xkb:ident)|*;)*) => {
|
||||
$(
|
||||
writeln!(enums_pub, "/// A constant that represents the key code to be used in slint::Window::dispatch_key_press_event()")?;
|
||||
writeln!(enums_pub, r#"constexpr std::u8string_view {} = u8"\u{:04x}";"#, stringify!($name), $char as u32)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue