From owner-freebsd-questions@FreeBSD.ORG Thu Mar 3 18:19:09 2005 Return-Path: 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 9F49816A4CE for ; Thu, 3 Mar 2005 18:19:09 +0000 (GMT) Received: from relay.pair.com (relay00.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id C75E843D5E for ; Thu, 3 Mar 2005 18:19:08 +0000 (GMT) (envelope-from alejandro@varnet.biz) Received: (qmail 80786 invoked from network); 3 Mar 2005 18:19:07 -0000 Received: from unknown (HELO ale.varnet.bsd) (unknown) by unknown with SMTP; 3 Mar 2005 18:19:07 -0000 X-pair-Authenticated: 200.115.214.206 Date: Thu, 3 Mar 2005 15:19:45 -0300 From: Alejandro Pulver To: Lars Eighner Message-ID: <20050303151945.07303710@ale.varnet.bsd> In-Reply-To: <20050301220822.F8622@goodwill.io.com> References: <20050301194338.3a49611d@ale.varnet.bsd> <20050301220822.F8622@goodwill.io.com> X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions Subject: Re: Using META and DEL keys in console X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 18:19:09 -0000 On Tue, 1 Mar 2005 23:11:18 -0600 (CST) Lars Eighner wrote: > On Tue, 1 Mar 2005, Alejandro Pulver wrote: > > > Hello, > > > > I have a PS/2 PC-101 keyboard. > > > > I would like to use my META (ALT in my keyboard) key instead of ESC > > in console mode. META works fine in an xterm. I also would like to > > use DEL and others. > > The console keymaps are in /usr/share/syscons/keymaps. You can edit > whichever keymap you are using with a flat ascii editor. > > To get a key to send the familiar ^?, enter del in the keymap. > Not all applications, however, will do the expected thing with > this, and you will have to consult the documentation for the > individual applications to see whether they can be configured to > do what you expect from a delete key. For backspace, bs, for > meta, meta, esc for escape. Note that you can set the left and > right Alt keys to different things, and that keypad Del/. key > can be different from the Delete key. > > You almost certainly do not want to mess with terminfo. > > If you use the the bash shell, you can see > what a key is currently sending by entering C-v > at the command prompt. > > > I read something in the manual pages of terminfo(5), gettytab(5), > > etc. > > > > I tried the following options: > > > > :km:smm:dc: > > > > But I am having these thoubles: > > > > 1) My ALT key did not work and the DEL key acts as BACKSPACE (C-h), > > but I would like to use it as C-d. > > C-d is eot in the console keymap if you would rather have that > than the ^? which is del. > > > > 2) Some strange thing happens with Emacs in console mode: when I > > press > > DEL, it is interpreted (literally) as C-h, and C-h is used as > > BACKSPACE. And C-d acts as DEL. > > Switching to the emacs keymap might help you. > > > > 3) Also DEL does not do anything in xterm. > > Make changes to xterm mappings in your .Xdefaults file, such as: > > !! xterm keymappings > *XTerm*VT100.translations: #override \n\ > KP_Delete: string(0x7f) \n\ > > Naturally, you can make these strings whatever you want. > > > Is there a more descriptive documentation of the terminal > > capabilities listed in terminfo(5)? > > Yes, you can google for many books worth of material, but it is > not particularly germane to what you want to do if you are running > a PC with a PC keyboard, and not trying to connect some ancient > dumb terminal. > > > Is there a standard configuration for PS/2 PC-101 keyboards? > > Unfortunately there are a lot of them. > > > > Does xterm use a different configuration from console terminals? > > Yes. > > X applications are meant to run on X, and X is meant to run on a > variety of machines. Any relationship between xterm and the > machine's native terminal is purely coincidental. (In > particular, xterm is meant to be out of the box compatible with > the very old VT100 standard - which never was native to any PC > operating system.) You can get xterm and the console keyboard to > behave mostly the same way - and get that way to be what you > want - by editing .Xdefaults and the syscons keymap you are > using (probably both). But that doesn't mean that every > application will behave as you think it should. > > -- > Lars Eighner > eighner@io.com > http://www.io.com/~eighner/index.html > 8800 N IH35 APT 1191 AUSTIN TX 78753-5266 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" Thank you for your reply. Where is the (complete) list of scancodes and which keys produce them? If there is not, as I think, how can I know what scancode is produced by each key in my keyboard (a program, maybe)? Thanks and Best Regards, Ale