From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jan 13 04:40:10 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9EEC1065670 for ; Thu, 13 Jan 2011 04:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A90318FC0C for ; Thu, 13 Jan 2011 04:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0D4eAHB010930 for ; Thu, 13 Jan 2011 04:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0D4eA2i010929; Thu, 13 Jan 2011 04:40:10 GMT (envelope-from gnats) Date: Thu, 13 Jan 2011 04:40:10 GMT Message-Id: <201101130440.p0D4eA2i010929@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Anonymous Cc: Subject: Re: ports/153942: Tmux patch breaks backspace in tmux command mode X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anonymous List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 04:40:10 -0000 The following reply was made to PR ports/153942; it has been noted by GNATS. From: Anonymous To: Brandon Low Cc: bug-followup@freebsd.org Subject: Re: ports/153942: Tmux patch breaks backspace in tmux command mode Date: Thu, 13 Jan 2011 07:32:05 +0300 Brandon Low writes: > Here's an email that I received from the maintainer of tmux about this > issue, indicating that it should be safe to remove the patch nowadays: > > the reason they did that is because at least some freebsd versions have > xterm etc generate ^H by default and have ^H as verase in termios (stty) > > tmux always sends ^? as backspace to programs inside, but earlier > versions did not change the termios inside to set verase to ^? > > new versions do, so outside can have verase=^H, tmux will detect that is > backspace (from termios) and translate it to ^? inside as well as And this magic translation has a bug, you can't disable it. Run from inside tmux $ stty erase '^H' then try to use backspace key or Ctrl-H in ncurses apps. It'd still produce '^?'. That's because there's actually no way to type '^H'. Any other erase character would work fine. > setting verase to ^? in new windows so applications inside tmux use the > right thing > > this is all because terminfo kbs is too unreliable and so many > applications just blindly accept ^? anyway '^H' is also a valid character for Ctrl-H. Without tty-keys.c patch there is one keycode less as both Ctrl-H and Ctrl-? produce '^?'. And any (default) keybinding with '^H' doesn't work. > > since your terminal on freebsd sends ^? (and termios is ^? too) either > you're using a terminal which uses that by default, you changed the > xterm deleteIsDEL property (like everyone else does), or freebsd changed > their default