I just noticed on X11 that some WindowEvents do not contain virtual keycodes, while their DeviceEvents do contain them.
Key(KeyboardInput { scancode: 5, state: Pressed, virtual_keycode: Some(Key4), modifiers: SHIFT }) }
KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 5, state: Pressed, virtual_keycode: None, modifiers: SHIFT }, is_synthetic: false } }
Key(KeyboardInput { scancode: 5, state: Released, virtual_keycode: Some(Key4), modifiers: SHIFT }) }
KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 5, state: Released, virtual_keycode: None, modifiers: SHIFT }, is_synthetic: false } }
I just noticed on X11 that some WindowEvents do not contain virtual keycodes, while their DeviceEvents do contain them.
The events look like this:
What is interesting to me is that Shift+4 does not contain a
virtual_keycode, while 4 does.