rust-windowing / rust-windowing/winit
Nonbreaking space is reported wrong on macOS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Description
This was reported for Neovide here
Input Option+Shift+Space, which should produce a non-breaking space. In Neovide, we receive the following event
KeyEvent {
physical_key: Code(
Space,
),
logical_key: Named(
Space,
),
text: Some(
" ",
),
location: Standard,
state: Pressed,
repeat: false,
platform_specific: KeyEventExtra {
text_with_all_modifiers: Some(
"\u{a0}",
),
key_without_modifiers: Named(
Space,
),
},
}
The non-breaking space is correctly reported in text_with_all_modifiers, but I would expect it to be reported in text like any other input.
The same thing also happens with narrow non breaking space for example.
KeyEvent {
physical_key: Code(
Space,
),
logical_key: Named(
Space,
),
text: None,
location: Standard,
state: Released,
repeat: false,
platform_specific: KeyEventExtra {
text_with_all_modifiers: Some(
"\u{202f}",
),
key_without_modifiers: Named(
Space,
),
},
}
macOS version
macOS 15.1.1
Winit version
0.29.15
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
Start by tracing winit's macOS keyboard event handling and reproduce Option+Shift+Space using the event details in the report. Compare the generated text with text_with_all_modifiers for non-breaking and narrow non-breaking spaces; done means these inputs are reported in text consistently with other input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100