Conversation
When you click CTRL+Backspace, terminal emulators sometimes convert the key-press to CTRL+H, CTRL+W, CTRL+?, Esc seq, TTY. Default is set to "none", therefore using default VTE settings and nothing changes unless you manually change it. I recommend CTRL+W. Ctrl + Breakspace Merge multiple vte.feedChild into one. Ctrl+W / H / ?
There was a problem hiding this comment.
If one offers an option for Ctrl+Backspace to send ESC [ 3 ~ (delete), ESC [ 3 ; 5 ~ (C-delete) could also be supported as an option. In addition, there are other terminal keyboard protocols to properly represent Ctrl+Backspace:
- In xterm's modifyOtherKeys, Ctrl+Backspace may be represented as
ESC [ 2 7 ; 5 ; 1 2 7 ~(C-DEL) orESC [ 2 7 ; 5 ; 8 ~(C-BS) depending on the implementation. - In the kitty keyboard protocol, Ctrl+Backspace is represented as
ESC [ 1 2 7 ; 5 u(C-DEL). Technically,ESC [ 8 ; 5 u(C-BS) is also a possible sequence.
| case SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[3]: // ^? | ||
| vte.feedChild("\u001F"); |
There was a problem hiding this comment.
\u001F is not ^?. \u001F is ^_, and ^? is \u007F (i.e., ASCII DEL).
edit: I think I knew a terminal that sends \u001F (i.e., ^_, ASCII US) for Ctrl+Backspace in the past, but I cannot recall which terminal it was. As for the terminal application side, GNU Emacs and Readline treat ^_ as "undo", which is useful when accessible from Ctrl+Backspace.
| case SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[4]: // DEL | ||
| vte.feedChild("\u0007"); |
There was a problem hiding this comment.
\u0007 is not DEL. \u0007 is BEL. I've never seen a terminal sending BEL for a keypress of Ctrl-Backspace.
| </key> | ||
| <key name="ctrl-backspace" enum="com.gexperts.Tilix.EraseControl"> | ||
| <default>'none'</default> | ||
| <summary>Makes the terminal threat "Control+Backspace" as different control instead of "Backspace". May be used as a shortcut for removing deleting a word instead of a character.</summary> |
There was a problem hiding this comment.
"threat" should be a typo of "treat". "removing deleting" should also be a typo.
| case SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[5]: // ESC [ 3 ~ | ||
| vte.feedChild("\u001B\u005B\u0033\u007E"); | ||
| return true; | ||
| case SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[6]: // DEL |
There was a problem hiding this comment.
There seems to be some mismatching. SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[6] is "TTY".
| <value nick='ascii-backspace' value='4'/> | ||
| <value nick='ascii-delete' value='5'/> | ||
| <value nick='delete-sequence' value='6'/> | ||
| <value nick='tty' value='7'/> |
There was a problem hiding this comment.
"tty" doesn't seem to be handled anywhere.
When you click CTRL+Backspace, terminal emulators sometimes convert the key-press to CTRL+H, CTRL+W, CTRL+?, Esc seq, TTY. Default is set to "none", therefore using default VTE settings and nothing changes unless you manually change it. I recommend CTRL+W.
#1348 #1498 🎉