In short, enabling _modifyOtherKeys_ lets the client recognize e.g. Ctrl-.
; i.e. to see modifiers for keys where modifiers are normally ignored.
Note that in XTerm, the user can also enable this by default via XResources.
The enabling/disabling sequence is:
CSI > Pp m Set/reset key modifier options, xterm. Set or reset resource- values used by xterm to decide whether to construct escape sequences holding information about the modifiers pressed with a given key. The first parameter Pp identifies the resource to set/reset. The second parameter Pv is the value to assign to the resource. If the second parameter is omitted, the resource is reset to its initial value. Values 3 and 5 are reserved for keypad- keys and string-keys. Pp = 0 ⇒ modifyKeyboard. Pp = 1 ⇒ modifyCursorKeys. Pp = 2 ⇒ modifyFunctionKeys. Pp = 4 ⇒ modifyOtherKeys. If no parameters are given, all resources are reset to their initial values.
The values that can be "assigned" for _modiyOtherKeys_ are:
modifyOtherKeys (class ModifyOtherKeys) Like modifyCursorKeys, tells xterm to construct an escape sequence for ordinary (i.e., "other") keys (such as "2") when modified by Shift-, Control-, Alt- or Meta-modifiers. This feature does not apply to special keys, i.e., cursor-, keypad-, function- or control-keys which are labeled on your keyboard. Those have key symbols which XKB identifies uniquely. For example, this feature does not apply to special control- keys (e.g., Escape, Tab, Enter, Backspace) Other control keys (e.g., Control-I, Control-M, Control-H) may send escape sequences when this feature is enabled. The default is "0": 0 disables this feature. 1 enables this feature for keys except for those with well- known behavior, e.g., Tab, Backarrow and some special control character cases which are built into the X11 library, e.g., Control-Space to make a NUL, or Control-3 to make an Escape character. Except for those special cases built into the X11 library, the Shift- and Control- modifiers are treated normally. The Alt- and Meta- modifiers do not cause xterm to send escape sequences. Those modifier keys are interpreted according to other resources, e.g., the metaSendsEscape resource. 2 enables this feature for keys including the exceptions listed. Xterm ignores the special cases built into the X11 library. Any shifted (modified) ordinary key sends an escape sequence. The Alt- and Meta- modifiers cause xterm to send escape sequences. The Xterm FAQ has an extended discussion of this feature, with examples: https://invisible-island.net/xterm/modified-keys.html
Broken out from https://github.com/jwilm/alacritty/issues/3091#issuecomment-565715265, and https://github.com/jwilm/alacritty/issues/2688#issuecomment-516987534
@AmaiKinono
Thanks for creating a separate issue for easier tracking.
Note that in XTerm, the user can also enable this by default via XResources.
I think we should be good with skipping this. If there's an escape to set/unset it, I feel like we should be good without a dedicated config option.
Most helpful comment
Thanks for creating a separate issue for easier tracking.
I think we should be good with skipping this. If there's an escape to set/unset it, I feel like we should be good without a dedicated config option.