mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
13cd24d9b5
This changes the ALT/dead key behavior a little bit more, and in a way that is likely more useful to terminal users. The default behavior is that system dead key processing is enabled. For example, with DEU keyboard layout activated: * `^` `<SPACE>` results in a single `^` * `^` `e` result in those two characters combining into an e with a diacritic. If the config sets `use_dead_keys = false` then the behavior changes; wezterm probes the active keymap to determine which keys are marked as dead keys and computes their single character expansion. When the dead key is pressed then that expansion is substituted instead. So `^` is simply `^`. In order to pull this off, the window layer needs to selectively call `TranslateMessage` for the system dead key expansion case instead of unconditionally in the global message loop. As a result of *that*, it means that we don't perform the default ALT key translation for every key press any more. I looked to see how old friend putty handles this and found that it only allows default system processing for ALT-space and ALT-F4. I was resistent to selectively processing system shortcuts because the full set are effectively unknowable to an application and I didn't want to try to replicate a wide selection of varying keypresses. I'm fine to only allow these two, so this commit does that, and reverts the portion of the prior commit that prevented passing general ALT key combinations through. refs: #275 refs: #296 |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml |