summaryrefslogtreecommitdiffstats
path: root/share/man/man4/keyboard.4
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-29 09:18:45 +0000
committerru <ru@FreeBSD.org>2000-12-29 09:18:45 +0000
commit17ba2140980343f6298e96bd96d2e0c16b9dfb46 (patch)
treefa86ee6469463baf5401eb48b33f4451db7b2f20 /share/man/man4/keyboard.4
parent42aaa8ad04e1e8eb1058cea549112273857df290 (diff)
downloadFreeBSD-src-17ba2140980343f6298e96bd96d2e0c16b9dfb46.zip
FreeBSD-src-17ba2140980343f6298e96bd96d2e0c16b9dfb46.tar.gz
Prepare for mdoc(7)NG.
Diffstat (limited to 'share/man/man4/keyboard.4')
-rw-r--r--share/man/man4/keyboard.454
1 files changed, 28 insertions, 26 deletions
diff --git a/share/man/man4/keyboard.4 b/share/man/man4/keyboard.4
index 6c570da..a0e27d7 100644
--- a/share/man/man4/keyboard.4
+++ b/share/man/man4/keyboard.4
@@ -8,7 +8,6 @@
.Nm keyboard
.Nd pc keyboard interface
.Sh DESCRIPTION
-
The PC keyboard is used as the console character input device.
The keyboard
is owned by the current virtual console.
@@ -19,7 +18,7 @@ The
virtual console with the same number as the function key is then
selected as the current virtual console and given exclusive use of
the keyboard and display.
-
+.Pp
The console allows entering values that are not physically
present on the keyboard via a special keysequence.
To use this facility press and hold down ALT,
@@ -34,21 +33,23 @@ It is activated by
pressing the scroll-lock key.
This holds the display, and enables the cursor
arrows for scrolling up and down through the last scrolled out lines.
-
+.Pp
The keyboard is configurable to suit the individual user and the different
national layout.
-
+.Pp
The keys on the keyboard can have any of the following functions:
-
- Normal key - Enter the ASCII value associated with the key.
-
- Function key - Enter a string of ASCII values.
-
- Switch Key - Switch virtual console.
-
- Modifier Key - Change the meaning of another key.
-
-
+.Pp
+.Bl -tag -width "Modifier Key" -compact
+.It "Normal key"
+Enter the ASCII value associated with the key.
+.It "Function key"
+Enter a string of ASCII values.
+.It "Switch Key"
+Switch virtual console.
+.It "Modifier Key"
+Change the meaning of another key.
+.El
+.Pp
The keyboard is seen as a number of keys numbered from 1 to n. This
number is often referred to as the "scancode" for a given key.
The number
@@ -56,7 +57,7 @@ of the key is transmitted as an 8 bit char with bit 7 as 0 when a key is
pressed, and the number with bit 7 as 1 when released.
This makes it
possible to make the mapping of the keys fully configurable.
-
+.Pp
The meaning of every key is programmable via the PIO_KEYMAP ioctl call, that
takes a structure keymap_t as argument.
The layout of this structure is as
@@ -76,19 +77,20 @@ follows:
The field n_keys tells the system how many keydefinitions (scancodes)
follows.
Each scancode is then specified in the key_t substructure.
-
+.Pp
Each scancode can be translated to any of 8 different values, depending
on the shift, control, and alt state.
These eight possibilities are
represented by the map array, as shown below:
-
+.Bd -literal
alt
scan cntrl alt alt cntrl
code base shift cntrl shift alt shift cntrl shift
map[n] 0 1 2 3 4 5 6 7
---- ------------------------------------------------------
0x1E 'a' 'A' 0x01 0x01 'a' 'A' 0x01 0x01
-
+.Ed
+.Pp
This is the default mapping for the key labelled 'A' which normally has
scancode 0x1E. The eight states are as shown, giving the 'A' key its
normal behavior.
@@ -101,10 +103,10 @@ If the bit is 1 the key is "special". This means it does not emit
anything; instead it changes the "state". That means it is a shift,
control, alt, lock, switch-screen, function-key or no-op key.
The bitmap is backwards ie. 7 for base, 6 for shift etc.
-
+.Pp
The flgs field defines if the key should react on caps-lock (1),
num-lock (2), both (3) or ignore both (0).
-
+.Pp
The
.Xr kbdcontrol 1
utility is used to load such a description into/outof
@@ -112,9 +114,9 @@ the kernel at runtime.
This makes it possible to change the key
assignments at runtime, or more important to get (GIO_KEYMAP ioctl)
the exact key meanings from the kernel (fx. used by the X server).
-
+.Pp
The function keys can be programmed using the SETFKEY ioctl call.
-
+.Pp
This ioctl takes a argument of the type fkeyarg_t:
.Bd -literal -offset indent
struct fkeyarg {
@@ -127,17 +129,17 @@ This ioctl takes a argument of the type fkeyarg_t:
The field keynum defines which function key that is programmed.
The array keydef should contain the new string to be used (MAXFK long),
and the length should be entered in flen.
-
+.Pp
The GETFKEY ioctl call works in a similar manner, except it returns
the current setting of keynum.
-
+.Pp
The function keys are numbered like this:
.Bd -literal -offset indent
F1-F12 key 1 - 12
Shift F1-F12 key 13 - 24
Ctrl F1-F12 key 25 - 36
Ctrl+shift F1-F12 key 37 - 48
-
+
Home key 49
Up arrow key 50
Page Up key 51
@@ -156,7 +158,7 @@ The function keys are numbered like this:
Left window key 63
Menu key 64
.Ed
-
+.Pp
The
.Xr kbdcontrol 1
utility also allows changing these values at runtime.
OpenPOWER on IntegriCloud