Emacs 18.56 Function Keys on RS/6000-320

David Bolen db3l at ibm.com
Wed Feb 27 10:03:46 AEST 1991


In article <137 at ladwp.ladwp.com> marc at 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 at ibm.com                    | Bitnet : db3l at yktvmv     |
| Usenet   : uunet!bywater!arnor!larios!db3l | Phone  : (914) 945-1940  |
|   /---------------------------------------------------------------\   |
 \-( All comments/opinions are mine and don't represent those of IBM )-/
    \---------------------------------------------------------------/



More information about the Comp.unix.aix mailing list