2

I'm trying to find Ctrl+Backspace terminal keycode to make it delete whole words in shell.

While it is explained how to get those codes for arrows, Home, Del and such keys with cat or od commands:

or codes given directly here: https://code.google.com/p/mintty/wiki/Keycodes (^_ doesn't work for me) I can't find a way to get Ctrl+Backpace code.

Any clues? Thanks.

Community
  • 1
  • 1
BartBiczBoży
  • 2,512
  • 2
  • 24
  • 33

1 Answers1

3

The cursor- and home/end (editing-keypad) keys are different from the backspace key. Those always send some type of escape sequence. The backspace key does not. It sends a single control character, which makes it a control sequence, rather than an escape sequence. This distinction is used in the xterm manual.

Control/backspace (like any case where a control-modifier is applied to a control character) is a feature that may be provided by a terminal, but has no general meaning (much less a standard meaning). rxvt (during the 1990s) used this combination to switch between ASCII BS (^H or 8) and DEL (^?, or 127). xterm incorporated that in 1998 (patch #83) for the same purpose. By the way, as a VT220 emulator, xterm refers to this as the "backarrow key" (VT200s had that, not a backspace key).

PuTTY does not appear to provide that feature; its behavior for control/backspace is the same as without the control-modifier.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105