.\" @(#) kbd_mode.1 23.2 91/02/25 
.ds Sd \s-2Ne\h'-0.2n'WS\s+2
.ds Xn X11/Ne\h'-0.2n'WS
.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
.TH kbd_mode 1 "25 February 1991"
.\" .IX kbd_mode#(1) "" "\fLkbd_mode\fP(1) \(em change keyboard translation mode"
.IX kbd_mode#(1) "" "\fLkbd_mode\fP(1)
.SH NAME
kbd_mode \- change the keyboard translation mode
.SH SYNOPSIS
.B kbd_mode
.BR  \ -a\ | \|\c
.BR \ -n\ | \|\c
.BR \ -e\ | \|\c
.BR \ -u\ 
.SH DESCRIPTION
.IX "keyboard" "resetting input"
.LP
.B kbd_mode
sets the translation mode of the console's keyboard (\fB/dev/kbd\fP)
to one of the four values defined for 
.SB KIOCTRANS 
in
.BR kb (4S) .
This is useful when a program that resets the translation mode crashes;
for example, \*(Sd (when run from SunView) can sometimes leave SunView 
reading untranslated events.
.IX SunView "keyboard state if \*(Sd crashes" "" "keyboard state if \*(Sd crashes"
.LP
Note that SunView desires translated events (\fBkbd_mode -e\fP), while
\*(Xn desires untranslated events (\fBkbd_mode -u\fP).  See below for
an explanation of the \fB-e\fP and \fB-u\fP options.
.SH OPTIONS
.TP 16n
.B \-a
\s-2ASCII\s0: the keyboard will generate simple \s-2ASCII\s0 characters.
.TP 
.B \-n
None: the keyboard will generate unencoded bytes
\- a distinct value for up and down on each switch on the keyboard.
.TP
.B \-e
Events: the keyboard will generate SunWindows input events
with \s-2ASCII\s0 characters in the \fIvalue\fP field.
.TP 
.B \-u
Unencoded: the keyboard will generate SunWindows input events
with unencoded bytes in the \fIvalue\fP field (this
is the mode \*(Sd currently uses).
.SH FILES
.nf
.ft B
/dev/kbd
\s-1$OPENWINHOME\s+1/bin/kbd_mode
.fi
.SH "SEE ALSO"
.BR kb (4S)
