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:
Olivier Goffart 2023-07-31 16:43:33 +02:00 committed by Olivier Goffart
parent 23ca0cb36c
commit ad389aa4eb
10 changed files with 139 additions and 85 deletions

View file

@ -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)?;