SETKEYS(1) — USER COMMANDS
NAME
setkeys − modify the interpretation of keyboard keys
SYNOPSIS
setkeys [ reset | nosunview | [ [lefty ] [ noarrows ] ] ] [ sun1 | sun2 | sun3 ]
DESCRIPTION
Setkeys changes the kernel’s keyboard translation tables, converting a keyboard to one of a number of commonly desired configurations. It takes an indication of the modifications to be performed, and optionally, the kind of keyboard attached to the user’s machine. It affects all keyboard input for the machine it is run on (in or out of the window system) until that effect is superseded by rebooting, or by running "setkeys reset".
Setkeys has been superseded by the Input category in defaultsedit(1), and by the program input_from_defaults(1). It is retained for backwards compatibility.
OPTIONS
modifications Empty, or one of "reset", "nosunview", or some combination of "lefty" and "noarrows". By default, the keyboard is set to produce the SunView function-key codes (Stop, Props, Front, Close, Find, Again, Undo, Put, Get and Erase; <REF SunView documentation>). On Sun2 and Sun3 keyboards, this is a no-op; on the Sun1, those functions are assigned to two columns of the right numeric / function pad.
Lefty indicates the SunView functions are to be produced from keys on the right side of the keyboard, convenient for using the mouse in the left hand.
On the Sun2 and Sun3, the SunView functions are reflected to the outside columns of the right function pad; those right-side functions are distributed in a more complicated fashion dictated by keeping the arrow keys together; see below. Also, the Line Feed key, immediately below Return, is converted to a second Control.
On the Sun1, "lefty" is the same as the default, since there is no left function pad.
Noarrows Reassigns the keys with cursor arrows on their caps to produce simple function codes (so they may be used with filters in the textsw, or mapped input in the ttysw).
Nosunview Valid only on a Sun2 or Sun3 keyboard, and incompatible with "lefty", "noarrows", or ""reset." This option assigns new codes to keys F1 and L2 - L10, codes that are not normally produced anywhere on the keyboard. These codes may be selected by a mapi or mapo operation defined in a user’s .ttyswrc file.
This option supports a measure of backwards compatibility to programs that apply some other interpretation to the affected function keys. It allows them to access the new codes when the standard codes would be preempted by SunView functions (e.g. in a tty subwindow).
Reset is incompatible with "lefty", "noarrows", or "nosunview"; it causes the keyboard to be reset to its original interpretation.
keyboard-type One of "Sun1", "Sun2", or "Sun3". Normally, this option is omitted; the type of keyboard attached to the system is obtained from the kernel. If included, the option is believed in preference to the kernel’s information. Setkeys treats Sun2 and Sun3 keyboards identically except when the modification is "reset."
Note: the keyboard type is not necessarily the same as the machine type. A Sun1 keyboard is the VT100-style keyboard shipped with Model 100Us, while Sun2 and Sun3 keyboards may be attached interchangeably to Sun-2 and Sun-3 machines. A Sun3 keyboard is distinguished by its aerodynamic housing, and the presence of Caps and Alternate keys.
Options may appear in any order, and case is not significant. The accompanying charts show the exact distribution of codes for each combination of keyboard and arguments to setkeys.
EXAMPLES
setkeys lefty noarrows
puts the SunView functions on the right pad of the keyboard, replacing arrow keys by the corresponding right-function codes, and displacing right-function codes to the left pad.
setkeys sun1 reset
restores a Sun1 keyboard to its original arrangement.
SEE ALSO
defaultsedit(1)
input_from_defaults(1)
kb(4S)
Editing and the Text Facility, in Windows and Window-Based Tools, Beginner’s Guide
BUGS
DIAGRAMS
Sun1,reset:
^ V < >
[standard ]TF1TF2TF3TF4
[ typing ] 7 8 9 -
[ array ] 4 5 6 ,
[ .... ] 1 2 3En-
0 .ter
default / lefty:
^ V < >
[standard ]AgainRF1StopRF2
[ typing ]UndoRF3PropsRF4
[ array ]PutRF5FrontRF6
[ .... ]GetRF7CloseRF8
DeleteFind
default / lefty, noarrow:
TF1 TF2 TF3 TF4
[standard ]AgainRF1StopRF2
[ typing ]UndoRF3PropsRF4
[ array ]PutRF5FrontRF6
[ .... ]GetRF7CloseRF8
DeleteFind
Sun2 & Sun3,
reset / default:
TF1 TF2 ... ]
StopAgain[ standard ]RF1RF2RF3
PropsUndo[ typing ]RF4RF5RF6
FrontPut[ array ]RF7 ^RF9
CloseGet[Retn <RF11 >
FindDelete[ LFRF13 VRF15
noarrows (only):
TF1 TF2 ... ]
StopAgain[ standard ]RF1RF2RF3
PropsUndo[ typing ]RF4RF5RF6
FrontPut[ array ]RF7RF8RF9
CloseGet[RetnRF10RF11RF12
FindDelete[ LFRF13RF14RF15
lefty:
TF1 TF2 ... ]
StopRF1[ standard ]Again <Stop
RF6RF4[ typing ]Undo >Props
RF9RF7[ array ]Put ^Front
RF12RF10[RetnGetRF11Close
RF15RF13[CtrlDelete VFind
lefty, noarrows
TF1 TF2 ... ]
StopRF1[ standard ]AgainRF2Stop
RF6RF4[ typing ]UndoRF5Props
RF9RF7[ array ]PutRF8Front
RF12RF10[RetGetRF11Close
RF15RF13[CtrlDeleteRF14Find
nosunview:
LF11 TF2 ... ]
StopTF11[ standard ]RF1RF2RF3
LF12TF12[ typing ]RF4RF5RF6
LF13TF13[ array ]RF7 ^RF9
LF14TF14[Ret <RF11 >
LF15TF15[LFRF13 VRF15
Sun Release 3.2 — Last change: 29 April 1986