enigo
enigo copied to clipboard
linux: wayland: The Shift key does not work
Describe the bug
Entering keys such as Key::Shift does not work.
To Reproduce Run the following code:
use enigo::{Enigo, Key, KeyboardControllable};
use std::thread;
use std::time::Duration;
fn main() {
thread::sleep(Duration::from_secs(2));
let mut enigo = Enigo::new();
// write text
enigo.key_sequence("Hello World! here is a lot of text ❤️");
enigo.key_down(Key::Shift);
enigo.key_click(Key::Layout('a'));
enigo.key_up(Key::Shift);
}
with the feature wayland enabled.
Expected behavior The text should get entered, followed by an 'A'.
Environment (please complete the following information):
- OS: Linux
- Library Version: commit e7fa6dfdb22c993b903fce113ae66ee1acd17fbe
I suspect this is because of the keymap we provide. Shift probably is entered but the keymap has the same keycode for both layers.