From a2da7efbf79bcb1fbe5553b1cf158eda6fc99a5a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 7 Apr 2022 21:21:14 -0700 Subject: [PATCH] remove send_composed_key_when_alt_is_pressed option refs: https://github.com/wez/wezterm/issues/1826 --- config/src/config.rs | 7 ------- docs/changelog.md | 1 + docs/config/keyboard-concepts.md | 5 ----- wezterm-gui/src/termwindow/keyevent.rs | 3 ++- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/config/src/config.rs b/config/src/config.rs index a6c7ae7e6..cd0778169 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -284,13 +284,6 @@ pub struct Config { #[serde(default)] pub daemon_options: DaemonOptions, - /// If set to true, send the system specific composed key when - /// the ALT key is held down. If set to false - /// then send the key with the ALT modifier (this is typically - /// encoded as ESC followed by the key). - #[serde(default = "default_true")] - pub send_composed_key_when_alt_is_pressed: bool, - #[serde(default)] pub send_composed_key_when_left_alt_is_pressed: bool, diff --git a/docs/changelog.md b/docs/changelog.md index 5ef6849db..d07b68d15 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -17,6 +17,7 @@ As features stabilize some brief notes about them will accumulate here. #### Changed * Default key assignments are `mapped:` again. A new [key_map_preference](config/lua/config/key_map_preference.md) option allows the defaults to use `"Mapped"` or `"Physical"`. * Disabled ligatures for `"Monaco"` and `"Menlo"` fonts, as those have `"fi"` ligatures that match even for words such as `find`. [#1786](https://github.com/wez/wezterm/issues/1786) [#1736](https://github.com/wez/wezterm/issues/1736) +* Removed the `send_composed_key_when_alt_is_pressed` option. When processing generic `ALT` (eg: that has neither left nor right), if either `send_composed_key_when_left_alt_is_pressed` or `send_composed_key_when_right_alt_is_pressed` is true, then the composed form of the key event will be generated. #### Updated and Improved * Bundled harfbuzz to 4.2.0 * On macOS, non-native fullscreen mode now attempts to avoid the notch on systems that have one. [#1737](https://github.com/wez/wezterm/issues/1737) diff --git a/docs/config/keyboard-concepts.md b/docs/config/keyboard-concepts.md index 483488cd9..4f0fd1582 100644 --- a/docs/config/keyboard-concepts.md +++ b/docs/config/keyboard-concepts.md @@ -113,11 +113,6 @@ return { } ``` -If you're running an earlier release the options were a bit more limited; -both left and right `Option` keys behave identically and composition -behavior was influenced for both of them via the `send_composed_key_when_alt_is_pressed` -configuration option. - *since: 20210203-095643-70a364eb* WezTerm is now able to perform dead-key expansion when `use_ime = false`. Dead diff --git a/wezterm-gui/src/termwindow/keyevent.rs b/wezterm-gui/src/termwindow/keyevent.rs index 3ba00b7c1..ba88d2b57 100644 --- a/wezterm-gui/src/termwindow/keyevent.rs +++ b/wezterm-gui/src/termwindow/keyevent.rs @@ -220,7 +220,8 @@ impl super::TermWindow { || (!raw_modifiers.contains(Modifiers::RIGHT_ALT) && !raw_modifiers.contains(Modifiers::LEFT_ALT) && raw_modifiers.contains(Modifiers::ALT) - && !config.send_composed_key_when_alt_is_pressed); + && !(config.send_composed_key_when_left_alt_is_pressed + || config.send_composed_key_when_right_alt_is_pressed)); if bypass_compose { if let Key::Code(term_key) = self.win_key_code_to_termwiz_key_code(keycode) {