With FreeBSD 11.1 and tmux 2.7, pressing (backspace) sends ^? and ctrl+ does also send ^?.

The default behavior (no tmux) is:

  • ^H for
  • ^? for ctrl+

How can I get this default behavior with tmux? Or at least achieve that and ctrl+ don't send the same control character?

PS: okay, calling stty ek before starting tmux works. But isn't there some way to cleanly configure tmux?


tmux only pays attention to the stty settings (no config- or terminfo-data). Here's the code:

 * Check for backspace key using termios VERASE - the terminfo
 * kbs entry is extremely unreliable, so cannot be safely
 * used. termios should have a better idea.
bspace = tty->tio.c_cc[VERASE];
if (bspace != _POSIX_VDISABLE && (key & KEYC_MASK_KEY) == bspace)
    key = (key & KEYC_MASK_MOD) | KEYC_BSPACE;

So... setting stty is the only way to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.