Skip to content

Commit

Permalink
Fix space repeating in terminal (#20877)
Browse files Browse the repository at this point in the history
This is broken because of the way we try to emulate macOS's
ApplePressAndHoldEnabled.

Release Notes:

- Fixed holding down space in the terminal (preview only)
  • Loading branch information
ConradIrwin authored Nov 19, 2024
1 parent ea5131c commit f77b6ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/gpui/src/platform/mac/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ unsafe fn parse_keystroke(native_event: id) -> Keystroke {

#[allow(non_upper_case_globals)]
let key = match first_char {
Some(SPACE_KEY) => "space".to_string(),
Some(SPACE_KEY) => {
ime_key = Some(" ".to_string());
"space".to_string()
}
Some(BACKSPACE_KEY) => "backspace".to_string(),
Some(ENTER_KEY) | Some(NUMPAD_ENTER_KEY) => "enter".to_string(),
Some(ESCAPE_KEY) => "escape".to_string(),
Expand Down

0 comments on commit f77b6ab

Please sign in to comment.