Skip to content

Conversation

@algj
Copy link

@algj algj commented Jul 28, 2024

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.

image

#1348 #1498 🎉

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 / ?
Copy link
Contributor

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) or ESC [ 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.

Comment on lines +1058 to +1059
case SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[3]: // ^?
vte.feedChild("\u001F");
Copy link
Contributor

@akinomyoga akinomyoga Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\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.

Comment on lines +1061 to +1062
case SETTINGS_PROFILE_CTRL_BACKSPACE_VALUES[4]: // DEL
vte.feedChild("\u0007");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"tty" doesn't seem to be handled anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants