Thread View: comp.unix.shell
2 messages
2 total messages
Started by Martin Boyer
Tue, 06 Nov 1990 20:55
tcsh binding of function keys
Author: Martin Boyer
Date: Tue, 06 Nov 1990 20:55
Date: Tue, 06 Nov 1990 20:55
33 lines
1761 bytes
1761 bytes
I just got the latest (5.19) version of tcsh and I have problems
binding SUN function keys. In the following example, I want to bind
R7 to beginning-of-line:
% bind function-key-prefix M-[
% bind beginning-of-line X-214z
bad key specification -- unknown name ""
The man page says:
If given two arguments bind binds the function (first argu-
ment) to the given key (second argument). The key may be:
the direct character or a caret-<letter> combination, which
is converted to control-<letter>; M-<letter> for an escaped
character; or X-<string> for a function key. For the last
of these, the function key prefix must be bound to the func-
tion "extended-key-prefix" and the string specified to the
bind command must not include this prefix.
Notice how it says "M-<letter>" and "X-<string>". I understand this
to mean that the M- prefix can be followed only by a single letter but
that the X- prefix can be followed by a string. I believe the
documentation is wrong but, anyhow, is there a workaround?
I know about .ttyswrc mapping, but I can't use that on a raw console.
--
Martin Boyer mboyer@ireq-robot.hydro.qc.ca
Institut de recherche d'Hydro-Quebec mboyer@ireq-robot.uucp
Varennes, QC, Canada J3X 1S1
+1 514 652-8136
Re: tcsh binding of function keys
Author: Jak Kirman
Date: Thu, 08 Nov 1990 17:25
Date: Thu, 08 Nov 1990 17:25
18 lines
1271 bytes
1271 bytes
It appears to be an error in the documentation. The clue is in the
output from bind, where the arrow keys are listed as "F-A", "F-B", etc;
they generate the sequences ^[[A, ^[B, etc.
My F9 key generates ^[[20~, so I tried:
> bind downcase-word F-20~
This worked fine.
It seems that bind X-<?> is equivalent to bind ^X<?>; it just binds the
keystrokes prefixed by ctrl-x.
Jak jak@cs.brown.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The middle of the road is all of the usable surface. The extremes,
right and left, are in the gutters.
-- Dwight D. Eisenhower
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads