keys: default assignments can now be set to mapped or physical

A bit of a PITA, this commit:

* Introduces a DeferredKeyCode type that defers resolving a concrete
  keycode
* Adds key_map_preference config which can be Mapped or Physical
* Key map building resolves the keycode using key_map_preference
* Default key assignments have been re-phrased in order to produce
  DeferredKeyCodes
* User-specified keys without `mapped:` or `phys:` prefixes will
  resolve according to key_map_preference

refs: https://github.com/wez/wezterm/issues/1788
refs: https://github.com/wez/wezterm/issues/1784
This commit is contained in:
Wez Furlong committed 2022-04-01 08:07:23 -07:00
1 parent 76cbcb1341
commit 508baabc79
8 files changed
+306 -331

No files matched your search

@@ -0,0 +1,11 @@
# `key_map_preference = "Mapped"`
*Since: nightly builds only*
Controls how keys without an explicit `phys:` or `mapped:` prefix are treated.
If `key_map_preference = "Mapped"` (the default), then `mapped:` is assumed. If
`key_map_preference = "Physical"` then `phys:` is assumed.
Default key assignments also respect `key_map_preference`.