From owner-freebsd-questions Sun Dec 15 4:58:23 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5731437B401; Sun, 15 Dec 2002 04:58:20 -0800 (PST) Received: from ady.warpnet.ro (ady.warpnet.ro [217.156.25.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 749F843EA9; Sun, 15 Dec 2002 04:58:18 -0800 (PST) (envelope-from ady@freebsd.ady.ro) Received: from localhost (ady@localhost) by ady.warpnet.ro (8.9.3/8.9.3) with ESMTP id OAA53236; Sun, 15 Dec 2002 14:56:44 +0200 (EET) (envelope-from ady@freebsd.ady.ro) X-RAV-AntiVirus: This e-mail has been scanned for viruses on host: ady.warpnet.ro Date: Sun, 15 Dec 2002 14:56:44 +0200 (EET) From: Adrian Penisoara X-Sender: ady@ady.warpnet.ro To: Ryan Thompson Cc: Jonathan Chen , freebsd-questions@FreeBSD.ORG, ache@FreeBSD.ORG Subject: Re: Backspace and Delete keys under PuTTY In-Reply-To: <20021210191414.W67344-100000@ren.sasknow.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, On Tue, 10 Dec 2002, Ryan Thompson wrote: > Jonathan Chen wrote to Adrian Penisoara: > > > On Tue, Dec 10, 2002 at 01:17:17PM +0200, Adrian Penisoara wrote: > > > > [...] > > > > > But I have Bash as the default shell. And yes, it works changing > > > the Terminal / Keyboard / "Backspace key" from "Contrl-? (127)" to > > > "Control-H", but the users are pissed off by the fact that Linux > > > doesn't need this -- does it mean FreeBSD has broken termcap > > > entries or that Linux is just stepping on the traditional > > > standards ? > > > > It's Linux that's stepping on standards. Their default config is to > > have erase=DEL. All other UNIX boxen I've used have erase=BACKASPCE. > > I suspect the PUTTY writers have been heavily influenced by Linux. > Here's the explanation from the PuTTY's web documentation page[1]: --------------------------------------------------------------------- 4.4.1 Changing the action of the Backspace key Some terminals believe that the Backspace key should send the same thing to the server as Control-H (ASCII code 8). Other terminals believe that the Backspace key should send ASCII code 127 (usually known as Control-?) so that it can be distinguished from Control-H. This option allows you to choose which code PuTTY generates when you press Backspace. If you are connecting to a Unix system, you will probably find that the Unix stty command lets you configure which the server expects to see, so you might not need to change which one PuTTY generates. On other systems, the server's expectation might be fixed and you might have no choice but to configure PuTTY. If you do have the choice, we recommend configuring PuTTY to generate Control-? and configuring the server to expect it, because that allows applications such as emacs to use Control-H for help. ---------------------------------------------------------------------- Should all people go for this ? > Has anyone taken the time to really fine tune PuTTY's settings to work > well with FreeBSD and {n}curses apps? Somewhat ironically, the best > results I have received thus far are to use xterm-color and ^H for > erase. This works perfectly in tcsh/bash, but suffers somewhat in > curses or ncurses programs such as PINE or lpe. Results with these > settings vary depending on the application. PINE, for example, screams > "Unknown Command" when I try to use Home/End/Delete/ PgUp/PgDn. With > lpe, everything works except Home/End. Let me tell you, on a Dvorak > keyboard, the usual ^Q and ^R aren't exactly intuitive or convenient. > :-) Once again, let's see PuTTY's sideview on their site[1]: --------------------------------------------------------------------- 4.4.2 Changing the action of the Home and End keys The Unix terminal emulator rxvt disagrees with the rest of the world about what character sequences should be sent to the server by the Home and End keys. xterm, and other terminals, send ESC [1~ for the Home key, and ESC [4~ for the End key. rxvt sends ESC [H for the Home key and ESC [Ow for the End key. If you find an application on which the Home and End keys aren't working, you could try switching this option to see if it helps. -------------------------------------------------------------------- On which side are we on ? And for this matter let's see how the F? keys are standing on: -------------------------------------------------------------------- 4.4.3 Changing the action of the function keys and keypad This option affects the function keys (F1 to F12) and the top row of the numeric keypad. In the default mode, labelled ESC [n~, the function keys generate sequences like ESC [11~, ESC [12~ and so on. This matches the general behaviour of Digital's terminals. In Linux mode, F6 to F12 behave just like the default mode, but F1 to F5 generate ESC [[A through to ESC [[E. This mimics the Linux virtual console. In Xterm R6 mode, F5 to F12 behave like the default mode, but F1 to F4 generate ESC OP through to ESC OS, which are the sequences produced by the top row of the keypad on Digital's terminals. In VT400 mode, all the function keys behave like the default mode, but the actual top row of the numeric keypad generates ESC OP through to ESC OS. In VT100+ mode, the function keys generate ESC OP through to ESC O[ In SCO mode, the function keys F1 to F12 generate ESC [M through to ESC [X. Together with shift, they generate ESC [Y through to ESC [j. With control they generate ESC [k through to ESC [v, and with shift and control together they generate ESC [w through to ESC [{. If you don't know what any of this means, you probably don't need to fiddle with it. ------------------------------------------------------------------------ I know that I had problems with F10 in Midnight Commander in FreeBSD connected through PuTTY... [1] http://www.chiark.greenend.org.uk/~sgtatham/putty/docs.html Ady (@freebsd.ady.ro) ____________________________________________________________________ | An age is called Dark not because the light fails to shine, but | | because people refuse to see it. | | -- James Michener, "Space" | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message