1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00

macos: also respect use_dead_keys = false

refs: #410
This commit is contained in:
Wez Furlong 2021-01-31 17:32:11 -08:00
parent 90fc2b45ca
commit f541e923de
2 changed files with 11 additions and 4 deletions

View File

@ -55,9 +55,12 @@ keys are treated as composition effects, so with the default settings of
`send_composed_key_when_left_alt_is_pressed` and
`send_composed_key_when_right_alt_is_pressed` above, in a US layout, `Left-Opt
n` will produce `Alt N` and `Right-Opt n` will will for a subsequent key press
before generating an event; `Right-Opt n SPACE` will `~` whereas `Right-Opt n
before generating an event; `Right-Opt n SPACE` will emit `~` whereas `Right-Opt n
n` will emit `ñ`.
You may also set `use_dead_keys = false` to skip the hold state; continuing
the example above, `Right-Opt n` will then immediately produce `~`.
### macOS and the Input Method Editor (IME)
WezTerm has support for using the operating system Input Method Editor (IME) on

View File

@ -956,10 +956,14 @@ impl Inner {
let mods = key_modifiers(modifier_flags);
let use_dead_keys = if mods.contains(Modifiers::LEFT_ALT) {
config().send_composed_key_when_left_alt_is_pressed()
let config = config();
let use_dead_keys = if !config.use_dead_keys() {
false
} else if mods.contains(Modifiers::LEFT_ALT) {
config.send_composed_key_when_left_alt_is_pressed()
} else if mods.contains(Modifiers::RIGHT_ALT) {
config().send_composed_key_when_right_alt_is_pressed()
config.send_composed_key_when_right_alt_is_pressed()
} else {
true
};