rust-windowing / rust-windowing/winit
Pressing `Alt` on Windows discards key information
Open
Nobody has claimed this yet.
DS - win32
H - help wanted
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
It was brought to alacritty that pressing Alt+Ctrl+A doesn't work, as in there's no text users expect to get for Ctrl + A in such a case, moreover the logical_key looks like garbage in such scenario. The log from alacritty while pressing ctrl + shift + a with the new keyboard API:
[56.066942700s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(198608)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), event: KeyEvent { physical_key: ControlLeft, logical_key: Control, text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifers: None, key_without_modifiers: Control } }, is_synthetic: false } }
[56.362939800s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(198608)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), event: KeyEvent { physical_key: AltLeft, logical_key: Alt, text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifers: None, key_without_modifiers: Alt } }, is_synthetic: false } }
[56.586856100s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(198608)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), event: KeyEvent { physical_key: KeyA, logical_key: Unidentified(Windows(0x0041)), text: None, location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifers: None, key_without_modifiers: Character("a") } }, is_synthetic: false } }
[56.650791800s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(198608)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), event: KeyEvent { physical_key: KeyA, logical_key: Unidentified(Windows(0x0041)), text: None, location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifers: None, key_without_modifiers: Character("a") } }, is_synthetic: false } }
[56.770930200s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(198608)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), event: KeyEvent { physical_key: AltLeft, logical_key: Alt, text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifers: None, key_without_modifiers: Alt } }, is_synthetic: false } }
[56.914941500s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(198608)), event: KeyboardInput { device_id: DeviceId(DeviceId(0)), event: KeyEvent { physical_key: ControlLeft, logical_key: Control, text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifers: None, key_without_modifiers: Control } }, is_synthetic: false } }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reproducing the Windows keyboard input with Alt+Ctrl+A and compare the logged KeyboardInput events; done means the expected Ctrl+A text and a valid logical key are preserved when Alt is pressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100