Revert "macOS: Improve deadkeys (#20515)" (#20570)

This reverts commit https://github.com/zed-industries/zed/pull/20515

I'm reverting for now to fix issues with key bindings on Nightly:
* `ctrl-c` and `ctrl-m` are being treated as `ctrl-enter`
* `ctrl-[` isn't working in vim mode
* there's a delay before `cmd-shift-[` switches tabs w/ vim mode enabled

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2024-11-12 22:32:14 -08:00 committed by GitHub
parent 0547748c48
commit 55cd99cdc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 217 additions and 227 deletions

View file

@ -688,11 +688,6 @@ impl PlatformInputHandler {
.flatten()
}
#[allow(dead_code)]
fn apple_press_and_hold_enabled(&mut self) -> bool {
self.handler.apple_press_and_hold_enabled()
}
pub(crate) fn dispatch_input(&mut self, input: &str, cx: &mut WindowContext) {
self.handler.replace_text_in_range(None, input, cx);
}
@ -790,15 +785,6 @@ pub trait InputHandler: 'static {
range_utf16: Range<usize>,
cx: &mut WindowContext,
) -> Option<Bounds<Pixels>>;
/// Allows a given input context to opt into getting raw key repeats instead of
/// sending these to the platform.
/// TODO: Ideally we should be able to set ApplePressAndHoldEnabled in NSUserDefaults
/// (which is how iTerm does it) but it doesn't seem to work for me.
#[allow(dead_code)]
fn apple_press_and_hold_enabled(&mut self) -> bool {
true
}
}
/// The variables that can be configured when creating a new window