Differences in CSI u reporting between GUI option and enabling from control sequence
Bug report
- iTerm2 version: 3.5.0beta2
- OS version: macOS 12.3
When I enable Report keys using CSI u in the GUI, I notice that e.g. Ctrl-C still sends \x03 (SIGINT) and Ctrl-U still sends \x15. This is convenient because it is backward compatible with terminal programs (such as my shell) that don't understand the CSI u encoding. However, ambiguous combinations such as Ctrl-I and Ctrl-M are encoded as CSI u which is useful for distinguishing from Tab or Enter, respectively.
However, when enabling CSI u keys in the terminal via an escape sequence using
printf '\e[>1u'
These keys are now encoded in the CSI u scheme: Ctrl-C is \e[99;5u and Ctrl-U is \e[117;5u.
Is this deviation intentional? If not, is it possible to have the CSI u mode enabled with the control sequence match the encoding used when enabled from the settings menu to preserve the backward compatible behavior?