Hamilton C shell Function Keys



setkey command

The setkey command lets you define a list of words that should be stuffed back onto the command-line whenever you press a particular function key. The syntax is exactly the same as used in the set, setenv and alias commands:

setkey fkey [ = ] ( wordlist )
setkey
fkey [ = ] wordlist

where fkey is any of the function keys f1 (or F1) through f12 (or F12.)

setkey with no operands reports the current function key bindings, if any. setkey pattern lists the bindings for any keys whose names match the pattern. The corresponding unsetkey command discards key bindings:

setkey
setkey
pattern
unsetkey fkeylist
unsetkey pattern

The fkeylist should be typed with commas between the keys. For example:

unsetkey f1, f2


Using the Function Keys

Key
Meaning
<Fx> Clear the command line, post the text bound to this key and execute the command.
Alt-<Fx> Insert the text bound to this key at the cursor location but don't execute it yet.
Ctrl-<Fx> Clear the command line and post the text bound to this key but don't execute it yet.

Since the function key's bound text is written back into the command line inside command line editor, the substitution happens ahead of any parsing of the command line into words or expansion of history "!..." or "%..." references so it is possible to meaningfully embed these kinds of references into the key binding.



Previous Topic | Next Topic

Hamilton C shell | Free Updates | Free Demo Software | Win32 Training
Y2K | Customer Testimonials | On-line Hamilton C shell User Guide
Home | Email | Support | Company Profile | Distributors | Links



Copyright © 1997-2001 by Hamilton Laboratories. All rights reserved.
You are visitor number 1285. This page was last modified August 9, 2001.