-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Wrong virtual keycode in WindowEvent from Alt key while holding Shift on X11 #1656
Copy link
Copy link
Closed
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedC - needs discussionDirection must be ironed outDirection must be ironed outDS - x11Affects the X11 backend, or generally free Unix platformsAffects the X11 backend, or generally free Unix platforms
Description
Platform:
X11 on Linux
Steps to reproduce:
cargo run --example window | grep KeyboardInput- hold either shift key down
- press or release the alt key
Expected result:
A WindowEvent with virtual_keycode: Some(LAlt)
Actual result:
A WindowEvent with virtual_keycode: None
The below output is from the input sequence:
press LShift, press LAlt, release LShift, release LAlt
DeviceEvent { device_id: DeviceId(X(DeviceId(12))), event: Key(KeyboardInput { scancode: 42, state: Pressed, virtual_keycode: Some(LShift), modifiers: (empty) }) }
WindowEvent { window_id: WindowId(X(WindowId(117440513))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 42, state: Pressed, virtual_keycode: Some(LShift), modifiers: SHIFT }, is_synthetic: false } }
DeviceEvent { device_id: DeviceId(X(DeviceId(12))), event: Key(KeyboardInput { scancode: 56, state: Pressed, virtual_keycode: Some(LAlt), modifiers: SHIFT }) }
WindowEvent { window_id: WindowId(X(WindowId(117440513))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 56, state: Pressed, virtual_keycode: None, modifiers: SHIFT | ALT }, is_synthetic: false } }
DeviceEvent { device_id: DeviceId(X(DeviceId(12))), event: Key(KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: SHIFT | ALT }) }
WindowEvent { window_id: WindowId(X(WindowId(117440513))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: ALT }, is_synthetic: false } }
DeviceEvent { device_id: DeviceId(X(DeviceId(12))), event: Key(KeyboardInput { scancode: 56, state: Released, virtual_keycode: Some(LAlt), modifiers: ALT }) }
WindowEvent { window_id: WindowId(X(WindowId(117440513))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 56, state: Released, virtual_keycode: Some(LAlt), modifiers: (empty) }, is_synthetic: false } }
Note that the virtual_keycode in DeviceEvent is correct. Only WindowEvent is affected. The same problem also happens if I hold RShift instead of LShift.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happenedC - needs discussionDirection must be ironed outDirection must be ironed outDS - x11Affects the X11 backend, or generally free Unix platformsAffects the X11 backend, or generally free Unix platforms