diff --git a/libs/enigo/src/linux/nix_impl.rs b/libs/enigo/src/linux/nix_impl.rs index c660bd08c..7a8f6668e 100644 --- a/libs/enigo/src/linux/nix_impl.rs +++ b/libs/enigo/src/linux/nix_impl.rs @@ -156,7 +156,6 @@ impl KeyboardControllable for Enigo { } fn key_up(&mut self, key: Key) { if self.is_x11 { - dbg!(key); if self.pynput.send_pynput(&key, false) { return; } diff --git a/src/server/input_service.rs b/src/server/input_service.rs index c350e8d04..629ed17e4 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -819,6 +819,11 @@ fn legacy_keyboard_mode(evt: &KeyEvent) { } } +fn translate_keyboard_mode(evt: &KeyEvent) { + dbg!(evt.chr()); + let chr = char::from_u32(evt.chr()).unwrap_or_default(); + rdev::simulate_char(chr, evt.down); +} fn handle_key_(evt: &KeyEvent) { if EXITING.load(Ordering::SeqCst) { @@ -832,6 +837,9 @@ fn handle_key_(evt: &KeyEvent) { KeyboardMode::Map => { map_keyboard_mode(evt); } + KeyboardMode::Translate => { + translate_keyboard_mode(evt); + } _ => { legacy_keyboard_mode(evt); }