Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!usc!samsung!uunet!bywater!arnor!larios!db3l From: db3l@ibm.com (David Bolen) Newsgroups: comp.unix.aix Subject: Re: Emacs 18.56 Function Keys on RS/6000-320 Message-ID: Date: 26 Feb 91 23:03:46 GMT References: <137@ladwp.ladwp.com> Sender: news@arnor.uucp (NNTP News Poster) Followup-To: comp.unix.aix Organization: Laboratory Automation, IBM Thomas J. Watson Research Center Lines: 48 In-Reply-To: marc@ladwp.uucp's message of 25 Feb 91 20:11:37 GMT In article <137@ladwp.ladwp.com> marc@ladwp.uucp (Marc Hall) writes: >We would like to bind the function keys f1-f12 on the IBM RS/6000-320 keyboard >to specific emacs fucntions (...) > >When the function keys are pressed while in a Emacs scratch buffer, the >display >behaves as if the C-g (bell) key had been pressed and then the >following key sequences appear in the buffer : > > f1 - 01q > f2 - 02q > . . > (...) Well, the first thing you need to do is to make sure that you use Ctrl-Q before pressing any function key. Otherwise, the sequence that the function key sends will be interpreted by GNU Emacs as normal editing keys. As the codes do not represent valid editing keys, you get the beep. That said, the codes you are missing are ESC[0, at least for the function keys. That is, F1 is ESC[001q, F2 is ESC[002q, etc.. Some other the other special keys use all three digits, like ESC[128q or something. I don't have an exhaustive list handy, but you can certainly figure out anything you want in a scratch buffer. Just remember the Ctrl-Q before hitting the key you are trying to check. Note that to define these keys, you may need to define a new keyboard map for the ESC-[ sequence. My term file for the hft terminal uses: (define-key esc-map "[" (make-sparse-keymap)) (global-unset-key "[") at the beginning prior to using a bunch of (global-set-key) statements to assign the keys to functions. -- -- David -- /-----------------------------------------------------------------------\ \ David Bolen / | Laboratory Automation, IBM Thomas J. Watson Research Center | / P.O. Box 218, Yorktown Heights, NY 10598 \ | - - - - - - - - - - - - M i t h r a n d i r - - - - - - - - - - - - | | Internet : db3l@ibm.com | Bitnet : db3l@yktvmv | | Usenet : uunet!bywater!arnor!larios!db3l | Phone : (914) 945-1940 | | /---------------------------------------------------------------\ | \-( All comments/opinions are mine and don't represent those of IBM )-/ \---------------------------------------------------------------/