1.03wip
authorAlexey Gladkov <legion@altlinux.org>
Mon, 15 Jan 2007 11:25:27 +0000 (14:25 +0300)
committerAlexey Gladkov <legion@altlinux.org>
Mon, 15 Jan 2007 11:25:27 +0000 (14:25 +0300)
71 files changed:
Makefile.in
configure
data/Makefile
data/consolefonts/README.Greek
data/consolefonts/gr.f14 [deleted file]
data/consolefonts/gr.f16 [deleted file]
data/consolefonts/gr737d-8x16.psfu [new file with mode: 0644]
data/consolefonts/gr928-8x16-thin.psfu [moved from data/consolefonts/gr928thin.fnt with 78% similarity]
data/consolefonts/gr928-9x14 [deleted file]
data/consolefonts/gr928-9x14.psfu [new file with mode: 0644]
data/consolefonts/gr928-9x16 [deleted file]
data/consolefonts/gr928-9x16.psfu [new file with mode: 0644]
data/consolefonts/gr928a-8x14.psfu [new file with mode: 0644]
data/consolefonts/gr928a-8x16.psfu [new file with mode: 0644]
data/consolefonts/gr928b-8x14.psfu [new file with mode: 0644]
data/consolefonts/gr928b-8x16.psfu [new file with mode: 0644]
data/consolefonts/greek.16 [deleted file]
data/consolefonts/grfixed.16 [deleted file]
data/consolefonts/h14 [new file with mode: 0644]
data/consolefonts/h16 [new file with mode: 0644]
data/consolefonts/h8 [new file with mode: 0644]
data/consolefonts/iso07.08 [deleted file]
data/consolefonts/iso07courier.16.psfu [deleted file]
data/consolefonts/koi8u_8x14.psfu [moved from data/consolefonts/koi8u_8x14.psf with 100% similarity]
data/consolefonts/koi8u_8x16.psfu [moved from data/consolefonts/koi8u_8x16.psf with 100% similarity]
data/consolefonts/koi8u_8x8.psfu [moved from data/consolefonts/koi8u_8x8.psf with 100% similarity]
data/consolefonts/lat0-08.psfu
data/consolefonts/lat0-10.psfu
data/consolefonts/lat0-12.psfu
data/consolefonts/lat0-14.psfu
data/consolefonts/lat0-16.psfu
data/consolefonts/lat9-12.psfu [deleted file]
data/consolefonts/lat9-14.psfu [deleted file]
data/consolefonts/lat9-16.psfu [deleted file]
data/consolefonts/lat9u-08.psfu [moved from data/consolefonts/lat9u-08.psf with 100% similarity]
data/consolefonts/lat9u-10.psfu [moved from data/consolefonts/lat9u-10.psf with 100% similarity]
data/consolefonts/lat9u-12.psfu [moved from data/consolefonts/lat9u-12.psf with 100% similarity]
data/consolefonts/lat9u-14.psfu [moved from data/consolefonts/lat9u-14.psf with 100% similarity]
data/consolefonts/lat9u-16.psfu [moved from data/consolefonts/lat9u-16.psf with 100% similarity]
data/consolefonts/lat9v-08.psfu [moved from data/consolefonts/lat9v-08.psf with 100% similarity]
data/consolefonts/lat9v-10.psfu [moved from data/consolefonts/lat9v-10.psf with 100% similarity]
data/consolefonts/lat9v-12.psfu [moved from data/consolefonts/lat9v-12.psf with 100% similarity]
data/consolefonts/lat9v-14.psfu [moved from data/consolefonts/lat9v-14.psf with 100% similarity]
data/consolefonts/lat9v-16.psfu [moved from data/consolefonts/lat9v-16.psf with 100% similarity]
data/consolefonts/lat9w-08.psfu [moved from data/consolefonts/lat9w-08.psf with 100% similarity]
data/consolefonts/lat9w-10.psfu [moved from data/consolefonts/lat9w-10.psf with 100% similarity]
data/consolefonts/lat9w-12.psfu [moved from data/consolefonts/lat9w-12.psf with 100% similarity]
data/consolefonts/lat9w-14.psfu [moved from data/consolefonts/lat9w-14.psf with 100% similarity]
data/consolefonts/lat9w-16.psfu [moved from data/consolefonts/lat9w-16.psf with 100% similarity]
data/keymaps/i386/qwerty/by.map [new file with mode: 0644]
data/keymaps/sun/sunt5-ru.map
data/keymaps/sun/sunt5-uk.map [new file with mode: 0644]
data/unimaps/8859-7.a0-ff.uni
doc/kbd.FAQ-14.html
doc/kbd.FAQ.sgml
doc/repeat/set_kbd_repeat-1 [moved from doc/set_kbd_repeat with 100% similarity]
doc/repeat/set_kbd_repeat-2 [new file with mode: 0644]
doc/scancodes/scancodes-1.html [new file with mode: 0644]
doc/scancodes/scancodes-2.html [new file with mode: 0644]
doc/scancodes/scancodes-3.html [new file with mode: 0644]
doc/scancodes/scancodes.html [new file with mode: 0644]
doc/scancodes/scancodes.sgml [new file with mode: 0644]
man/man1/psfaddtable.1
man/man1/psfgettable.1
man/man1/psfstriptable.1
man/man1/psfxtable.1 [new file with mode: 0644]
src/paths.h
src/psffontop.c
src/psfxtable.c
src/setfont.c
src/version.h

index 9e66f6b..ef5666a 100644 (file)
@@ -15,7 +15,7 @@ KEYMAPSUBDIRS = include sun amiga atari mac i386/azerty i386/dvorak i386/fgGIod
 # Do not use GZIP - it is interpreted by gzip
 MYGZIP = gzip -f -9
 
-DIR    = kbd-1.01wip
+DIR    = kbd-1.03wip
 
 SUBDIRS = src openvt po
 
index 8af07af..4a960c2 100755 (executable)
--- a/configure
+++ b/configure
@@ -126,7 +126,7 @@ if [ $nls = 1 ]; then
                echo "(Otherwise, edit defines.h and delete the line with ENABLE_NLS)"
                ENABLE_NLS=yes
        else
-               echo "You don't have <libintl.h>"
+               echo "You don't have <libintl.h> and gettext()"
                ENABLE_NLS=no
        fi
 else
index 589143f..e123c79 100644 (file)
@@ -7,7 +7,7 @@ install: $(KEYMAPDIR)_Z $(FONTDIR)_Z
        install -d -m 755 $(DATADIR)/$(TRANSDIR)
        install -m 644 $(TRANSDIR)/* $(DATADIR)/$(TRANSDIR)
        install -d -m 755 $(DATADIR)/$(UNIMAPDIR)
-       install -m 644 $(TRANSDIR)/* $(DATADIR)/$(UNIMAPDIR)
+       install -m 644 $(UNIMAPDIR)/* $(DATADIR)/$(UNIMAPDIR)
        install -d -m 755 $(DATADIR)/$(KEYMAPDIR)
        install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/i386
        for i in $(KEYMAPSUBDIRS); do \
index b905c45..40907c9 100644 (file)
@@ -2,6 +2,12 @@ Greek fonts found in kbd-1.00.tar.gz:
 
 iso07.* follows ISO 8859-7.
 
+gr928* refers to elot928 which is the same.
+(plain gr928 is elot928 with cp437 control chars;
+ gr928a* is gr928 with Euro at the 0xa4 position;
+ gr928b* is gr928 with the cp437 symbols in the 0x80-0x9f positions
+       and a filler symbol on the positions empty in ISO 8859-7)
+
 gr737* somewhat follow cp737.
 (gr737a* is cp737 with cp437 control chars;
  gr737b* is gr737a with end replaced by cp865;
diff --git a/data/consolefonts/gr.f14 b/data/consolefonts/gr.f14
deleted file mode 100644 (file)
index 4f21e57..0000000
Binary files a/data/consolefonts/gr.f14 and /dev/null differ
diff --git a/data/consolefonts/gr.f16 b/data/consolefonts/gr.f16
deleted file mode 100644 (file)
index 6945edc..0000000
Binary files a/data/consolefonts/gr.f16 and /dev/null differ
diff --git a/data/consolefonts/gr737d-8x16.psfu b/data/consolefonts/gr737d-8x16.psfu
new file mode 100644 (file)
index 0000000..ed15679
Binary files /dev/null and b/data/consolefonts/gr737d-8x16.psfu differ
similarity index 78%
rename from data/consolefonts/gr928thin.fnt
rename to data/consolefonts/gr928-8x16-thin.psfu
index 2c79520..856ac95 100644 (file)
Binary files a/data/consolefonts/gr928thin.fnt and b/data/consolefonts/gr928-8x16-thin.psfu differ
diff --git a/data/consolefonts/gr928-9x14 b/data/consolefonts/gr928-9x14
deleted file mode 100644 (file)
index 5497920..0000000
Binary files a/data/consolefonts/gr928-9x14 and /dev/null differ
diff --git a/data/consolefonts/gr928-9x14.psfu b/data/consolefonts/gr928-9x14.psfu
new file mode 100644 (file)
index 0000000..648c23a
Binary files /dev/null and b/data/consolefonts/gr928-9x14.psfu differ
diff --git a/data/consolefonts/gr928-9x16 b/data/consolefonts/gr928-9x16
deleted file mode 100644 (file)
index 6e49ddd..0000000
Binary files a/data/consolefonts/gr928-9x16 and /dev/null differ
diff --git a/data/consolefonts/gr928-9x16.psfu b/data/consolefonts/gr928-9x16.psfu
new file mode 100644 (file)
index 0000000..7140474
Binary files /dev/null and b/data/consolefonts/gr928-9x16.psfu differ
diff --git a/data/consolefonts/gr928a-8x14.psfu b/data/consolefonts/gr928a-8x14.psfu
new file mode 100644 (file)
index 0000000..d1028b7
Binary files /dev/null and b/data/consolefonts/gr928a-8x14.psfu differ
diff --git a/data/consolefonts/gr928a-8x16.psfu b/data/consolefonts/gr928a-8x16.psfu
new file mode 100644 (file)
index 0000000..645da49
Binary files /dev/null and b/data/consolefonts/gr928a-8x16.psfu differ
diff --git a/data/consolefonts/gr928b-8x14.psfu b/data/consolefonts/gr928b-8x14.psfu
new file mode 100644 (file)
index 0000000..d21fb19
Binary files /dev/null and b/data/consolefonts/gr928b-8x14.psfu differ
diff --git a/data/consolefonts/gr928b-8x16.psfu b/data/consolefonts/gr928b-8x16.psfu
new file mode 100644 (file)
index 0000000..633df5f
Binary files /dev/null and b/data/consolefonts/gr928b-8x16.psfu differ
diff --git a/data/consolefonts/greek.16 b/data/consolefonts/greek.16
deleted file mode 100644 (file)
index ceee00e..0000000
Binary files a/data/consolefonts/greek.16 and /dev/null differ
diff --git a/data/consolefonts/grfixed.16 b/data/consolefonts/grfixed.16
deleted file mode 100644 (file)
index 524632a..0000000
Binary files a/data/consolefonts/grfixed.16 and /dev/null differ
diff --git a/data/consolefonts/h14 b/data/consolefonts/h14
new file mode 100644 (file)
index 0000000..e5388c2
Binary files /dev/null and b/data/consolefonts/h14 differ
diff --git a/data/consolefonts/h16 b/data/consolefonts/h16
new file mode 100644 (file)
index 0000000..635724b
Binary files /dev/null and b/data/consolefonts/h16 differ
diff --git a/data/consolefonts/h8 b/data/consolefonts/h8
new file mode 100644 (file)
index 0000000..a9ec773
Binary files /dev/null and b/data/consolefonts/h8 differ
diff --git a/data/consolefonts/iso07.08 b/data/consolefonts/iso07.08
deleted file mode 100644 (file)
index f44360f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# combine partial fonts
-none.00-17.08
-ascii.20-7f.08
-none.00-17.08
-8859-7.a0-ff.08
diff --git a/data/consolefonts/iso07courier.16.psfu b/data/consolefonts/iso07courier.16.psfu
deleted file mode 100644 (file)
index 163482b..0000000
Binary files a/data/consolefonts/iso07courier.16.psfu and /dev/null differ
index a216df3..e61d10a 100644 (file)
Binary files a/data/consolefonts/lat0-08.psfu and b/data/consolefonts/lat0-08.psfu differ
index db103e8..63924ea 100644 (file)
Binary files a/data/consolefonts/lat0-10.psfu and b/data/consolefonts/lat0-10.psfu differ
index 6a5dcc4..a857c60 100644 (file)
Binary files a/data/consolefonts/lat0-12.psfu and b/data/consolefonts/lat0-12.psfu differ
index 39452f8..487b4aa 100644 (file)
Binary files a/data/consolefonts/lat0-14.psfu and b/data/consolefonts/lat0-14.psfu differ
index 323ef38..ce81125 100644 (file)
Binary files a/data/consolefonts/lat0-16.psfu and b/data/consolefonts/lat0-16.psfu differ
diff --git a/data/consolefonts/lat9-12.psfu b/data/consolefonts/lat9-12.psfu
deleted file mode 100644 (file)
index 864d4ab..0000000
Binary files a/data/consolefonts/lat9-12.psfu and /dev/null differ
diff --git a/data/consolefonts/lat9-14.psfu b/data/consolefonts/lat9-14.psfu
deleted file mode 100644 (file)
index 132cddb..0000000
Binary files a/data/consolefonts/lat9-14.psfu and /dev/null differ
diff --git a/data/consolefonts/lat9-16.psfu b/data/consolefonts/lat9-16.psfu
deleted file mode 100644 (file)
index 57500ea..0000000
Binary files a/data/consolefonts/lat9-16.psfu and /dev/null differ
diff --git a/data/keymaps/i386/qwerty/by.map b/data/keymaps/i386/qwerty/by.map
new file mode 100644 (file)
index 0000000..4205e41
--- /dev/null
@@ -0,0 +1,587 @@
+#              English <- Control+RightShift -> Russion
+#              English <- Control+LeftShift -> Bielorussion
+#
+#              Svistunovich Oleg Georgievich
+#              Minsk, UGAI GUVD Mingorispolkoma
+
+charset "iso-8859-5"
+keymaps 0,1,4,8,9,12,16,17,20,24,25,28,32,33,36,40,41,44
+strings as usual
+
+keycode   1 =  Escape          Escape          Escape          \
+               Meta_Escape     Meta_Escape     Meta_Escape     \
+               Escape          Escape          Escape          \
+               Meta_Escape     Meta_Escape     Meta_Escape     \
+               Escape          Escape          Escape          \
+               Meta_Escape     Meta_Escape     Meta_Escape
+keycode   2 =  one             exclam          VoidSymbol      \
+               Meta_one        Meta_exclam     VoidSymbol      \
+               one             exclam          VoidSymbol      \
+               Meta_one        Meta_exclam     VoidSymbol      \
+               one             exclam          VoidSymbol      \
+               Meta_one        Meta_exclam     VoidSymbol
+keycode   3 =  two             at              nul             \
+               Meta_two        Meta_at         Meta_nul        \
+               two             quotedbl        nul             \
+               Meta_two        Meta_quotedbl   Meta_nul        \
+               two             quotedbl        VoidSymbol      \
+               Meta_two        Meta_quotedbl   VoidSymbol
+keycode   4 =  three           numbersign      Escape          \
+               Meta_three      Meta_numbersign Meta_Escape     \
+               three           numbersign      Escape          \
+               Meta_three      Meta_numbersign Meta_Escape     \
+               three           numbersign      Escape          \
+               Meta_three      Meta_numbersign Meta_Escape
+keycode   5 =  four            dollar          Control_backslash       \
+               Meta_four       Meta_dollar     Meta_Control_backslash  \
+               four            semicolon       Control_backslash       \
+               Meta_four       Meta_semicolon  Meta_Control_backslash  \
+               four            semicolon       Control_backslash       \
+               Meta_four       Meta_semicolon  Meta_Control_backslash
+keycode   6 =  five            percent         Control_bracketright    \
+               Meta_five       Meta_percent    Meta_Control_bracketright \
+               five            percent         Control_bracketright    \
+               Meta_five       Meta_percent    Meta_Control_bracketright \
+               five            percent         Control_bracketright    \
+               Meta_five       Meta_percent    Meta_Control_bracketright
+keycode   7 =  six             asciicircum     Control_asciicircum     \
+               Meta_six        Meta_asciicircum Meta_Control_asciicircum \
+               six             colon           Control_asciicircum     \
+               Meta_six        Meta_colon      Meta_Control_asciicircum \
+               six             colon           Control_asciicircum     \
+               Meta_six        Meta_colon      Meta_Control_asciicircum
+keycode   8 =  seven           ampersand       Control_underscore      \
+               Meta_seven      Meta_ampersand  Meta_Control_underscore \
+               seven           question        Control_underscore      \
+               Meta_seven      Meta_question   Meta_Control_underscore \
+               seven           question        Control_underscore      \
+               Meta_seven      Meta_question   Meta_Control_underscore
+keycode   9 =  eight           asterisk        Delete          \
+               Meta_eight      Meta_asterisk   Meta_Delete     \
+               eight           asterisk        Delete          \
+               Meta_eight      Meta_asterisk   Meta_Delete     \
+               eight           asterisk        Delete          \
+               Meta_eight      Meta_asterisk   Meta_Delete
+keycode  10 =  nine            parenleft       VoidSymbol      \
+               Meta_nine       Meta_parenleft  VoidSymbol      \
+               nine            parenleft       VoidSymbol      \
+               Meta_nine       Meta_parenleft  VoidSymbol      \
+               nine            parenleft       VoidSymbol      \
+               Meta_nine       Meta_parenleft  VoidSymbol
+keycode  11 =  zero            parenright      VoidSymbol      \
+               Meta_zero       Meta_parenleft  VoidSymbol      \
+               zero            parenright      VoidSymbol      \
+               Meta_zero       Meta_parenleft  VoidSymbol      \
+               zero            parenright      VoidSymbol      \
+               Meta_zero       Meta_parenleft  VoidSymbol
+keycode  12 =  minus           underscore      Control_underscore      \
+               Meta_minus      Meta_underscore Meta_Control_underscore \
+               minus           underscore      Control_underscore      \
+               Meta_minus      Meta_underscore Meta_Control_underscore \
+               minus           underscore      Control_underscore      \
+               Meta_minus      Meta_underscore Meta_Control_underscore
+keycode  13 =  equal           plus            VoidSymbol      \
+               Meta_equal      Meta_plus       VoidSymbol      \
+               equal           plus            VoidSymbol      \
+               Meta_equal      Meta_plus       VoidSymbol      \
+               equal           plus            VoidSymbol      \
+               Meta_equal      Meta_plus       VoidSymbol
+keycode  14 =  Delete          Delete          Delete          \
+               Meta_Delete     Meta_Delete     Meta_Delete     \
+               Delete          Delete          Delete          \
+               Meta_Delete     Meta_Delete     Meta_Delete     \
+               Delete          Delete          Delete          \
+               Meta_Delete     Meta_Delete     Meta_Delete
+keycode  15 =  Tab             Tab             Tab             \
+               Meta_Tab        Meta_Tab        Meta_Tab        \
+               Tab             Tab             Tab             \
+               Meta_Tab        Meta_Tab        Meta_Tab        \
+               Tab             Tab             Tab             \
+               Meta_Tab        Meta_Tab        Meta_Tab
+keycode  16 =  +q              +Q              Control_q       \
+               Meta_q          Meta_Q          Meta_Control_q  \
+               +0xD9           +0xB9           Control_q       \
+               Meta_q          Meta_Q          Meta_Control_q  \
+               +0xD9           +0xB9           Control_q       \
+               Meta_q          Meta_Q          Meta_Control_q
+keycode  17 =  +w              +W              Control_w       \
+               Meta_w          Meta_W          Meta_Control_w  \
+               +0xE6           +0xC6           Control_w       \
+               Meta_w          Meta_W          Meta_Control_w  \
+               +0xE6           +0xC6           Control_w       \
+               Meta_w          Meta_W          Meta_Control_w
+keycode  18 =  +e              +E              Control_e       \
+               Meta_e          Meta_E          Meta_Control_e  \
+               +0xE3           +0xC3           Control_e       \
+               Meta_e          Meta_E          Meta_Control_e  \
+               +0xE3           +0xC3           Control_e       \
+               Meta_e          Meta_E          Meta_Control_e
+keycode  19 =  +r              +R              Control_r       \
+               Meta_r          Meta_R          Meta_Control_r  \
+               +0xDA           +0xBA           Control_r       \
+               Meta_r          Meta_R          Meta_Control_r  \
+               +0xDA           +0xBA           Control_r       \
+               Meta_r          Meta_R          Meta_Control_r
+keycode  20 =  +t              +T              Control_t       \
+               Meta_t          Meta_T          Meta_Control_t  \
+               +0xD5           +0xB5           Control_t       \
+               Meta_t          Meta_T          Meta_Control_t  \
+               +0xD5           +0xB5           Control_t       \
+               Meta_t          Meta_T          Meta_Control_t
+keycode  21 =  +y              +Y              Control_y       \
+               Meta_y          Meta_Y          Meta_Control_y  \
+               +0xDD           +0xBD           Control_y       \
+               Meta_y          Meta_Y          Meta_Control_y  \
+               +0xDD           +0xBD           Control_y       \
+               Meta_y          Meta_Y          Meta_Control_y  
+keycode  22 =  +u              +U              Control_u       \
+               Meta_u          Meta_U          Meta_Control_u  \
+               +0xD3           +0xB3           Control_u       \
+               Meta_u          Meta_U          Meta_Control_u  \
+               +0xD3           +0xB3           Control_u       \
+               Meta_u          Meta_U          Meta_Control_u
+keycode  23 =  +i              +I              Tab             \
+               Meta_i          Meta_I          Meta_Tab        \
+               +0xE8           +0xC8           Tab             \
+               Meta_i          Meta_I          Meta_Tab        \
+               +0xE8           +0xC8           Tab             \
+               Meta_i          Meta_I          Meta_Tab
+keycode  24 =  +o              +O              Control_o       \
+               Meta_o          Meta_O          Meta_Control_o  \
+               +0xF6           +0xA6           Control_o       \
+               Meta_o          Meta_O          Meta_Control_o  \
+               +0xE9           +0xC9           Control_o       \
+               Meta_o          Meta_O          Meta_Control_o
+keycode  25 =  +p              +P              Control_p       \
+               Meta_p          Meta_P          Meta_Control_p  \
+               +0xD7           +0xB7           Control_p       \
+               Meta_p          Meta_P          Meta_Control_p  \
+               +0xD7           +0xB7           Control_p       \
+               Meta_p          Meta_P          Meta_Control_p
+keycode  26 =  bracketleft     braceleft       Escape          \
+               Meta_bracketleft Meta_braceleft Meta_Escape     \
+               +0xE5           +0xC5           Escape          \
+               Meta_bracketleft Meta_braceleft Meta_Escape     \
+               +0xE5           +0xC5           Escape          \
+               Meta_bracketleft Meta_braceleft Meta_Escape
+keycode  27 =  bracketright    braceright      Control_bracketright    \
+               Meta_bracketright Meta_braceright Meta_Control_bracketright \
+               +0xFE           +0xAE           Control_bracketright    \
+               Meta_bracketright Meta_braceright Meta_Control_bracketright \
+               +0xEA           +0xCA           Control_bracketright    \
+               Meta_bracketright Meta_braceright Meta_Control_bracketright
+keycode  28 =  Return          Return          Return  \
+               Meta_Control_m  Meta_Control_m  Return  \
+               Return          Return          Return  \
+               Meta_Control_m  Meta_Control_m  Return  \
+               Return          Return          Return  \
+               Meta_Control_m  Meta_Control_m  Return
+keycode  29 =  Control         Control         Control \
+               Control         Control         Control \
+               Control         Control         Control \
+               Control         Control         Control \
+               Control         Control         Control \
+               Control         Control         Control
+keycode  30 =  +a              +A              Control_a       \
+               Meta_a          Meta_A          Meta_Control_a  \
+               +0xE4           +0xC4           Control_a       \
+               Meta_a          Meta_A          Meta_Control_a  \
+               +0xE4           +0xC4           Control_a       \
+               Meta_a          Meta_A          Meta_Control_a
+keycode  31 =  +s              +S              Control_s       \
+               Meta_s          Meta_S          Meta_Control_s  \
+               +0xEB           +0xCB           Control_s       \
+               Meta_s          Meta_S          Meta_Control_s  \
+               +0xEB           +0xCB           Control_s       \
+               Meta_s          Meta_S          Meta_Control_s
+keycode  32 =  +d              +D              Control_d       \
+               Meta_d          Meta_D          Meta_Control_d  \
+               +0xD2           +0xB2           Control_d       \
+               Meta_d          Meta_D          Meta_Control_d  \
+               +0xD2           +0xB2           Control_d       \
+               Meta_d          Meta_D          Meta_Control_d
+keycode  33 =  +f              +F              Control_f       \
+               Meta_f          Meta_F          Meta_Control_f  \
+               +0xD0           +0xB0           Control_f       \
+               Meta_f          Meta_F          Meta_Control_f  \
+               +0xD0           +0xB0           Control_f       \
+               Meta_f          Meta_F          Meta_Control_f
+keycode  34 =  +g              +G              Control_g       \
+               Meta_g          Meta_G          Meta_Control_g  \
+               +0xDF           +0xBF           Control_g       \
+               Meta_g          Meta_G          Meta_Control_g  \
+               +0xDF           +0xBF           Control_g       \
+               Meta_g          Meta_G          Meta_Control_g
+keycode  35 =  +h              +H              BackSpace       \
+               Meta_h          Meta_H          Meta_BackSpace  \
+               +0xE0           +0xC0           BackSpace       \
+               Meta_h          Meta_H          Meta_BackSpace  \
+               +0xE0           +0xC0           BackSpace       \
+               Meta_h          Meta_H          Meta_BackSpace
+keycode  36 =  +j              +J              Linefeed        \
+               Meta_j          Meta_J          Meta_Linefeed   \
+               +0xDE           +0xBE           Linefeed        \
+               Meta_j          Meta_J          Meta_Linefeed   \
+               +0xDE           +0xBE           Linefeed        \
+               Meta_j          Meta_J          Meta_Linefeed
+keycode  37 =  +k              +K              Control_k       \
+               Meta_k          Meta_K          Meta_Control_k  \
+               +0xDB           +0xBB           Control_k       \
+               Meta_k          Meta_K          Meta_Control_k  \
+               +0xDB           +0xBB           Control_k       \
+               Meta_k          Meta_K          Meta_Control_k
+keycode  38 =  +l              +L              Control_l       \
+               Meta_l          Meta_L          Meta_Control_l  \
+               +0xD4           +0xB4           Control_l       \
+               Meta_l          Meta_L          Meta_Control_l  \
+               +0xD4           +0xB4           Control_l       \
+               Meta_l          Meta_L          Meta_Control_l
+keycode  39 =  semicolon       colon           VoidSymbol      \
+               Meta_semicolon  Meta_colon      VoidSymbol      \
+               +0xD6           +0xB6           VoidSymbol      \
+               Meta_semicolon  Meta_colon      VoidSymbol      \
+               +0xD6           +0xB6           VoidSymbol      \
+               Meta_semicolon  Meta_colon      VoidSymbol
+keycode  40 =  apostrophe      quotedbl        Control_g       \
+               Meta_apostrophe Meta_quotedbl   VoidSymbol      \
+               +0xED           +0xCD           Control_g       \
+               Meta_apostrophe Meta_quotedbl   VoidSymbol      \
+               +0xED           +0xCD           Control_g       \
+               Meta_apostrophe Meta_quotedbl   VoidSymbol
+keycode  41 =  grave           asciitilde      nul             \
+               Meta_grave      Meta_asciitilde VoidSymbol      \
+               +0xF1           +0xA1           nul             \
+               Meta_grave      Meta_asciitilde VoidSymbol      \
+               +0xF1           +0xA1           nul             \
+               Meta_grave      Meta_asciitilde VoidSymbol
+keycode  42 =  Shift           Shift           ShiftL_Lock     \
+               Shift           Shift           Shift   \
+               Shift           Shift           ShiftL_Lock     \
+               Shift           Shift           Shift   \
+               Shift           Shift           Shift   \
+               Shift           Shift           Shift
+keycode  43 =  backslash       bar             Control_backslash       \
+               Meta_backslash  Meta_bar        Control_backslash       \
+               backslash       bar             Control_backslash       \
+               Meta_backslash  Meta_bar        Control_backslash       \
+               backslash       bar             Control_backslash       \
+               Meta_backslash  Meta_bar        Control_backslash
+keycode  44 =  +z              +Z              Control_z       \
+               Meta_z          Meta_Z          Meta_Control_z  \
+               +0xEF           +0xCF           Control_z       \
+               Meta_z          Meta_Z          Meta_Control_z  \
+               +0xEF           +0xCF           Control_z       \
+               Meta_z          Meta_Z          Meta_Control_z
+keycode  45 =  +x              +X              Control_x       \
+               Meta_x          Meta_X          Meta_Control_x  \
+               +0xE7           +0xC7           Control_x       \
+               Meta_x          Meta_X          Meta_Control_x  \
+               +0xE7           +0xC7           Control_x       \
+               Meta_x          Meta_X          Meta_Control_x
+keycode  46 =  +c              +C              Control_c       \
+               Meta_c          Meta_C          Meta_Control_c  \
+               +0xE1           +0xC1           Control_c       \
+               Meta_c          Meta_C          Meta_Control_c  \
+               +0xE1           +0xC1           Control_c       \
+               Meta_c          Meta_C          Meta_Control_c
+keycode  47 =  +v              +V              Control_v       \
+               Meta_v          Meta_V          Meta_Control_v  \
+               +0xDC           +0xBC           Control_v       \
+               Meta_v          Meta_V          Meta_Control_v  \
+               +0xDC           +0xBC           Control_v       \
+               Meta_v          Meta_V          Meta_Control_v
+keycode  48 =  +b              +B              Control_b       \
+               Meta_b          Meta_B          Meta_Control_b  \
+               +0xD8           +0xB8           Control_b       \
+               Meta_b          Meta_B          Meta_Control_b  \
+               +0xD8           +0xB8           Control_b       \
+               Meta_b          Meta_B          Meta_Control_b
+keycode  49 =  +n              +N              Control_n       \
+               Meta_n          Meta_N          Meta_Control_n  \
+               +0xE2           +0xC2           Control_t       \
+               Meta_n          Meta_N          Meta_Control_n  \
+               +0xE2           +0xC2           Control_t       \
+               Meta_n          Meta_N          Meta_Control_n
+keycode  50 =  +m              +M              Control_m       \
+               Meta_m          Meta_M          Meta_Control_m  \
+               +0xEC           +0xCC           Control_m       \
+               Meta_m          Meta_M          Meta_Control_m  \
+               +0xEC           +0xCC           Control_m       \
+               Meta_m          Meta_M          Meta_Control_m
+keycode  51 =  comma           less            VoidSymbol      \
+               Meta_comma      Meta_less       VoidSymbol      \
+               +0xD1           +0xB1           VoidSymbol      \
+               Meta_comma      Meta_less       VoidSymbol      \
+               +0xD1           +0xB1           VoidSymbol      \
+               Meta_comma      Meta_less       VoidSymbol
+keycode  52 =  period          greater         VoidSymbol      \
+               Meta_period     Meta_greater    VoidSymbol      \
+               +0xEE           +0xCE           VoidSymbol      \
+               Meta_period     Meta_greater    VoidSymbol      \
+               +0xEE           +0xCE           VoidSymbol      \
+               Meta_period     Meta_greater    VoidSymbol
+keycode  53 =  slash           question        Delete          \
+               Meta_slash      Meta_question   VoidSymbol      \
+               period          comma           Delete          \
+               Meta_slash      Meta_question   VoidSymbol      \
+               period          comma           Delete          \
+               Meta_slash      Meta_question   VoidSymbol
+keycode  54 =  Shift           Shift           ShiftR_Lock     \
+               Shift           Shift           Shift   \
+               Shift           Shift           Shift   \
+               Shift           Shift           Shift   \
+               Shift           Shift           ShiftR_Lock     \
+               Shift           Shift           Shift
+keycode  55 =  KP_Multiply     KP_Multiply     Hex_C           \
+               KP_Multiply     KP_Multiply     KP_Multiply     \
+               KP_Multiply     KP_Multiply     Hex_C           \
+               KP_Multiply     KP_Multiply     KP_Multiply     \
+               KP_Multiply     KP_Multiply     Hex_C           \
+               KP_Multiply     KP_Multiply     KP_Multiply
+keycode  56 =  Alt
+keycode  57 =  space           space           nul             \
+               Meta_space      Meta_space      Meta_nul        \
+               space           space           nul             \
+               Meta_space      Meta_space      Meta_nul        \
+               space           space           nul             \
+               Meta_space      Meta_space      Meta_nul
+keycode  58 =  Caps_Lock
+keycode  59 =  F1              F13             F25             \
+               Console_1       Console_13      Console_1       \
+               F1              F13             F25             \
+               Console_1       Console_13      Console_1       \
+               F1              F13             F25             \
+               Console_1       Console_13      Console_1
+keycode  60 =  F2              F14             F26             \
+               Console_2       Console_14      Console_2       \
+               F2              F14             F26             \
+               Console_2       Console_14      Console_2       \
+               F2              F14             F26             \
+               Console_2       Console_14      Console_2
+keycode  61 =  F3              F15             F27             \
+               Console_3       Console_15      Console_3       \
+               F3              F15             F27             \
+               Console_3       Console_15      Console_3       \
+               F3              F15             F27             \
+               Console_3       Console_15      Console_3
+keycode  62 =  F4              F16             F28             \
+               Console_4       Console_16      Console_4       \
+               F4              F16             F28             \
+               Console_4       Console_16      Console_4       \
+               F4              F16             F28             \
+               Console_4       Console_16      Console_4
+keycode  63 =  F5              F17             F29             \
+               Console_5       Console_17      Console_5       \
+               F5              F17             F29             \
+               Console_5       Console_17      Console_5       \
+               F5              F17             F29             \
+               Console_5       Console_17      Console_5
+keycode  64 =  F6              F18             F30             \
+               Console_6       Console_18      Console_6       \
+               F6              F18             F30             \
+               Console_6       Console_18      Console_6       \
+               F6              F18             F30             \
+               Console_6       Console_18      Console_6
+keycode  65 =  F7              F19             F31             \
+               Console_7       Console_19      Console_7       \
+               F7              F19             F31             \
+               Console_7       Console_19      Console_7       \
+               F7              F19             F31             \
+               Console_7       Console_19      Console_7
+keycode  66 =  F8              F20             F32             \
+               Console_8       Console_20      Console_8       \
+               F8              F20             F32             \
+               Console_8       Console_20      Console_8       \
+               F8              F20             F32             \
+               Console_8       Console_20      Console_8
+keycode  67 =  F9              F21             F33             \
+               Console_9       Console_21      Console_9       \
+               F9              F21             F33             \
+               Console_9       Console_21      Console_9       \
+               F9              F21             F33             \
+               Console_9       Console_21      Console_9
+keycode  68 =  F10             F22             F34             \
+               Console_10      Console_22      Console_10      \
+               F10             F22             F34             \
+               Console_10      Console_22      Console_10      \
+               F10             F22             F34             \
+               Console_10      Console_22      Console_10
+keycode  69 =  Num_Lock        Num_Lock        Hex_E           \
+               Num_Lock        Num_Lock        Num_Lock        \
+               Num_Lock        Num_Lock        Hex_E           \
+               Num_Lock        Num_Lock        Num_Lock        \
+               Num_Lock        Num_Lock        Hex_E           \
+               Num_Lock        Num_Lock        Num_Lock
+keycode  70 =  Scroll_Lock     Show_Memory     Show_State      \
+               Show_Registers  VoidSymbol      Scroll_Lock     \
+               Scroll_Lock     Show_Memory     Show_State      \
+               Show_Registers  VoidSymbol      Scroll_Lock     \
+               Scroll_Lock     Show_Memory     Show_State      \
+               Show_Registers  VoidSymbol      Scroll_Lock
+keycode  71 =  KP_7            KP_7            Hex_7   \
+               Ascii_7         KP_7            KP_7    \
+               KP_7            KP_7            Hex_7   \
+               Ascii_7         KP_7            KP_7    \
+               KP_7            KP_7            Hex_7   \
+               Ascii_7         KP_7            KP_7
+keycode  72 =  KP_8            KP_8            Hex_8   \
+               Ascii_8         KP_8            KP_8    \
+               KP_8            KP_8            Hex_8   \
+               Ascii_8         KP_8            KP_8    \
+               KP_8            KP_8            Hex_8   \
+               Ascii_8         KP_8            KP_8
+keycode  73 =  KP_9            KP_9            Hex_9   \
+               Ascii_9         KP_9            KP_9    \
+               KP_9            KP_9            Hex_9   \
+               Ascii_9         KP_9            KP_9    \
+               KP_9            KP_9            Hex_9   \
+               Ascii_9         KP_9            KP_9
+keycode  74 =  KP_Subtract
+keycode  75 =  KP_4            KP_4            Hex_4   \
+               Ascii_4         KP_4            KP_4    \
+               KP_4            KP_4            Hex_4   \
+               Ascii_4         KP_4            KP_4    \
+               KP_4            KP_4            Hex_4   \
+               Ascii_4         KP_4            KP_4
+keycode  76 =  KP_5            KP_5            Hex_5   \
+               Ascii_5         KP_5            KP_5    \
+               KP_5            KP_5            Hex_5   \
+               Ascii_5         KP_5            KP_5    \
+               KP_5            KP_5            Hex_5   \
+               Ascii_5         KP_5            KP_5
+keycode  77 =  KP_6            KP_6            Hex_6   \
+               Ascii_6         KP_6            KP_6    \
+               KP_6            KP_6            Hex_6   \
+               Ascii_6         KP_6            KP_6    \
+               KP_6            KP_6            Hex_6   \
+               Ascii_6         KP_6            KP_6
+keycode  78 =  KP_Add
+keycode  79 =  KP_1            KP_1            Hex_1   \
+               Ascii_1         KP_1            KP_1    \
+               KP_1            KP_1            Hex_1   \
+               Ascii_1         KP_1            KP_1    \
+               KP_1            KP_1            Hex_1   \
+               Ascii_1         KP_1            KP_1
+keycode  80 =  KP_2            KP_2            Hex_2   \
+               Ascii_2         KP_2            KP_2    \
+               KP_2            KP_2            Hex_2   \
+               Ascii_2         KP_2            KP_2    \
+               KP_2            KP_2            Hex_2   \
+               Ascii_2         KP_2            KP_2
+keycode  81 =  KP_3            KP_3            Hex_3   \
+               Ascii_3         KP_3            KP_3    \
+               KP_3            KP_3            Hex_3   \
+               Ascii_3         KP_3            KP_3    \
+               KP_3            KP_3            Hex_3   \
+               Ascii_3         KP_3            KP_3
+keycode  82 =  KP_0            KP_0            Hex_0   \
+               Ascii_0         KP_0            KP_0    \
+               KP_0            KP_0            Hex_0   \
+               Ascii_0         KP_0            KP_0    \
+               KP_0            KP_0            Hex_0   \
+               Ascii_0         KP_0            KP_0
+keycode  83 =  KP_Period       KP_Period       KP_Period       \
+               KP_Period       KP_Period       Boot            \
+               KP_Period       KP_Period       KP_Period       \
+               KP_Period       KP_Period       Boot            \
+               KP_Period       KP_Period       KP_Period       \
+               KP_Period       KP_Period       Boot
+keycode  84 =  Last_Console
+keycode  85 =  VoidSymbol
+keycode  86 =  less            greater         bar             \
+               Meta_less       Meta_greater    Meta_bar        \
+               less            greater         bar             \
+               Meta_less       Meta_greater    Meta_bar        \
+               less            greater         bar             \
+               Meta_less       Meta_greater    Meta_bar
+keycode  87 =  F11             F23             F35             \
+               Console_11      Console_23      Console_11      \
+               F11             F23             F35             \
+               Console_11      Console_23      Console_11      \
+               F11             F23             F35             \
+               Console_11      Console_23      Console_11
+keycode  88 =  F12             F24             F36             \
+               Console_12      Console_24      Console_12      \
+               F12             F24             F36             \
+               Console_12      Console_24      Console_12      \
+               F12             F24             F36             \
+               Console_12      Console_24      Console_12
+keycode  89 =  VoidSymbol
+keycode  90 =  VoidSymbol
+keycode  91 =  VoidSymbol
+keycode  92 =  VoidSymbol
+keycode  93 =  VoidSymbol
+keycode  94 =  VoidSymbol
+keycode  95 =  VoidSymbol
+keycode  96 =  KP_Enter
+keycode  97 =  Control
+keycode  98 =  KP_Divide       KP_Divide       Hex_B           \
+               KP_Divide       KP_Divide       KP_Divide       \
+               KP_Divide       KP_Divide       Hex_B           \
+               KP_Divide       KP_Divide       KP_Divide       \
+               KP_Divide       KP_Divide       Hex_B           \
+               KP_Divide       KP_Divide       KP_Divide
+keycode  99 =  Control_backslash       Control_backslash       Control_backslash       \
+               Meta_Control_backslash  Meta_Control_backslash  Meta_Control_backslash  \
+               Control_backslash       Control_backslash       Control_backslash       \
+               Meta_Control_backslash  Meta_Control_backslash  Meta_Control_backslash  \
+               Control_backslash       Control_backslash       Control_backslash       \
+               Meta_Control_backslash  Meta_Control_backslash  Meta_Control_backslash
+keycode 100 =  Alt
+keycode 101 =  Break
+keycode 102 =  Find
+keycode 103 =  Up              Up              Up      \
+               KeyboardSignal  Up              Up      \
+               Up              Up              Up      \
+               KeyboardSignal  Up              Up      \
+               Up              Up              Up      \
+               KeyboardSignal  Up              Up
+keycode 104 =  Prior           Scroll_Backward Prior   \
+               Prior           Prior           Prior   \
+               Prior           Scroll_Backward Prior   \
+               Prior           Prior           Prior   \
+               Prior           Scroll_Backward Prior   \
+               Prior           Prior           Prior
+keycode 105 =  Left            Left            Left    \
+               Decr_Console    Left            Left    \
+               Left            Left            Left    \
+               Decr_Console    Left            Left    \
+               Left            Left            Left    \
+               Decr_Console    Left            Left
+keycode 106 =  Right           Right           Right   \
+               Incr_Console    Right           Right   \
+               Right           Right           Right   \
+               Incr_Console    Right           Right   \
+               Right           Right           Right   \
+               Incr_Console    Right           Right
+keycode 107 =  Select
+keycode 108 =  Down
+keycode 109 =  Next            Scroll_Forward  Next    \
+               Next            Next            Next    \
+               Next            Scroll_Forward  Next    \
+               Next            Next            Next    \
+               Next            Scroll_Forward  Next    \
+               Next            Next            Next
+keycode 110 =  Insert
+keycode 111 =  Remove          Remove          Remove  \
+               Remove          Remove          Boot    \
+               Remove          Remove          Remove  \
+               Remove          Remove          Boot    \
+               Remove          Remove          Remove  \
+               Remove          Remove          Boot
+keycode 112 =  Macro
+keycode 113 =  F13
+keycode 114 =  F14
+keycode 115 =  Help
+keycode 116 =  Do
+keycode 117 =  F17
+keycode 118 =  KP_MinPlus
+keycode 119 =  Pause
+keycode 120 =  VoidSymbol
+keycode 121 =  VoidSymbol
+keycode 122 =  VoidSymbol
+keycode 123 =  VoidSymbol
+keycode 124 =  VoidSymbol
+keycode 125 =  VoidSymbol
+keycode 126 =  VoidSymbol
+keycode 127 =  VoidSymbol
index f217b4e..6469361 100644 (file)
@@ -1,6 +1,6 @@
 # Russian keyboard layout for Type4/5 Sun keyboards
 # Written by Alexander V. Lukyanov <lav@yars.free.net>
-# Version 1.0
+# Version 1.1
 #
 # Uses KOI8-R coding without 'jo'
 #
diff --git a/data/keymaps/sun/sunt5-uk.map b/data/keymaps/sun/sunt5-uk.map
new file mode 100644 (file)
index 0000000..f217b4e
--- /dev/null
@@ -0,0 +1,383 @@
+# Russian keyboard layout for Type4/5 Sun keyboards
+# Written by Alexander V. Lukyanov <lav@yars.free.net>
+# Version 1.0
+#
+# Uses KOI8-R coding without 'jo'
+#
+keymaps 0-6,8,10,12,14
+keycode   1 =
+keycode   2 =
+keycode   3 =
+keycode   4 =
+keycode   5 = F1
+       shift   keycode   5 = F11
+       alt     keycode   5 = Console_1
+       control alt     keycode   5 = Console_1
+       altgr   shift   keycode   5 = F11
+       altgr   alt     keycode   5 = Console_1
+       altgr   control alt     keycode   5 = Console_1
+keycode   6 = F2
+       shift   keycode   6 = F12
+       alt     keycode   6 = Console_2
+       control alt     keycode   6 = Console_2
+       altgr   shift   keycode   6 = F12
+       altgr   alt     keycode   6 = Console_2
+       altgr   control alt     keycode   6 = Console_2
+keycode   7 = F10
+       shift   keycode   7 = F20
+       alt     keycode   7 = Console_10
+       control alt     keycode   7 = Console_10
+       altgr   shift   keycode   7 = F20
+       altgr   alt     keycode   7 = Console_10
+       altgr   control alt     keycode   7 = Console_10
+keycode   8 = F3
+       shift   keycode   8 = F13
+       alt     keycode   8 = Console_3
+       control alt     keycode   8 = Console_3
+       altgr   shift   keycode   8 = F13
+       altgr   alt     keycode   8 = Console_3
+       altgr   control alt     keycode   8 = Console_3
+keycode   9 = F11
+       alt     keycode   9 = Console_11
+       control alt     keycode   9 = Console_11
+       altgr   alt     keycode   9 = Console_11
+       altgr   control alt     keycode   9 = Console_11
+keycode  10 = F4
+       shift   keycode  10 = F14
+       alt     keycode  10 = Console_4
+       control alt     keycode  10 = Console_4
+       altgr   shift   keycode  10 = F14
+       altgr   alt     keycode  10 = Console_4
+       altgr   control alt     keycode  10 = Console_4
+keycode  11 = F12
+       alt     keycode  11 = Console_12
+       control alt     keycode  11 = Console_12
+       altgr   alt     keycode  11 = Console_12
+       altgr   control alt     keycode  11 = Console_12
+keycode  12 = F5
+       shift   keycode  12 = F15
+       alt     keycode  12 = Console_5
+       control alt     keycode  12 = Console_5
+       altgr   shift   keycode  12 = F15
+       altgr   alt     keycode  12 = Console_5
+       altgr   control alt     keycode  12 = Console_5
+keycode  13 = AltGr_Lock
+keycode  14 = F6
+       shift   keycode  14 = F16
+       alt     keycode  14 = Console_6
+       control alt     keycode  14 = Console_6
+       altgr   shift   keycode  14 = F16
+       altgr   alt     keycode  14 = Console_6
+       altgr   control alt     keycode  14 = Console_6
+keycode  15 =
+keycode  16 = F7
+       shift   keycode  16 = F17
+       alt     keycode  16 = Console_7
+       control alt     keycode  16 = Console_7
+       altgr   shift   keycode  16 = F17
+       altgr   alt     keycode  16 = Console_7
+       altgr   control alt     keycode  16 = Console_7
+keycode  17 = F8
+       shift   keycode  17 = F18
+       alt     keycode  17 = Console_8
+       control alt     keycode  17 = Console_8
+       altgr   shift   keycode  17 = F18
+       altgr   alt     keycode  17 = Console_8
+       altgr   control alt     keycode  18 = Console_8
+keycode  18 = F9
+       shift   keycode  18 = F19
+       alt     keycode  18 = Console_9
+       control alt     keycode  18 = Console_9
+       altgr   shift   keycode  18 = F19
+       altgr   alt     keycode  18 = Console_9
+       altgr   control alt     keycode  18 = Console_9
+keycode  19 = Alt
+keycode  20 = Up
+keycode  21 = Pause
+keycode  22 =
+keycode  23 = Scroll_Lock      Show_Memory      Show_Registers   Show_State
+       alt     keycode  23 = Scroll_Lock
+keycode  24 = Left
+       alt     keycode  24 = Decr_Console
+       altgr   alt     keycode  24 = Decr_Console
+keycode  25 =
+keycode  26 =
+keycode  27 = Down
+keycode  28 = Right
+       alt     keycode  28 = Incr_Console
+       altgr   alt     keycode  28 = Incr_Console
+keycode  29 = Escape
+       alt     keycode  29 = Meta_Escape
+       altgr   alt     keycode  29 = Meta_Escape
+keycode  30 = one              exclam  one     exclam
+       alt     keycode  30 = Meta_one
+       altgr   alt     keycode  30 = Meta_one
+keycode  31 = two              at               two               at
+       control keycode  31 = nul
+       alt     keycode  31 = Meta_two
+       altgr   control keycode  31 = nul
+       altgr   alt     keycode  31 = Meta_two
+keycode  32 = three            numbersign      three   numbersign
+       control keycode  32 = Escape
+       alt     keycode  32 = Meta_three
+       altgr   control keycode  32 = Escape
+       altgr   alt     keycode  32 = Meta_three
+keycode  33 = four             dollar           four   dollar
+       control keycode  33 = Control_backslash
+       alt     keycode  33 = Meta_four
+       altgr   control keycode  33 = Control_backslash
+       altgr   alt     keycode  33 = Meta_four
+keycode  34 = five             percent         five    colon
+       control keycode  34 = Control_bracketright
+       alt     keycode  34 = Meta_five
+       altgr   control keycode  34 = Control_bracketright
+       altgr   alt     keycode  34 = Meta_five
+keycode  35 = six              asciicircum     six     comma
+       control keycode  35 = Control_asciicircum
+       alt     keycode  35 = Meta_six
+       altgr   control keycode  35 = Control_asciicircum
+       altgr   alt     keycode  35 = Meta_six
+keycode  36 = seven            ampersand       seven   period
+       control keycode 36 = Control_underscore
+       alt     keycode  36 = Meta_seven
+       altgr   alt     keycode  36 = Meta_seven
+keycode  37 = eight            asterisk                eight   semicolon
+       control keycode  37 = Delete
+       alt     keycode  37 = Meta_eight
+       altgr   control keycode  37 = Delete
+       altgr   alt     keycode  37 = Meta_eight
+keycode  38 = nine             parenleft       nine    parenleft
+       alt     keycode  38 = Meta_nine
+       altgr   alt     keycode  38 = Meta_nine
+keycode  39 = zero             parenright      zero    parenright
+       alt     keycode  39 = Meta_zero
+       altgr   alt     keycode  39 = Meta_zero
+keycode  40 = minus            underscore       minus  underscore
+       control keycode  40 = Control_underscore
+       alt     keycode  40 = Meta_minus
+       altgr   control keycode  40 = Control_underscore
+       altgr   alt     keycode  40 = Meta_minus
+keycode  41 = equal            plus            equal   plus
+       alt     keycode  41 = Meta_equal
+       altgr   alt     keycode  41 = Meta_equal
+keycode  42 = grave            asciitilde      grave   asciitilde
+       control keycode  42 = nul
+       alt     keycode  42 = Meta_grave
+       altgr   control keycode  42 = nul
+       altgr   alt     keycode  42 = Meta_grave
+keycode  43 = Delete           Delete          Delete  Delete
+       control keycode  43 = BackSpace
+       alt     keycode  43 = Meta_Delete
+       altgr   control keycode  43 = BackSpace
+       altgr   alt     keycode  43 = Meta_Delete
+keycode  44 = Insert
+keycode  45 = equal
+keycode  46 = KP_Divide
+keycode  47 = KP_Multiply
+keycode  48 =
+keycode  49 =
+keycode  50 = KP_Period
+       control alt     keycode  50 = Boot
+       altgr   control alt     keycode  50 = Boot
+keycode  51 =
+keycode  52 = Find
+keycode  53 = Tab              Tab
+       alt     keycode  53 = Meta_Tab
+       altgr   alt     keycode  53 = Meta_Tab
+keycode  54 = q
+       altgr           keycode 54 = +0xCA
+       altgr   shift   keycode 54 = +0xEA
+keycode  55 = w
+       altgr           keycode 55 = +0xC3
+       altgr   shift   keycode 55 = +0xE3
+keycode  56 = e
+       altgr           keycode 56 = +0xD5
+       altgr   shift   keycode 56 = +0xF5
+keycode  57 = r
+       altgr           keycode 57 = +0xCB
+       altgr   shift   keycode 57 = +0xEB
+keycode  58 = t
+       altgr           keycode 58 = +0xC5
+       altgr   shift   keycode 58 = +0xE5
+keycode  59 = y
+       altgr           keycode 59 = +0xCE
+       altgr   shift   keycode 59 = +0xEE
+keycode  60 = u
+       altgr           keycode 60 = +0xC7
+       altgr   shift   keycode 60 = +0xE7
+keycode  61 = i
+       altgr           keycode 61 = +0xDB
+       altgr   shift   keycode 61 = +0xFB
+keycode  62 = o
+       altgr           keycode 62 = +0xDD
+       altgr   shift   keycode 62 = +0xFD
+keycode  63 = p
+       altgr           keycode 63 = +0xDA
+       altgr   shift   keycode 63 = +0xFA
+keycode  64 = bracketleft      braceleft
+       control keycode  64 = Escape
+       alt     keycode  64 = Meta_bracketleft
+       altgr   control keycode  64 = Escape
+       altgr   alt     keycode  64 = Meta_bracketleft
+       altgr           keycode 64 = +0xC8
+       altgr   shift   keycode 64 = +0xE8
+keycode  65 = bracketright     braceright
+       control keycode  65 = Control_bracketright
+       alt     keycode  65 = Meta_bracketright
+       altgr   control keycode  65 = Control_bracketright
+       altgr   alt     keycode  65 = Meta_bracketright
+       altgr           keycode  65 = +0xDF
+       altgr   shift   keycode  65 = +0xFF
+keycode  66 = Remove
+       control alt     keycode  66 = Boot
+       altgr   control alt     keycode  66 = Boot
+keycode  67 =
+keycode  68 = KP_7
+       alt     keycode  68 = Ascii_7
+       altgr   alt     keycode  68 = Ascii_7
+keycode  69 = KP_8
+       alt     keycode  69 = Ascii_8
+       altgr   alt     keycode  69 = Ascii_8
+keycode  70 = KP_9
+       alt     keycode  70 = Ascii_9
+       altgr   alt     keycode  70 = Ascii_9
+keycode  71 = KP_Subtract
+keycode  72 =
+keycode  73 =
+keycode  74 = Select
+keycode  75 =
+keycode  76 = Control
+keycode  77 = a
+       altgr           keycode 77 = +0xC6
+       altgr   shift   keycode 77 = +0xE6
+keycode  78 = s
+       altgr           keycode 78 = +0xD9
+       altgr   shift   keycode 78 = +0xF9
+keycode  79 = d
+       altgr           keycode 79 = +0xD7
+       altgr   shift   keycode 79 = +0xF7
+keycode  80 = f
+       altgr           keycode 80 = +0xC1
+       altgr   shift   keycode 80 = +0xE1
+keycode  81 = g
+       altgr           keycode 81 = +0xD0
+       altgr   shift   keycode 81 = +0xF0
+keycode  82 = h
+       altgr           keycode 82 = +0xD2
+       altgr   shift   keycode 82 = +0xF2
+keycode  83 = j
+       altgr           keycode 83 = +0xCF
+       altgr   shift   keycode 83 = +0xEF
+keycode  84 = k
+       altgr           keycode 84 = +0xCC
+       altgr   shift   keycode 84 = +0xEC
+keycode  85 = l
+       altgr           keycode 85 = +0xC4
+       altgr   shift   keycode 85 = +0xE4
+keycode  86 = semicolon        colon
+       alt     keycode  86 = Meta_semicolon
+       altgr   alt     keycode  86 = Meta_semicolon
+       altgr           keycode 86 = +0xD6
+       altgr   shift   keycode 86 = +0xF6
+keycode  87 = apostrophe       quotedbl
+       control keycode  87 = Control_g
+       alt     keycode  87 = Meta_apostrophe
+       altgr   control keycode  87 = Control_g
+       altgr   alt     keycode  87 = Meta_apostrophe
+       altgr           keycode 87 = +0xDC
+       altgr   shift   keycode 87 = +0xFC
+keycode  88 = backslash        bar     backslash       bar
+       control keycode  88 = Control_backslash
+       alt     keycode  88 = Meta_backslash
+       altgr   control keycode  88 = Control_backslash
+       altgr   alt     keycode  88 = Meta_backslash
+keycode  89 = Return
+       alt     keycode  89 = Meta_Control_m
+       altgr   alt     keycode  89 = Meta_Control_m
+keycode  90 = KP_Enter
+keycode  91 = KP_4
+       alt     keycode  91 = Ascii_4
+       altgr   alt     keycode  91 = Ascii_4
+keycode  92 = KP_5
+       alt     keycode  92 = Ascii_5
+       altgr   alt     keycode  92 = Ascii_5
+keycode  93 = KP_6
+       alt     keycode  93 = Ascii_6
+       altgr   alt     keycode  93 = Ascii_6
+keycode  94 = KP_0
+       alt     keycode  94 = Ascii_0
+       altgr   alt     keycode  94 = Ascii_0
+keycode  95 =
+keycode  96 = Prior
+       shift   keycode  96 = Scroll_Backward
+       altgr   shift   keycode  96 = Scroll_Backward
+keycode  97 =
+keycode  98 = Num_Lock
+keycode  99 = Shift
+keycode 100 = z
+       altgr           keycode 100 = +0xD1
+       altgr   shift   keycode 100 = +0xF1
+keycode 101 = x
+       altgr           keycode 101 = +0xDE
+       altgr   shift   keycode 101 = +0xFE
+keycode 102 = c
+       altgr           keycode 102 = +0xD3
+       altgr   shift   keycode 102 = +0xF3
+keycode 103 = v
+       altgr           keycode 103 = +0xCD
+       altgr   shift   keycode 103 = +0xED
+keycode 104 = b
+       altgr           keycode 104 = +0xC9
+       altgr   shift   keycode 104 = +0xE9
+keycode 105 = n
+       altgr           keycode 105 = +0xD4
+       altgr   shift   keycode 105 = +0xF4
+keycode 106 = m
+       altgr           keycode 106 = +0xD8
+       altgr   shift   keycode 106 = +0xF8
+keycode 107 = comma            less
+       alt     keycode 107 = Meta_comma
+       altgr   alt     keycode 107 = Meta_comma
+       altgr           keycode 107 = +0xC2
+       altgr   shift   keycode 107 = +0xE2
+keycode 108 = period           greater
+#      control keycode 108 = Compose
+       alt     keycode 108 = Meta_period
+       altgr   alt     keycode 108 = Meta_period
+       altgr           keycode 108 = +0xC0
+       altgr   shift   keycode 108 = +0xE0
+keycode 109 = slash    question        slash   question
+       control keycode 109 = Delete
+       alt     keycode 109 = Meta_slash
+       altgr   control keycode 109 = Delete
+       altgr   alt     keycode 109 = Meta_slash
+keycode 110 = Shift
+keycode 111 = Linefeed
+keycode 112 = KP_1
+       alt     keycode 112 = Ascii_1
+       altgr   alt     keycode 112 = Ascii_1
+keycode 113 = KP_2
+       alt     keycode 113 = Ascii_2
+       altgr   alt     keycode 113 = Ascii_2
+keycode 114 = KP_3
+       alt     keycode 114 = Ascii_3
+       altgr   alt     keycode 114 = Ascii_3
+keycode 115 =
+keycode 116 =
+keycode 117 =
+keycode 118 = Help
+keycode 119 = Caps_Lock
+keycode 120 =
+keycode 121 = space
+       control keycode 121 = nul
+       alt     keycode 121 = Meta_space
+       altgr   control keycode 121 = nul
+       altgr   alt     keycode 121 = Meta_space
+keycode 122 =
+keycode 123 = Next
+       shift   keycode 123 = Scroll_Forward
+       altgr   shift   keycode 123 = Scroll_Forward
+keycode 124 =
+keycode 125 = KP_Add
+keycode 126 =
+keycode 127 =
index b9adbe2..59347b8 100644 (file)
@@ -1,7 +1,7 @@
 # fontpositions 0-95: positions 160-255 in ISO 8859-7 (Greek)\r
 0x000  U+00A0  # NO-BREAK SPACE\r
-0x001  U+2018  # LEFT SINGLE QUOTATION MARK\r
-0x002  U+2019  # RIGHT SINGLE QUOTATION MARK\r
+0x001  U+2018 U+02BD   # LEFT SINGLE QUOTATION MARK\r
+0x002  U+2019 U+02BC   # RIGHT SINGLE QUOTATION MARK\r
 0x003  U+00A3  # POUND SIGN\r
 0x006  U+00A6  # BROKEN BAR\r
 0x007  U+00A7  # SECTION SIGN\r
index 078b91b..c121f83 100644 (file)
@@ -27,13 +27,45 @@ have two keycodes: the former has keycode 84 when Alt is pressed
 simultaneously, and keycode 99 otherwise; the latter has keycode
 101 when Ctrl is pressed simultaneously, and keycode 119 otherwise.
 (Thus, it makes no sense to bind functions to Alt keycode 99 or
-Ctrl keycode 119.)
+Ctrl keycode 119.) The Pause/Break key is also special in another way:
+it does not generate key-up scancodes, but generates the entire
+6-scancode sequence on key-down.
 <P>If you have strange keys, that do not generate any code under Linux
 (or generate messages like "unrecognized scancode"), and your kernel
 is 1.1.63 or later, then you can use setkeycodes(1) to tell the kernel
-about them. They won't work under X, however.
-Once they have gotten a keycode from <CODE>setkeycodes</CODE>, they can be assigned
-a function by <CODE>loadkeys</CODE>.
+about them. Once they have gotten a keycode from <CODE>setkeycodes</CODE>,
+they can be assigned a function by <CODE>loadkeys</CODE>.
+<P>For example, using <CODE>showkey -s</CODE> one sees that Microsoft keyboards
+use the scancode sequences (in hexadecimal) e0 5b (left Windows key),
+e0 5c (right Windows key), e0 5d (Menu key).
+Microsoft Internet keyboard also uses e0 6a (Back), e0 69 (Forward),
+e0 68 (Stop), e0 6c (Mail), e0 65 (Search), e0 66 (Favorites),
+e0 32 (Web/Home), e0 6b (My Computer), e0 21 (Calculator), e0 5f (Sleep).
+Use <CODE>dumpkeys</CODE> to see what keycodes are still unused.
+Typically values like 89-95 and 112-118 and 120-127 are free.
+Now
+<BLOCKQUOTE><CODE>
+<PRE>
+        % setkeycodes e05b 125
+        % setkeycodes e05c 126
+        % setkeycodes e05d 127
+</PRE>
+</CODE></BLOCKQUOTE>
+
+assigns keycodes to these scancode sequences, and
+<BLOCKQUOTE><CODE>
+<PRE>
+        % loadkeys
+        keycode 125 = Decr_Console
+        keycode 126 = Incr_Console
+        keycode 127 = KeyboardSignal
+        %
+</PRE>
+</CODE></BLOCKQUOTE>
+
+would make these Windows keys go to the previous or next virtual console,
+and let the Menu key create a fresh virtual console (in case you have
+something like <CODE>spawn_console</CODE> running).
 <P>
 <HR>
 <A HREF="kbd.FAQ-15.html">Next</A>
index 227823f..8aecfb9 100644 (file)
@@ -1370,14 +1370,41 @@ have two keycodes: the former has keycode 84 when Alt is pressed
 simultaneously, and keycode 99 otherwise; the latter has keycode
 101 when Ctrl is pressed simultaneously, and keycode 119 otherwise.
 (Thus, it makes no sense to bind functions to Alt keycode 99 or
-Ctrl keycode 119.)
+Ctrl keycode 119.) The Pause/Break key is also special in another way:
+it does not generate key-up scancodes, but generates the entire
+6-scancode sequence on key-down.
 
 If you have strange keys, that do not generate any code under Linux
 (or generate messages like "unrecognized scancode"), and your kernel
 is 1.1.63 or later, then you can use setkeycodes(1) to tell the kernel
-about them. They won't work under X, however.
-Once they have gotten a keycode from <tt/setkeycodes/, they can be assigned
-a function by <tt/loadkeys/.
+about them. Once they have gotten a keycode from <tt/setkeycodes/,
+they can be assigned a function by <tt/loadkeys/.
+
+For example, using <tt/showkey -s/ one sees that Microsoft keyboards
+use the scancode sequences (in hexadecimal) e0 5b (left Windows key),
+e0 5c (right Windows key), e0 5d (Menu key).
+Microsoft Internet keyboard also uses e0 6a (Back), e0 69 (Forward),
+e0 68 (Stop), e0 6c (Mail), e0 65 (Search), e0 66 (Favorites),
+e0 32 (Web/Home), e0 6b (My Computer), e0 21 (Calculator), e0 5f (Sleep).
+Use <tt>dumpkeys</tt> to see what keycodes are still unused.
+Typically values like 89-95 and 112-118 and 120-127 are free.
+Now
+<tscreen><verb>
+       % setkeycodes e05b 125
+       % setkeycodes e05c 126
+       % setkeycodes e05d 127
+</verb></tscreen>
+assigns keycodes to these scancode sequences, and
+<tscreen><verb>
+       % loadkeys
+       keycode 125 = Decr_Console
+       keycode 126 = Incr_Console
+       keycode 127 = KeyboardSignal
+       %
+</verb></tscreen>
+would make these Windows keys go to the previous or next virtual console,
+and let the Menu key create a fresh virtual console (in case you have
+something like <tt/spawn_console/ running).
 
 <sect>Examples of use of loadkeys and xmodmap<p>
 <nidx>loadkeys!example using</nidx>
diff --git a/doc/repeat/set_kbd_repeat-2 b/doc/repeat/set_kbd_repeat-2
new file mode 100644 (file)
index 0000000..7fc6f91
--- /dev/null
@@ -0,0 +1,34 @@
+Date:   Wed, 21 Jul 1999 23:34:05 -0700
+From: Marc Merlin <marc_news@merlins.org>
+Cc: linux-kernel@vger.rutgers.edu, Larry Augustin <lma@valinux.com>
+
+There is an issue with setup.S:
+! Set the keyboard repeat rate to the max
+        mov     ax,#0x0305
+        xor     bx,bx           ! clear bx
+        int     0x16
+
+Those lines  are not really  needed but they cause  a problem on  some (very
+few) systems where every other boot (or so) the keyboard won't be found (and
+has to be plugged/unplugged before it re-appears).
+It happens to affect  some of the Pentium Pro systems  that VA Linux Systems
+used to sell.
+Larry Augustin  (CEO VA)  found that  removing those  three lines  fixes the
+problem and VA has been shipping kernels with them disabled for at least two
+years without any adverse effects.
+The patch  actually got in  the 2.0.31pre series  (by David Miller)  but got
+dropped/lost when David gave up.
+
+More details from Larry:
+
+----- Forwarded message from Larry Augustin <lma@valinux.com> -----
+From: Larry Augustin <lma@valinux.com>
+
+Specifically,  we had  the  problem  on Intel  Venus  (VS440FX) Pentium  Pro
+systems.   I have  a feeling  the  problem could  be traced  to a  Keytronic
+keyboard BIOS bug, but I never tracked it down.
+
+Interesting enough, that was one of the patches david miller had in the code
+base that got dropped when he quit doing 2.0 maintenance releases.
+
+Larry
diff --git a/doc/scancodes/scancodes-1.html b/doc/scancodes/scancodes-1.html
new file mode 100644 (file)
index 0000000..6b4781d
--- /dev/null
@@ -0,0 +1,239 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
+ <TITLE>Keyboard scancodes: Ordinary PC keyboards</TITLE>
+ <LINK HREF="scancodes-2.html" REL=next>
+
+ <LINK HREF="scancodes.html#toc1" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="scancodes-2.html">Next</A>
+Previous
+<A HREF="scancodes.html#toc1">Contents</A>
+<HR>
+<H2><A NAME="s1">1. Ordinary PC keyboards</A></H2>
+
+<P>The data from a keyboard comes mainly in the form of scancodes,
+produced by key presses or used in the protocol with the computer.
+(Different codes are used by the keyboard firmware internally,
+and there also exist several
+<A HREF="#scancode_modes">sets of scancodes</A>. Here, for the
+time being, we only give the default codes - those from scancode set 2.)
+Each key press and key release produces between 0 and 6 scancodes.
+<P>
+<H2><A NAME="ss1.1">1.1 Key release</A>
+</H2>
+
+<P>Below I'll only mention the scancode for key press (`make').
+The scancode for key release (`break') is obtained from it
+by setting the high order bit (adding 0x80 = 128).
+Thus, Esc press produces scancode <B>01</B>, Esc release
+scancode <B>81</B> (hex).
+For sequences things are similar: Keypad-/ gives <B>e0</B> <B>35</B>
+when pressed, <B>e0</B> <B>b5</B> when released. Most keyboards will
+repeat the make code (key down code) when the key repeats. Some will also
+fake Shift down and Shift up events during the repeat.
+<P>The keys PrtSc/SysRq and Pause/Break are special.
+The former produces scancode <B>e0</B> <B>2a</B> <B>e0</B> <B>37</B>
+when no modifier key is pressed simultaneously, <B>e0</B> <B>37</B>
+together with Shift or Ctrl, but <B>54</B> together with (left or right) Alt.
+The latter produces scancode sequence
+<B>e1</B> <B>1d</B> <B>45</B> <B>e1</B> <B>9d</B> <B>c5</B>
+when pressed (without modifier) and nothing at all upon release.
+However, together with (left or right) Ctrl, one gets
+<B>e0</B> <B>46</B> <B>e0</B> <B>c6</B>,
+and again nothing at release. It does not repeat.
+<P>
+<P>
+<H2><A NAME="ss1.2">1.2 Protocol scancodes</A>
+</H2>
+
+<P>Most scancodes indicate a key press or release.
+Some are used in the communication protocol.
+<P><B>00</B> (Keyboard buffer overflow or parity error)
+<P><B>aa</B> (BAT [Basic Assurance Test] OK)
+<P><B>ee</B> (Result of echo command)
+<P><B>f1</B> (Some keyboards, as reply to command <B>a4</B>:
+Password not installed)
+<P><B>fa</B> (Ack)
+<P><B>fc</B> (BAT error or Mouse transmit error)
+<P><B>fe</B> (Keyboard fails to ack, please resend)
+<P><B>ff</B> (Keyboard parity error)
+<P>
+<H2><A NAME="ss1.3">1.3 Escape scancodes</A>
+</H2>
+
+<P>The codes <B>e0</B> and <B>e1</B> introduce scancode sequences,
+and are not usually used as isolated scancodes themselves
+(but see 
+<A HREF="scancodes-2.html#e0_as_key">below</A>).
+<P>This, and the above, means that scancodes
+<B>00</B>, <B>60</B>, <B>61</B>, <B>6e</B>, <B>71</B>,
+<B>7a</B>, <B>7c</B>, <B>7e</B>, <B>7f</B>
+are unavailable to signify key presses (on a default keyboard;
+we'll see keyboards that actually use scancode <B>60</B>).
+<P>Also other prefixes occur, see 
+<A HREF="scancodes-2.html#prefix_80">below</A>.
+<P>
+<H2><A NAME="ss1.4">1.4 Ordinary scancodes</A>
+</H2>
+
+<P>The scancodes in scancode set 2 are given in hex.
+Between parentheses the keycap on a US keyboard.
+The scancodes are given in order, grouped according
+to groups of keys that are usually found next to each other.
+<P><B>00</B> is normally an error code
+<P><B>01</B> (Esc)
+<P><B>02</B> (1!), <B>03</B> (2@), <B>04</B> (3#), <B>05</B> (4$),
+<B>06</B> (5%E), <B>07</B> (6^), <B>08</B> (7&amp;),
+<B>09</B> (8*), <B>0a</B> (9(), <B>0b</B> (0)), <B>0c</B> (-_),
+<B>0d</B> (=+), <B>0e</B> (Backspace)
+<P><B>0f</B> (Tab), <B>10</B> (Q), <B>11</B> (W), <B>12</B> (E),
+<B>13</B> (R), <B>14</B> (T), <B>15</B> (Y),
+<B>16</B> (U), <B>17</B> (I), <B>18</B> (O),
+<B>19</B> (P), <B>1a</B> ([{), <B>1b</B> (]})
+<P><B>1c</B> (Enter)
+<P><B>1d</B> (LCtrl)
+<P><B>1e</B> (A), <B>1f</B> (S), <B>20</B> (D), <B>21</B> (F),
+<B>22</B> (G), <B>23</B> (H), <B>24</B> (J), <B>25</B> (K),
+<B>26</B> (L), <B>27</B> (;:), <B>28</B> ('")
+<P><B>29</B> (`~)
+<P><B>2a</B> (LShift)
+<P><B>2b</B> (\|), on a 102-key keyboard
+<P><B>2c</B> (Z), <B>2d</B> (X), <B>2e</B> (C), <B>2f</B> (V),
+<B>30</B> (B), <B>31</B> (N), <B>32</B> (M), <B>33</B> (,&lt;),
+<B>34</B> (.&gt;), <B>35</B> (/?), <B>36</B> (RShift)
+<P><B>37</B> (Keypad-*) or (*/PrtScn) on a 83/84-key keyboard
+<P><B>38</B> (LAlt), <B>39</B> (Space bar),
+<P><B>3a</B> (CapsLock)
+<P><B>3b</B> (F1), <B>3c</B> (F2), <B>3d</B> (F3), <B>3e</B> (F4),
+<B>3f</B> (F5), <B>40</B> (F6), <B>41</B> (F7),
+<B>42</B> (F8), <B>43</B> (F9), <B>44</B> (F10)
+<P><B>45</B> (NumLock)
+<P><B>46</B> (ScrollLock)
+<P><B>47</B> (Keypad-7/Home), <B>48</B> (Keypad-8/Up),
+<B>49</B> (Keypad-9/PgUp)
+<P><B>4a</B> (Keypad--)
+<P><B>4b</B> (Keypad-4/Left), <B>4c</B> (Keypad-5),
+<B>4d</B> (Keypad-6/Right), <B>4e</B> (Keypad-+)
+<P><B>4f</B> (Keypad-1/End), <B>50</B> (Keypad-2/Down),
+<B>51</B> (Keypad-3/PgDn)
+<P><B>52</B> (Keypad-0/Ins), <B>53</B> (Keypad-./Del)
+<P><B>54</B> (Alt-SysRq) on a 84+ key keyboard
+<P><B>55</B> is less common; occurs as PF1 on a Focus 9000 keyboard,
+and as FN on an IBM ThinkPad.
+<P><B>56</B> mostly on non-US keyboards. It is an unlabelled key
+next to the space bar on a Toshiba notebook.
+<P><B>57</B> (F11), <B>58</B> (F12) both on a 101+ key keyboard
+<P><B>59</B>-<B>5a</B>-...-<B>7f</B> are less common.
+Scancodes <B>59</B>-<B>5c</B> occur on the RC930 keyboard.
+X calls <B>5d</B> `KEY_Begin'.
+Scancodes <B>55</B>, <B>6d</B>, <B>6f</B>, <B>73</B>, <B>74</B>,
+<B>77</B>, <B>78</B>, <B>79</B>, <B>7a</B>, <B>7b</B>,
+<B>7c</B>, <B>7e</B> occur on the Focus 9000 keyboard.
+Scancodes <B>73</B>, <B>7d</B> occur on a Japanese 86/106 keyboard.
+<P>
+<P>
+<H2><A NAME="ss1.5">1.5 Escaped scancodes</A>
+</H2>
+
+<P>Apart from the Pause/Break key that has an escaped sequence starting
+with <B>e1</B>, the escape used is <B>e0</B>. Often, the codes
+are chosen in such a way that something meaningful happens when
+the receiver just discards the <B>e0</B>.
+<P><B>e0</B> <B>1c</B> (Keypad Enter) - <B>1c</B> (Enter)
+<P><B>e0</B> <B>1d</B> (RCtrl) - <B>1d</B> (LCtrl)
+<P><B>e0</B> <B>2a</B> (fake LShift) - <B>2a</B> (LShift)
+<P><B>e0</B> <B>35</B> (Keypad-/) - <B>35</B> (/?)
+<P><B>e0</B> <B>36</B> (fake RShift) - <B>36</B> (RShift)
+<P><B>e0</B> <B>37</B> (Ctrl-PrtScn) - <B>37</B> (*/PrtScn)
+<P><B>e0</B> <B>38</B> (RAlt) - <B>38</B> (LAlt)
+<P><B>e0</B> <B>46</B> (Ctrl-Break) - <B>46</B> (ScrollLock)
+<P><B>e0</B> <B>47</B> (Grey Home) - <B>47</B> (Keypad-7/Home)
+<P><B>e0</B> <B>48</B> (Grey Up) - <B>48</B> (Keypad-8/UpArrow)
+<P><B>e0</B> <B>49</B> (Grey PgUp) - <B>49</B> (Keypad-9/PgUp)
+<P><B>e0</B> <B>4b</B> (Grey Left) - <B>4b</B> (Keypad-4/Left)
+<P><B>e0</B> <B>4d</B> (Grey Right) - <B>4d</B> (Keypad-6/Right)
+<P><B>e0</B> <B>4f</B> (Grey End) - <B>4f</B> (Keypad-1/End)
+<P><B>e0</B> <B>50</B> (Grey Down) - <B>50</B> (Keypad-2/DownArrow)
+<P><B>e0</B> <B>51</B> (Grey PgDn) - <B>51</B> (Keypad-3/PgDn)
+<P><B>e0</B> <B>52</B> (Grey Insert) - <B>52</B> (Keypad-0/Ins)
+<P><B>e0</B> <B>53</B> (Grey Delete) - <B>53</B> (Keypad-./Del)
+<P>These escaped scancodes occur only on 101+ key keyboards.
+<P>
+<H2><A NAME="ss1.6">1.6 Fake shifts</A>
+</H2>
+
+<P>The ten grey keys Insert, Home, PgUp, Delete, End, PgDn,
+Up, Left, Down, Right are supposed to function regardless
+of the state of Shift and NumLock keys. But for an old AT keyboard
+the keypad keys would produce digits when Numlock was on or Shift
+was down. Therefore, in order to fool old programs,
+fake scancodes are sent: when LShift is down, and Insert is
+pressed, <B>e0</B> <B>aa</B> <B>e0</B> <B>52</B> is sent;
+upon release of Insert <B>e0</B> <B>d2</B> <B>e0</B> <B>2a</B>
+is sent. In other words, a fake LShift-up and
+fake LShift-down are inserted.
+<P>If the Shift key is released earlier than the repeated key,
+then a real Shift-up code occurs (without preceding fake Shift-down)
+so that a program ignoring <B>e0</B> would see one more Shift-up
+than Shift-down.
+<P>When NumLock is on, no fake Shifts are sent when Shift was down,
+but fake Shifts are sent when Shift was not down. Thus,
+with Numlock, if Insert is pressed,
+<B>e0</B> <B>2a</B> <B>e0</B> <B>52</B> is sent
+and upon release <B>e0</B> <B>d2</B> <B>e0</B> <B>aa</B> is sent.
+The keyboard maintains a private NumLock mode, toggled when
+NumLock is pressed, and set when the NumLock LED is set.
+<P>In the same way, when Shift is down, the Grey-/ key produces
+fake Shift-up and fake Shift-down sequences. However, it does
+not react to the state of NumLock. The purpose of course is to
+fool programs that identify Grey-/ with ordinary /, so that they
+don't treat Shift-Grey-/ like Shift-/, i.e., ?.
+<P>On a Toshiba notebook, the three Windows keys are treated like
+the group of ten keys mentioned, and get fake shifts when
+(left or right) Shift is down. Thet do not react to NumLock.
+<P>
+<H2><A NAME="ss1.7">1.7 Turbo Mode</A>
+</H2>
+
+<P>On some motherboards the LCtrl-LAlt-GreyPlus and LCtrl-LAlt-GreyMinus
+switch Turbo mode on/off, respectively. For these, the motherboard
+may generate the same scancode sequence when the Turbo button is
+pushed: Turbo Switch (High->Low):
+<B>1d</B> <B>38</B> <B>4a</B> <B>ce</B> <B>b8</B> <B>9d</B>
+and Turbo Switch (Low->High):
+<B>1d</B> <B>38</B> <B>4e</B> <B>ce</B> <B>b8</B> <B>9d</B>.
+<P>Other peculiar combinations in this style include
+LCtrl-LAlt-LShift-GreyMinus to turn off system cache.
+<P>Thio Yu Jin &lt;jin@singmail.com&gt; complains that on his Toshiba 4010CDS
+the Ctrl-Alt-Shift-T key combination brings up the Toshiba user manual.
+(04 Mar 1999 - not April 1.)
+<P>
+<P>
+<H2><A NAME="scancode_modes"></A> <A NAME="ss1.8">1.8 Scancode modes</A>
+</H2>
+
+<P>The usual PC keyboards are capable of producing three
+sets of scancodes. Writing 0xf0 followed by 1, 2 or 3 to port
+0x60 will put the keyboard in scancode mode 1, 2 or 3. Writing
+0xf0 followed by 0 queries the mode, resulting in a scancode
+byte 0x43, 0x41 or 0x3f from the keyboard.
+<P>Scancode mode 2 is the default. In this mode, a key press
+usually produces a value <I>s</I> in the range 0x01-0x5f and the
+corresponding key release produces <I>s</I>+0x80. In scancode
+mode 3, the only key releases that produce a scan code are of
+either Shift key, or of the left Ctrl and Alt keys; for all
+other keys only the key presses are noted. The produced
+scancodes are mostly equal to those for scancode mode 2.
+<P>In scancode mode 1 most key releases produce the same values as
+in scancode mode 2, but for key presses there are entirely
+different, unrelated values. The details are somewhat messy.
+<P>
+<HR>
+<A HREF="scancodes-2.html">Next</A>
+Previous
+<A HREF="scancodes.html#toc1">Contents</A>
+</BODY>
+</HTML>
diff --git a/doc/scancodes/scancodes-2.html b/doc/scancodes/scancodes-2.html
new file mode 100644 (file)
index 0000000..79280df
--- /dev/null
@@ -0,0 +1,349 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
+ <TITLE>Keyboard scancodes: Special keyboards</TITLE>
+ <LINK HREF="scancodes-3.html" REL=next>
+ <LINK HREF="scancodes-1.html" REL=previous>
+ <LINK HREF="scancodes.html#toc2" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="scancodes-3.html">Next</A>
+<A HREF="scancodes-1.html">Previous</A>
+<A HREF="scancodes.html#toc2">Contents</A>
+<HR>
+<H2><A NAME="s2">2. Special keyboards</A></H2>
+
+<P>
+<P>
+<H2><A NAME="ss2.1">2.1 Focus KeyPro FK-9000 keyboard</A>
+</H2>
+
+<P>Raul D. Miller &lt;rockwell@nova.umd.edu&gt;
+and &lt;hagmanti@cps.msu.edu&gt; report:
+<P><I>The keyboard is a KeyPro FK-9000.  The FCC label says it's made in
+Taiwan by Focus Electronic Co, Ltd.  It has a built-in calculator.</I>
+<P><I>This keyboard has twelve additional keys, with scancodes</I>
+<B>55</B> (PF1),
+<B>6d</B> (PF11),
+<B>6f</B> (PF12),
+<B>73</B> (PF2),
+<B>74</B> (PF9),
+<B>77</B> (PF3),
+<B>78</B> (PF4),
+<B>79</B> (PF5),
+<B>7a</B>* (PF6),
+<B>7b</B> (PF7),
+<B>7c</B> (PF8),
+<B>7e</B>* (PF10).
+<P><I>The break codes equal the make codes ORed with 0x80, as always,
+but the Linux kernel eats <B>fa</B> and <B>fe</B> as
+protocol bytes.</I>
+<P><I>The behavior of these keys is different from that of normal keys--
+they generate nothing when pressed; then generate the above scancodes
+at the normal repeat time and rate, and then generate (except for the
+starred ones) their scancode ORed with 0x80 when released...</I>
+<P><I>These PF keys are reprogrammable -- and programming occurs as a sequence
+of keyboard actions.  Therefore, the PF keys duplicate whatever
+keyboard actions occurred during their programming.
+You hit the "Prog" key, then the PF key you want to program; type the
+string you want to store in the key (it's limited to 14 keypresses),
+and then hit the PF key again. After that, when you hit the PF key,
+it sends the string, and generates its own abnormal scancode upon
+release. When the key is held down, it generates the scancode repeatedly,
+but does not generate the string stored in it repeatedly.</I>
+<P><I>When you go to program a key, the scancodes for "PF##-" are sent
+to the computer, then the scancodes for each key you hit as you
+hit it (the shift, etc. keys are an exception-- they send "s-"
+and such :), and then, when you hit the PF## key again to end the
+programming, it sends a sequence of (at least) 18 "0e 8e"s --
+Backspaces...</I>
+<P><I>The program key itself doesn't generate a scancode at any time.
+The same applies to the CE and AC/ON keys (part of the calculator).
+There is a switch to change between calculator and keyboard mode
+which generates no scancodes.</I>
+<P><I>When the keyboard is in calculator mode, the entire numeric
+keypad (and everything else on the right side) generates no
+scancodes.</I>
+<P><I>When the keyboard is not in caluclator mode, the %, MC, MR, M-,
+M+, and Square Root keys all generate 0xff when pressed,
+0xff to repeat, and 0xff on release.</I>
+<P><I>The little unlabeled key between the right Ctrl and right Alt
+generates <B>56</B> when hit, repeats that, and then <B>d6</B>
+when released, just like a normal key.</I>
+<P>
+<P>
+<H2><A NAME="ss2.2">2.2 BTC keyboard</A>
+</H2>
+
+<P>This keyboard has one additional key, with escaped scancode
+<B>e0</B> <B>6f</B> (Macro).
+<P>
+<H2><A NAME="ss2.3">2.3 LK450 keyboard</A>
+</H2>
+
+<P>This keyboard has six additional keys, with escaped scancodes
+<B>e0</B> <B>3d</B> (F13),
+<B>e0</B> <B>3e</B> (F14),
+<B>e0</B> <B>3f</B> (Help),
+<B>e0</B> <B>40</B> (Do),
+<B>e0</B> <B>41</B> (F17),
+<B>e0</B> <B>4e</B> (Keypad-minplus).
+<P>
+<H2><A NAME="ss2.4">2.4 OmniKey keyboard</A>
+</H2>
+
+<P>This keyboard has one additional key, with escaped scancode
+<B>e0</B> <B>4c</B> (Omni).
+<P>
+<H2><A NAME="ss2.5">2.5 GRiD 2260 keyboard</A>
+</H2>
+
+<P>The GRiD 2260 notebook has a key producing the
+<B>6c</B> scancode; I do not know the keycap.
+<P>
+<H2><A NAME="ss2.6">2.6 A Japanese 86/106 keyboard</A>
+</H2>
+
+<P>Barry Yip &lt;g609296@cc.win.or.jp&gt; reports:
+<P><I>This keyboard has two additional keys, with scancodes
+<B>73</B> (\-) and <B>7d</B> (\|).
+This kind of keyboard is rather standard in Japan. They are called 106
+keyboard. Mine is a notebook so it is 86 keyboard. No specific brand
+name.</I>
+<P>
+<H2><A NAME="ss2.7">2.7 Brazilian keyboard</A>
+</H2>
+
+<P>Arnaldo Moura &lt;lumbago@vnet.ibm.com&gt; reports:
+<P><I>This keyboard has two unusual keys, with scancodes
+<B>73</B> (/?) and <B>7e</B> (Keypad-.).</I>
+<P>Also others mention an ABNT keyboard with <B>73</B> and
+<B>7e</B> keys, mostly because these keys do not function
+with Windows NT 4.0.
+<P>ABNT (Associação Brasileira de Normas Tecnicas) and ABNT2
+are Brazilian keyboard layout standards. The plain Brazilian
+keyboard has 103 keys. I find an ABNT 107 key keyboard announced by
+<A HREF="http://www.gertec.com.br/tecpc1.htm">gertec</A>.
+with Suspend / Wake-up / Power power management keys.
+<I>For enabling these functions, run BIOS setup.</I>
+<P>
+<H2><A NAME="ss2.8">2.8 RC930 keyboard</A>
+</H2>
+
+<P>Torben Fjerdingstad &lt;tfj@olivia.ping.dk&gt; reports:
+<P><I>It's an rc930 keyboard, from Regnecentralen/RC International, Now ICL.
+This keyboard has four additional keys, with scancodes</I>
+<B>59</B> (A1),
+<B>5a</B> (A2),
+<B>5b</B> (A3),
+<B>5c</B> (A4).
+<P><I>The rc930/rc931 keyboards are not made anymore, because they had a
+problem with fast typists, writing over 400 chars/minute.
+Writing 'af&lt;space&gt;', very, very fast, did a PgUp.</I>
+<P>
+<H2><A NAME="prefix_80"></A> <A NAME="ss2.9">2.9 Tandberg Data keyboard</A>
+</H2>
+
+<P>Kjetil Torgrim Homme &lt;kjetilho@ifi.uio.no&gt; reports:
+<P><I>My Tandberg Data keyboard uses the prefix <B>80</B> for
+its numerous (20) extra keys. The <B>80</B> scancodes are:</I>
+<P><B>11</B>, <B>12</B>, <B>13</B>, <B>14</B>, <B>16</B>,
+<B>17</B>, <B>18</B>, <B>19</B>, <B>1e</B>, <B>1f</B>,
+<B>20</B>, <B>21</B>, <B>22</B>, <B>23</B>, <B>25</B>,
+<B>26</B>, <B>2f</B>, <B>30</B>, <B>32</B>, <B>56</B>.
+<P><I>For completeness, the <B>e0</B> scancodes:</I>
+<P><B>1c</B>, <B>2a</B>, <B>35</B>, <B>37</B>, <B>47</B>,
+<B>48</B>, <B>49</B>, <B>4b</B>, <B>4d</B>, <B>4f</B>,
+<B>50</B>, <B>51</B>, <B>52</B>, <B>53</B>.
+<P><I>The <B>e1</B> scancode: <B>1d</B>.
+As you can see, there is no overlap on this keyboard.</I>
+<P>
+<H2><A NAME="ss2.10">2.10 A keyboard</A>
+</H2>
+
+<P><I>Three unusual power keys: <B>e0</B> <B>5e</B>,
+<B>e0</B> <B>5f</B>, <B>e0</B> <B>63</B>.</I>
+<P>
+<H2><A NAME="ss2.11">2.11 Microsoft Natural keyboard</A>
+</H2>
+
+<P>This keyboard has three additional keys, with escaped scancodes
+<B>e0</B> <B>5b</B> (LeftWindow),
+<B>e0</B> <B>5c</B> (RightWindow),
+<B>e0</B> <B>5d</B> (Menu).
+<P>
+<H2><A NAME="ss2.12">2.12 Microsoft Internet keyboard</A>
+</H2>
+
+<P>In addition to the three extra keys on the Microsoft Natural keyboard,
+this keyboard has ten keys, with escaped scancodes
+<B>e0</B> <B>21</B> (Calculator),
+<B>e0</B> <B>32</B> (Web/Home),
+<B>e0</B> <B>5f</B> (Sleep),
+<B>e0</B> <B>65</B> (Search),
+<B>e0</B> <B>66</B> (Favorites),
+<B>e0</B> <B>68</B> (Stop),
+<B>e0</B> <B>69</B> (Forward),
+<B>e0</B> <B>6a</B> (Back),
+<B>e0</B> <B>6b</B> (My Computer),
+<B>e0</B> <B>6c</B> (Mail).
+<P>
+<H2><A NAME="ss2.13">2.13 Logitech Internet keyboard</A>
+</H2>
+
+<P>Jonathan DeBoer &lt;deboer@ugrad.cs.ualberta.ca&gt;
+reports Key-down and key-up scancodes for a Logitech Internet keyboard.
+<P> 0xe0 0x7a 0xe0 0xfa
+<P> 0xe0 0x32 0xe0 0xb2
+<P> 0xe0 0x21 0xe0 0xa1
+<P> 0xe0 0x23 0xe0 0xa3
+<P> 0x38 0x2a 0x0f 0x8f 0x8f 0xb8 0xaa
+<P> 0xe0 0x17 0xe0 0x97
+<P> 0xe0 0x10 0xe0 0x90
+<P> 0xe0 0x22 0xe0 0xa2
+<P> 0xe0 0x24 0xe0 0xa4
+<P> 0xe0 0x19 0xe0 0x99
+<P> 0xe0 0x1e 0xe0 0x9e
+<P> 0xe0 0x12 0xe0 0x92
+<P> 0xe0 0x26 0xe0 0xa6
+<P> 0xe0 0x18 0xe0 0x98
+<P> 0xe0 0x20 0xe0 0xa0
+<P> 0xe0 0x30 0xe0 0xb0
+<P> 0xe0 0x2e 0xe0 0xae
+<P> 0xe0 0x25 0xe0 0xa5
+<P> (But I have no keycap information.)
+<P>
+<H2><A NAME="e0_as_key"></A> <A NAME="ss2.14">2.14 A keyboard using e0 as ordinary scancode</A>
+</H2>
+
+<P>Benjamin Carter &lt;bcarter@ultra5.cs.umr.edu&gt; reports:
+<P><I>I recently came into possession of a 97-key keyboard with Japanese
+markings on the keys.  (The keys also have the standard
+qwerty-characters on them, with the exception of some of the meta-keys
+(there are 3 keys near the Alt keys on either side of the spacebar with
+only Japanese characters on them so I don't know what they are).
+In any case, the keyboard sends out scancodes that work for all the main
+keys (backspace, letters and numbers, enter, shift), but the numeric
+keypad, Alt keys, and function keys don't work.
+I have run the board through <CODE>showkey -s</CODE>, so I know what
+scancodes this keyboard sends out.
+However, the F9 and F10 keys send out <B>60</B> and <B>61</B>,
+respectively, so their key release events send out <B>e0</B>
+and <B>e1</B>, confusing the keyboard driver.</I>
+<P># These are across the top of the keyboard.
+<P><B>58</B> (F1), <B>59</B> (F2), <B>5a</B> (F3),
+<B>5b</B> (F4), <B>5c</B> (F5), <B>5d</B> (F6),
+<B>5e</B> (F7), <B>5f</B> (F8), <B>60</B> (F9),
+<B>61</B> (F10), <B>62</B> (F11), <B>63</B> (F12)
+<P> 
+<B>76</B> (Break), <B>77</B> (Setup).
+<P> 
+# top row
+<P><B>64</B> (Esc),
+<B>02</B> (1), <B>03</B> (2), <B>04</B> (3),
+<B>05</B> (4), <B>06</B> (5), <B>07</B> (6),
+<B>08</B> (7), <B>09</B> (8), <B>0a</B> (9),
+<B>0b</B> (0), <B>0c</B> (-), <B>0d</B> (=),
+<B>29</B> (`), <B>0e</B> (Backspace)
+<P>
+<P># 2nd row
+<P><B>0f</B> (Tab),
+<B>10</B> (Q), <B>11</B> (W), <B>12</B> (E),
+<B>13</B> (R), <B>14</B> (T), <B>15</B> (Y),
+<B>16</B> (U), <B>17</B> (I), <B>18</B> (O),
+<B>19</B> (P), <B>1a</B> ([), <B>1b</B> (]),
+<B>79</B> (Del), <B>6e</B> (Line Feed)
+<P>
+<P># 3rd row
+<P><B>38</B> (Ctrl),
+<B>1e</B> (A), <B>1f</B> (S), <B>20</B> (D),
+<B>21</B> (F), <B>22</B> (G), <B>23</B> (H),
+<B>24</B> (J), <B>25</B> (K), <B>26</B> (L),
+<B>27</B> (;), <B>28</B> ('), <B>75</B> (\),
+<B>1c</B> (Return)
+<P>
+<P># 4th row
+<P><B>2a</B> (Shift_L),
+<B>2c</B> (Z), <B>2d</B> (X), <B>2e</B> (C),
+<B>2f</B> (V), <B>30</B> (B), <B>31</B> (N),
+<B>32</B> (M), <B>33</B> (,), <B>34</B> (.),
+<B>35</B> (/),
+<B>3a</B> ((unknown)),
+<B>36</B> (Shift_R)
+<P>
+<P># bottom row
+<P><B>1d</B> (Caps Lock), <B>71</B> (Alt_L),
+<B>01</B> ((unknown)),
+<B>39</B> (Space),
+<B>45</B> ((unknown)),
+<B>72</B> (Alt_R),
+<B>46</B> ((unknown))
+<P>
+<P># numeric keypad.  No "grey" section on the keyboard.
+<P><B>47</B> (7), <B>48</B> (8), <B>49</B> (9),
+<B>54</B> (Keypad -),
+<B>4b</B> (4), <B>4c</B> (5), <B>4d</B> (6),
+<B>37</B> (Keypad +),
+<B>4f</B> (1), <B>50</B> (2), <B>51</B> (3),
+<B>4e</B> (Keypad Enter),
+<B>52</B> (0),
+<B>78</B> (Up),
+<B>53</B> (Keypad .),
+<B>56</B> (Left),
+<B>55</B> (Down),
+<B>7d</B> (Right),
+<B>7e</B> (Keypad ,).
+<P>
+<P>There are more keyboards that do not use <B>e0</B> as escape code.
+For example, Paul Schulz &lt;pauls@caemrad.com.au&gt;
+reports the same for Sun Type 5 Keyboard with PS/2 connector,
+NCD model N-123NA. A kernel patch is required for such keyboards.
+<P>
+<P>
+<H2><A NAME="ss2.15">2.15 IBM ThinkPad</A>
+</H2>
+
+<P>George Staikos &lt;staikos@0wned.org&gt; writes:
+<P><I>I have an IBM ThinkPad i1460. It has the IBM EasyLaunch&lt;tm&gt; keys.
+These are four multicoloured keys up at the top of the keyboard
+for "Home Page", "Search", "Shop", "Mail".  They dont' seem to create
+any keyboard events at all.  The keyboard interrupt doesn't trigger,
+<CODE>showkeys</CODE> doesn't see them do anything, and in DOS, a simple
+sequence of BIOS calls doesn't see them either.
+Also, being a laptop, it has an FN key.  This key generates <B>55</B>.</I>
+<P>
+<H2><A NAME="ss2.16">2.16 Keyboards with many keys</A>
+</H2>
+
+<P>The current mechanism is unable to handle keyboards with more than
+127 keys. But such keyboards seem to exist. (So far, nobody has
+reported `I have one', but there are several reports saying
+`I have heard about someone who has one'.)
+<P>Mark Hatle &lt;fray@kernel.crashing.org&gt; wrote:
+<P><I>On some ADB keyboards there are actually 128 distinct keys.
+They use scancodes 0-127.</I>
+<P><I>ADB is Apple Desktop Bus.  The way that ADB works is similar to SCSI but
+on a much slower level.  Specifically there is a communications chip in
+the computer, ADB controller, and the same chip in the keyboard.  The
+keyboard sends the scancode to its internal ADB controller, the internal
+ADB controller then does any key mapping needed (not used under linux
+from my understanding) and passes the data to the computer.</I>
+<P><I>The ADB controller is capable of sending 256 distinct keys, but to my
+knowledge only 128 are sent.  The key 0 is the 'a' and key 127 is the
+"power button".</I>
+<P><I>Also some of the Apple ADB keyboards have special "sound" and "function"
+keys.  These keys (used in MacOS for volume up and down, screen contrast
+changing, etc) also show up on the ADB scancodes.</I>
+<P><I>ADB is used for both m68k and PPC Linux.  The m68k Macintosh port, and
+the PPC - Power Macintosh and CHRP ports.</I>
+<P>and later:
+<P><I>Basically the scancode sequences for ADB are 16 bit. so there can actually
+be 65536 scancodes, currently though only 128 are defined.</I>
+<P>
+<HR>
+<A HREF="scancodes-3.html">Next</A>
+<A HREF="scancodes-1.html">Previous</A>
+<A HREF="scancodes.html#toc2">Contents</A>
+</BODY>
+</HTML>
diff --git a/doc/scancodes/scancodes-3.html b/doc/scancodes/scancodes-3.html
new file mode 100644 (file)
index 0000000..7adc63e
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
+ <TITLE>Keyboard scancodes: Reporting</TITLE>
+ <LINK HREF="scancodes-2.html" REL=previous>
+ <LINK HREF="scancodes.html#toc3" REL=contents>
+</HEAD>
+<BODY>
+Next
+<A HREF="scancodes-2.html">Previous</A>
+<A HREF="scancodes.html#toc3">Contents</A>
+<HR>
+<H2><A NAME="s3">3. Reporting</A></H2>
+
+<P>Additions and corrections are welcome.
+Use <CODE>showkey -s</CODE> to get the scancodes.
+Mention keyboard manufacturer and type, and the keycaps.
+<P>Andries Brouwer - <CODE>aeb@cwi.nl</CODE>
+<P>
+<HR>
+Next
+<A HREF="scancodes-2.html">Previous</A>
+<A HREF="scancodes.html#toc3">Contents</A>
+</BODY>
+</HTML>
diff --git a/doc/scancodes/scancodes.html b/doc/scancodes/scancodes.html
new file mode 100644 (file)
index 0000000..50767ea
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
+ <TITLE>Keyboard scancodes</TITLE>
+ <LINK HREF="scancodes-1.html" REL=next>
+
+
+</HEAD>
+<BODY>
+<A HREF="scancodes-1.html">Next</A>
+Previous
+Contents
+<HR>
+<H1>Keyboard scancodes</H1>
+
+<H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v1.0, 991209
+<P><HR>
+<EM>This note contains some information about PC keyboard scancodes.</EM>
+<HR>
+<P>
+<H2><A NAME="toc1">1.</A> <A HREF="scancodes-1.html">Ordinary PC keyboards</A></H2>
+
+<UL>
+<LI><A HREF="scancodes-1.html#ss1.1">1.1 Key release</A>
+<LI><A HREF="scancodes-1.html#ss1.2">1.2 Protocol scancodes</A>
+<LI><A HREF="scancodes-1.html#ss1.3">1.3 Escape scancodes</A>
+<LI><A HREF="scancodes-1.html#ss1.4">1.4 Ordinary scancodes</A>
+<LI><A HREF="scancodes-1.html#ss1.5">1.5 Escaped scancodes</A>
+<LI><A HREF="scancodes-1.html#ss1.6">1.6 Fake shifts</A>
+<LI><A HREF="scancodes-1.html#ss1.7">1.7 Turbo Mode</A>
+<LI><A HREF="scancodes-1.html#ss1.8">1.8 Scancode modes</A>
+</UL>
+<P>
+<H2><A NAME="toc2">2.</A> <A HREF="scancodes-2.html">Special keyboards</A></H2>
+
+<UL>
+<LI><A HREF="scancodes-2.html#ss2.1">2.1 Focus KeyPro FK-9000 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.2">2.2 BTC keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.3">2.3 LK450 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.4">2.4 OmniKey keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.5">2.5 GRiD 2260 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.6">2.6 A Japanese 86/106 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.7">2.7 Brazilian keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.8">2.8 RC930 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.9">2.9 Tandberg Data keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.10">2.10 A keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.11">2.11 Microsoft Natural keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.12">2.12 Microsoft Internet keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.13">2.13 Logitech Internet keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.14">2.14 A keyboard using e0 as ordinary scancode</A>
+<LI><A HREF="scancodes-2.html#ss2.15">2.15 IBM ThinkPad</A>
+<LI><A HREF="scancodes-2.html#ss2.16">2.16 Keyboards with many keys</A>
+</UL>
+<P>
+<H2><A NAME="toc3">3.</A> <A HREF="scancodes-3.html">Reporting</A></H2>
+
+<HR>
+<A HREF="scancodes-1.html">Next</A>
+Previous
+Contents
+</BODY>
+</HTML>
diff --git a/doc/scancodes/scancodes.sgml b/doc/scancodes/scancodes.sgml
new file mode 100644 (file)
index 0000000..e4d524c
--- /dev/null
@@ -0,0 +1,668 @@
+<!doctype linuxdoc system>
+
+<article>
+
+<title>Keyboard scancodes
+<author>Andries Brouwer, <tt/aeb@cwi.nl/
+<date>v1.0, 991209
+
+<abstract>
+This note contains some information about PC keyboard scancodes.
+</abstract>
+
+<toc>
+
+<sect>Ordinary PC keyboards<p>
+The data from a keyboard comes mainly in the form of scancodes,
+produced by key presses or used in the protocol with the computer.
+(Different codes are used by the keyboard firmware internally,
+and there also exist several
+<ref id="scancode_modes" name="sets of scancodes">. Here, for the
+time being, we only give the default codes - those from scancode set 2.)
+Each key press and key release produces between 0 and 6 scancodes.
+
+<sect1>Key release<p>
+Below I'll only mention the scancode for key press (`make').
+The scancode for key release (`break') is obtained from it
+by setting the high order bit (adding 0x80 = 128).
+Thus, Esc press produces scancode <bf>01</bf>, Esc release
+scancode <bf>81</bf> (hex).
+For sequences things are similar: Keypad-/ gives <bf>e0</bf> <bf>35</bf>
+when pressed, <bf>e0</bf> <bf>b5</bf> when released. Most keyboards will
+repeat the make code (key down code) when the key repeats. Some will also
+fake Shift down and Shift up events during the repeat.
+
+The keys PrtSc/SysRq and Pause/Break are special.
+The former produces scancode <bf>e0</bf> <bf>2a</bf> <bf>e0</bf> <bf>37</bf>
+when no modifier key is pressed simultaneously, <bf>e0</bf> <bf>37</bf>
+together with Shift or Ctrl, but <bf>54</bf> together with (left or right) Alt.
+The latter produces scancode sequence
+<bf>e1</bf> <bf>1d</bf> <bf>45</bf> <bf>e1</bf> <bf>9d</bf> <bf>c5</bf>
+when pressed (without modifier) and nothing at all upon release.
+However, together with (left or right) Ctrl, one gets
+<bf>e0</bf> <bf>46</bf> <bf>e0</bf> <bf>c6</bf>,
+and again nothing at release. It does not repeat.
+
+
+<sect1>Protocol scancodes<p>
+Most scancodes indicate a key press or release.
+Some are used in the communication protocol.
+<p>
+<bf>00</bf> (Keyboard buffer overflow or parity error)
+<p>
+<bf>aa</bf> (BAT [Basic Assurance Test] OK)
+<p>
+<bf>ee</bf> (Result of echo command)
+<p>
+<bf>f1</bf> (Some keyboards, as reply to command <bf>a4</bf>:
+Password not installed)
+<p>
+<bf>fa</bf> (Ack)
+<p>
+<bf>fc</bf> (BAT error or Mouse transmit error)
+<p>
+<bf>fe</bf> (Keyboard fails to ack, please resend)
+<p>
+<bf>ff</bf> (Keyboard parity error)
+
+<sect1>Escape scancodes<p>
+The codes <bf>e0</bf> and <bf>e1</bf> introduce scancode sequences,
+and are not usually used as isolated scancodes themselves
+(but see <ref id="e0_as_key" name="below">).
+<p>
+This, and the above, means that scancodes
+<bf>00</bf>, <bf>60</bf>, <bf>61</bf>, <bf>6e</bf>, <bf>71</bf>,
+<bf>7a</bf>, <bf>7c</bf>, <bf>7e</bf>, <bf>7f</bf>
+are unavailable to signify key presses (on a default keyboard;
+we'll see keyboards that actually use scancode <bf>60</bf>).
+<p>
+Also other prefixes occur, see <ref id="prefix_80" name="below">.
+
+<sect1>Ordinary scancodes<p>
+The scancodes in scancode set 2 are given in hex.
+Between parentheses the keycap on a US keyboard.
+The scancodes are given in order, grouped according
+to groups of keys that are usually found next to each other.
+<p>
+<bf>00</bf> is normally an error code
+<p>
+<bf>01</bf> (Esc)
+<p>
+<bf>02</bf> (1!), <bf>03</bf> (2@), <bf>04</bf> (3#), <bf>05</bf> (4$),
+<bf>06</bf> (5%E), <bf>07</bf> (6^), <bf>08</bf> (7&amp;),
+<bf>09</bf> (8*), <bf>0a</bf> (9(), <bf>0b</bf> (0)), <bf>0c</bf> (-_),
+<bf>0d</bf> (=+), <bf>0e</bf> (Backspace)
+<p>
+<bf>0f</bf> (Tab), <bf>10</bf> (Q), <bf>11</bf> (W), <bf>12</bf> (E),
+<bf>13</bf> (R), <bf>14</bf> (T), <bf>15</bf> (Y),
+<bf>16</bf> (U), <bf>17</bf> (I), <bf>18</bf> (O),
+<bf>19</bf> (P), <bf>1a</bf> ([{), <bf>1b</bf> (]})
+<p>
+<bf>1c</bf> (Enter)
+<p>
+<bf>1d</bf> (LCtrl)
+<p>
+<bf>1e</bf> (A), <bf>1f</bf> (S), <bf>20</bf> (D), <bf>21</bf> (F),
+<bf>22</bf> (G), <bf>23</bf> (H), <bf>24</bf> (J), <bf>25</bf> (K),
+<bf>26</bf> (L), <bf>27</bf> (;:), <bf>28</bf> ('")
+<p>
+<bf>29</bf> (`&tilde;)
+<p>
+<bf>2a</bf> (LShift)
+<p>
+<bf>2b</bf> (\|), on a 102-key keyboard
+<p>
+<bf>2c</bf> (Z), <bf>2d</bf> (X), <bf>2e</bf> (C), <bf>2f</bf> (V),
+<bf>30</bf> (B), <bf>31</bf> (N), <bf>32</bf> (M), <bf>33</bf> (,&lt;),
+<bf>34</bf> (.&gt;), <bf>35</bf> (/?), <bf>36</bf> (RShift)
+<p>
+<bf>37</bf> (Keypad-*) or (*/PrtScn) on a 83/84-key keyboard
+<p>
+<bf>38</bf> (LAlt), <bf>39</bf> (Space bar),
+<p>
+<bf>3a</bf> (CapsLock)
+<p>
+<bf>3b</bf> (F1), <bf>3c</bf> (F2), <bf>3d</bf> (F3), <bf>3e</bf> (F4),
+<bf>3f</bf> (F5), <bf>40</bf> (F6), <bf>41</bf> (F7),
+<bf>42</bf> (F8), <bf>43</bf> (F9), <bf>44</bf> (F10)
+<p>
+<bf>45</bf> (NumLock)
+<p>
+<bf>46</bf> (ScrollLock)
+<p>
+<bf>47</bf> (Keypad-7/Home), <bf>48</bf> (Keypad-8/Up),
+<bf>49</bf> (Keypad-9/PgUp)
+<p>
+<bf>4a</bf> (Keypad--)
+<p>
+<bf>4b</bf> (Keypad-4/Left), <bf>4c</bf> (Keypad-5),
+<bf>4d</bf> (Keypad-6/Right), <bf>4e</bf> (Keypad-+)
+<p>
+<bf>4f</bf> (Keypad-1/End), <bf>50</bf> (Keypad-2/Down),
+<bf>51</bf> (Keypad-3/PgDn)
+<p>
+<bf>52</bf> (Keypad-0/Ins), <bf>53</bf> (Keypad-./Del)
+<p>
+<bf>54</bf> (Alt-SysRq) on a 84+ key keyboard
+<p>
+<bf>55</bf> is less common; occurs as PF1 on a Focus 9000 keyboard,
+and as FN on an IBM ThinkPad.
+<p>
+<bf>56</bf> mostly on non-US keyboards. It is an unlabelled key
+next to the space bar on a Toshiba notebook.
+<p>
+<bf>57</bf> (F11), <bf>58</bf> (F12) both on a 101+ key keyboard
+<p>
+<bf>59</bf>-<bf>5a</bf>-...-<bf>7f</bf> are less common.
+Scancodes <bf>59</bf>-<bf>5c</bf> occur on the RC930 keyboard.
+X calls <bf>5d</bf> `KEY_Begin'.
+Scancodes <bf>55</bf>, <bf>6d</bf>, <bf>6f</bf>, <bf>73</bf>, <bf>74</bf>,
+<bf>77</bf>, <bf>78</bf>, <bf>79</bf>, <bf>7a</bf>, <bf>7b</bf>,
+<bf>7c</bf>, <bf>7e</bf> occur on the Focus 9000 keyboard.
+Scancodes <bf>73</bf>, <bf>7d</bf> occur on a Japanese 86/106 keyboard.
+<p>
+
+<sect1>Escaped scancodes<p>
+Apart from the Pause/Break key that has an escaped sequence starting
+with <bf>e1</bf>, the escape used is <bf>e0</bf>. Often, the codes
+are chosen in such a way that something meaningful happens when
+the receiver just discards the <bf>e0</bf>.
+<p>
+<bf>e0</bf> <bf>1c</bf> (Keypad Enter) - <bf>1c</bf> (Enter)
+<p>
+<bf>e0</bf> <bf>1d</bf> (RCtrl) - <bf>1d</bf> (LCtrl)
+<p>
+<bf>e0</bf> <bf>2a</bf> (fake LShift) - <bf>2a</bf> (LShift)
+<p>
+<bf>e0</bf> <bf>35</bf> (Keypad-/) - <bf>35</bf> (/?)
+<p>
+<bf>e0</bf> <bf>36</bf> (fake RShift) - <bf>36</bf> (RShift)
+<p>
+<bf>e0</bf> <bf>37</bf> (Ctrl-PrtScn) - <bf>37</bf> (*/PrtScn)
+<p>
+<bf>e0</bf> <bf>38</bf> (RAlt) - <bf>38</bf> (LAlt)
+<p>
+<bf>e0</bf> <bf>46</bf> (Ctrl-Break) - <bf>46</bf> (ScrollLock)
+<p>
+<bf>e0</bf> <bf>47</bf> (Grey Home) - <bf>47</bf> (Keypad-7/Home)
+<p>
+<bf>e0</bf> <bf>48</bf> (Grey Up) - <bf>48</bf> (Keypad-8/UpArrow)
+<p>
+<bf>e0</bf> <bf>49</bf> (Grey PgUp) - <bf>49</bf> (Keypad-9/PgUp)
+<p>
+<bf>e0</bf> <bf>4b</bf> (Grey Left) - <bf>4b</bf> (Keypad-4/Left)
+<p>
+<bf>e0</bf> <bf>4d</bf> (Grey Right) - <bf>4d</bf> (Keypad-6/Right)
+<p>
+<bf>e0</bf> <bf>4f</bf> (Grey End) - <bf>4f</bf> (Keypad-1/End)
+<p>
+<bf>e0</bf> <bf>50</bf> (Grey Down) - <bf>50</bf> (Keypad-2/DownArrow)
+<p>
+<bf>e0</bf> <bf>51</bf> (Grey PgDn) - <bf>51</bf> (Keypad-3/PgDn)
+<p>
+<bf>e0</bf> <bf>52</bf> (Grey Insert) - <bf>52</bf> (Keypad-0/Ins)
+<p>
+<bf>e0</bf> <bf>53</bf> (Grey Delete) - <bf>53</bf> (Keypad-./Del)
+<p>
+These escaped scancodes occur only on 101+ key keyboards.
+
+<sect1>Fake shifts<p>
+The ten grey keys Insert, Home, PgUp, Delete, End, PgDn,
+Up, Left, Down, Right are supposed to function regardless
+of the state of Shift and NumLock keys. But for an old AT keyboard
+the keypad keys would produce digits when Numlock was on or Shift
+was down. Therefore, in order to fool old programs,
+fake scancodes are sent: when LShift is down, and Insert is
+pressed, <bf>e0</bf> <bf>aa</bf> <bf>e0</bf> <bf>52</bf> is sent;
+upon release of Insert <bf>e0</bf> <bf>d2</bf> <bf>e0</bf> <bf>2a</bf>
+is sent. In other words, a fake LShift-up and
+fake LShift-down are inserted.
+
+If the Shift key is released earlier than the repeated key,
+then a real Shift-up code occurs (without preceding fake Shift-down)
+so that a program ignoring <bf>e0</bf> would see one more Shift-up
+than Shift-down.
+
+When NumLock is on, no fake Shifts are sent when Shift was down,
+but fake Shifts are sent when Shift was not down. Thus,
+with Numlock, if Insert is pressed,
+<bf>e0</bf> <bf>2a</bf> <bf>e0</bf> <bf>52</bf> is sent
+and upon release <bf>e0</bf> <bf>d2</bf> <bf>e0</bf> <bf>aa</bf> is sent.
+The keyboard maintains a private NumLock mode, toggled when
+NumLock is pressed, and set when the NumLock LED is set.
+
+In the same way, when Shift is down, the Grey-/ key produces
+fake Shift-up and fake Shift-down sequences. However, it does
+not react to the state of NumLock. The purpose of course is to
+fool programs that identify Grey-/ with ordinary /, so that they
+don't treat Shift-Grey-/ like Shift-/, i.e., ?.
+
+On a Toshiba notebook, the three Windows keys are treated like
+the group of ten keys mentioned, and get fake shifts when
+(left or right) Shift is down. Thet do not react to NumLock.
+
+<sect1>Turbo Mode<p>
+On some motherboards the LCtrl-LAlt-GreyPlus and LCtrl-LAlt-GreyMinus
+switch Turbo mode on/off, respectively. For these, the motherboard
+may generate the same scancode sequence when the Turbo button is
+pushed: Turbo Switch (High->Low):
+<bf>1d</bf> <bf>38</bf> <bf>4a</bf> <bf>ce</bf> <bf>b8</bf> <bf>9d</bf>
+and Turbo Switch (Low->High):
+<bf>1d</bf> <bf>38</bf> <bf>4e</bf> <bf>ce</bf> <bf>b8</bf> <bf>9d</bf>.
+<p>
+Other peculiar combinations in this style include
+LCtrl-LAlt-LShift-GreyMinus to turn off system cache.
+<p>
+Thio Yu Jin &lt;jin@singmail.com&gt; complains that on his Toshiba 4010CDS
+the Ctrl-Alt-Shift-T key combination brings up the Toshiba user manual.
+(04 Mar 1999 - not April 1.)
+<p>
+
+<sect1>Scancode modes
+<label id="scancode_modes">
+<p>
+The usual PC keyboards are capable of producing three
+sets of scancodes. Writing 0xf0 followed by 1, 2 or 3 to port
+0x60 will put the keyboard in scancode mode 1, 2 or 3. Writing
+0xf0 followed by 0 queries the mode, resulting in a scancode
+byte 0x43, 0x41 or 0x3f from the keyboard.
+<p>
+Scancode mode 2 is the default. In this mode, a key press
+usually produces a value <it>s</it> in the range 0x01-0x5f and the
+corresponding key release produces <it>s</it>+0x80. In scancode
+mode 3, the only key releases that produce a scan code are of
+either Shift key, or of the left Ctrl and Alt keys; for all
+other keys only the key presses are noted. The produced
+scancodes are mostly equal to those for scancode mode 2.
+<p>
+In scancode mode 1 most key releases produce the same values as
+in scancode mode 2, but for key presses there are entirely
+different, unrelated values. The details are somewhat messy.
+
+<sect>Special keyboards<p>
+
+<sect1>Focus KeyPro FK-9000 keyboard<p>
+Raul D. Miller &lt;rockwell@nova.umd.edu&gt;
+and &lt;hagmanti@cps.msu.edu&gt; report:
+<p>
+<it>
+The keyboard is a KeyPro FK-9000.  The FCC label says it's made in
+Taiwan by Focus Electronic Co, Ltd.  It has a built-in calculator.
+</it>
+<p>
+<it>
+This keyboard has twelve additional keys, with scancodes
+</it>
+<bf>55</bf> (PF1),
+<bf>6d</bf> (PF11),
+<bf>6f</bf> (PF12),
+<bf>73</bf> (PF2),
+<bf>74</bf> (PF9),
+<bf>77</bf> (PF3),
+<bf>78</bf> (PF4),
+<bf>79</bf> (PF5),
+<bf>7a</bf>* (PF6),
+<bf>7b</bf> (PF7),
+<bf>7c</bf> (PF8),
+<bf>7e</bf>* (PF10).
+<p>
+<it>
+The break codes equal the make codes ORed with 0x80, as always,
+but the Linux kernel eats <bf>fa</bf> and <bf>fe</bf> as
+protocol bytes.
+</it>
+<p>
+<it>
+The behavior of these keys is different from that of normal keys--
+they generate nothing when pressed; then generate the above scancodes
+at the normal repeat time and rate, and then generate (except for the
+starred ones) their scancode ORed with 0x80 when released...
+</it>
+<p>
+<it>
+These PF keys are reprogrammable -- and programming occurs as a sequence
+of keyboard actions.  Therefore, the PF keys duplicate whatever
+keyboard actions occurred during their programming.
+You hit the "Prog" key, then the PF key you want to program; type the
+string you want to store in the key (it's limited to 14 keypresses),
+and then hit the PF key again. After that, when you hit the PF key,
+it sends the string, and generates its own abnormal scancode upon
+release. When the key is held down, it generates the scancode repeatedly,
+but does not generate the string stored in it repeatedly.
+</it>
+<p>
+<it>
+When you go to program a key, the scancodes for "PF##-" are sent
+to the computer, then the scancodes for each key you hit as you
+hit it (the shift, etc. keys are an exception-- they send "s-"
+and such :), and then, when you hit the PF## key again to end the
+programming, it sends a sequence of (at least) 18 "0e 8e"s --
+Backspaces...
+</it>
+<p>
+<it>
+The program key itself doesn't generate a scancode at any time.
+The same applies to the CE and AC/ON keys (part of the calculator).
+There is a switch to change between calculator and keyboard mode
+which generates no scancodes.
+</it>
+<p>
+<it>
+When the keyboard is in calculator mode, the entire numeric
+keypad (and everything else on the right side) generates no
+scancodes.
+</it>
+<p>
+<it>
+When the keyboard is not in caluclator mode, the %, MC, MR, M-,
+M+, and Square Root keys all generate 0xff when pressed,
+0xff to repeat, and 0xff on release.
+</it>
+<p>
+<it>
+The little unlabeled key between the right Ctrl and right Alt
+generates <bf>56</bf> when hit, repeats that, and then <bf>d6</bf>
+when released, just like a normal key.
+</it>
+<p>
+
+<sect1>BTC keyboard<p>
+This keyboard has one additional key, with escaped scancode
+<bf>e0</bf> <bf>6f</bf> (Macro).
+
+<sect1>LK450 keyboard<p>
+This keyboard has six additional keys, with escaped scancodes
+<bf>e0</bf> <bf>3d</bf> (F13),
+<bf>e0</bf> <bf>3e</bf> (F14),
+<bf>e0</bf> <bf>3f</bf> (Help),
+<bf>e0</bf> <bf>40</bf> (Do),
+<bf>e0</bf> <bf>41</bf> (F17),
+<bf>e0</bf> <bf>4e</bf> (Keypad-minplus).
+
+<sect1>OmniKey keyboard<p>
+This keyboard has one additional key, with escaped scancode
+<bf>e0</bf> <bf>4c</bf> (Omni).
+
+<sect1>GRiD 2260 keyboard<p>
+The GRiD 2260 notebook has a key producing the
+<bf>6c</bf> scancode; I do not know the keycap.
+
+<sect1>A Japanese 86/106 keyboard<p>
+Barry Yip &lt;g609296@cc.win.or.jp&gt; reports:
+<p>
+<it>
+This keyboard has two additional keys, with scancodes
+<bf>73</bf> (\-) and <bf>7d</bf> (\|).
+This kind of keyboard is rather standard in Japan. They are called 106
+keyboard. Mine is a notebook so it is 86 keyboard. No specific brand
+name.
+</it>
+
+<sect1>Brazilian keyboard<p>
+Arnaldo Moura &lt;lumbago@vnet.ibm.com&gt; reports:
+<p>
+<it>
+This keyboard has two unusual keys, with scancodes
+<bf>73</bf> (/?) and <bf>7e</bf> (Keypad-.).
+</it>
+<p>
+Also others mention an ABNT keyboard with <bf>73</bf> and
+<bf>7e</bf> keys, mostly because these keys do not function
+with Windows NT 4.0.
+<p>
+ABNT (Associação Brasileira de Normas Tecnicas) and ABNT2
+are Brazilian keyboard layout standards. The plain Brazilian
+keyboard has 103 keys. I find an ABNT 107 key keyboard announced by
+<htmlurl name="gertec" url="http://www.gertec.com.br/tecpc1.htm">.
+with Suspend / Wake-up / Power power management keys.
+<it>For enabling these functions, run BIOS setup.</it>
+
+<sect1>RC930 keyboard<p>
+Torben Fjerdingstad &lt;tfj@olivia.ping.dk&gt; reports:
+<p>
+<it>
+It's an rc930 keyboard, from Regnecentralen/RC International, Now ICL.
+This keyboard has four additional keys, with scancodes
+</it>
+<bf>59</bf> (A1),
+<bf>5a</bf> (A2),
+<bf>5b</bf> (A3),
+<bf>5c</bf> (A4).
+<p>
+<it>
+The rc930/rc931 keyboards are not made anymore, because they had a
+problem with fast typists, writing over 400 chars/minute.
+Writing 'af&lt;space&gt;', very, very fast, did a PgUp.
+</it>
+
+<sect1>Tandberg Data keyboard
+<label id="prefix_80">
+<p>
+Kjetil Torgrim Homme &lt;kjetilho@ifi.uio.no&gt; reports:
+<p>
+<it>
+My Tandberg Data keyboard uses the prefix <bf>80</bf> for
+its numerous (20) extra keys. The <bf>80</bf> scancodes are:
+</it><p>
+<bf>11</bf>, <bf>12</bf>, <bf>13</bf>, <bf>14</bf>, <bf>16</bf>,
+<bf>17</bf>, <bf>18</bf>, <bf>19</bf>, <bf>1e</bf>, <bf>1f</bf>,
+<bf>20</bf>, <bf>21</bf>, <bf>22</bf>, <bf>23</bf>, <bf>25</bf>,
+<bf>26</bf>, <bf>2f</bf>, <bf>30</bf>, <bf>32</bf>, <bf>56</bf>.
+<p><it>
+For completeness, the <bf>e0</bf> scancodes:
+</it><p>
+<bf>1c</bf>, <bf>2a</bf>, <bf>35</bf>, <bf>37</bf>, <bf>47</bf>,
+<bf>48</bf>, <bf>49</bf>, <bf>4b</bf>, <bf>4d</bf>, <bf>4f</bf>,
+<bf>50</bf>, <bf>51</bf>, <bf>52</bf>, <bf>53</bf>.
+<p><it>
+The <bf>e1</bf> scancode: <bf>1d</bf>.
+As you can see, there is no overlap on this keyboard.
+</it>
+
+<sect1>A keyboard<p>
+<it>Three unusual power keys: <bf>e0</bf> <bf>5e</bf>,
+<bf>e0</bf> <bf>5f</bf>, <bf>e0</bf> <bf>63</bf>.</it>
+
+<sect1>Microsoft Natural keyboard<p>
+This keyboard has three additional keys, with escaped scancodes
+<bf>e0</bf> <bf>5b</bf> (LeftWindow),
+<bf>e0</bf> <bf>5c</bf> (RightWindow),
+<bf>e0</bf> <bf>5d</bf> (Menu).
+
+<sect1>Microsoft Internet keyboard<p>
+In addition to the three extra keys on the Microsoft Natural keyboard,
+this keyboard has ten keys, with escaped scancodes
+<bf>e0</bf> <bf>21</bf> (Calculator),
+<bf>e0</bf> <bf>32</bf> (Web/Home),
+<bf>e0</bf> <bf>5f</bf> (Sleep),
+<bf>e0</bf> <bf>65</bf> (Search),
+<bf>e0</bf> <bf>66</bf> (Favorites),
+<bf>e0</bf> <bf>68</bf> (Stop),
+<bf>e0</bf> <bf>69</bf> (Forward),
+<bf>e0</bf> <bf>6a</bf> (Back),
+<bf>e0</bf> <bf>6b</bf> (My Computer),
+<bf>e0</bf> <bf>6c</bf> (Mail).
+
+<sect1>Logitech Internet keyboard<p>
+Jonathan DeBoer &lt;deboer@ugrad.cs.ualberta.ca&gt;
+reports Key-down and key-up scancodes for a Logitech Internet keyboard.
+<p> 0xe0 0x7a 0xe0 0xfa
+<p> 0xe0 0x32 0xe0 0xb2
+<p> 0xe0 0x21 0xe0 0xa1
+<p> 0xe0 0x23 0xe0 0xa3
+<p> 0x38 0x2a 0x0f 0x8f 0x8f 0xb8 0xaa
+<p> 0xe0 0x17 0xe0 0x97
+<p> 0xe0 0x10 0xe0 0x90
+<p> 0xe0 0x22 0xe0 0xa2
+<p> 0xe0 0x24 0xe0 0xa4
+<p> 0xe0 0x19 0xe0 0x99
+<p> 0xe0 0x1e 0xe0 0x9e
+<p> 0xe0 0x12 0xe0 0x92
+<p> 0xe0 0x26 0xe0 0xa6
+<p> 0xe0 0x18 0xe0 0x98
+<p> 0xe0 0x20 0xe0 0xa0
+<p> 0xe0 0x30 0xe0 0xb0
+<p> 0xe0 0x2e 0xe0 0xae
+<p> 0xe0 0x25 0xe0 0xa5
+<p> (But I have no keycap information.)
+
+<sect1>A keyboard using e0 as ordinary scancode
+<label id="e0_as_key">
+<p>
+Benjamin Carter &lt;bcarter@ultra5.cs.umr.edu&gt; reports:
+<p>
+<it>
+I recently came into possession of a 97-key keyboard with Japanese
+markings on the keys.  (The keys also have the standard
+qwerty-characters on them, with the exception of some of the meta-keys
+(there are 3 keys near the Alt keys on either side of the spacebar with
+only Japanese characters on them so I don't know what they are).
+In any case, the keyboard sends out scancodes that work for all the main
+keys (backspace, letters and numbers, enter, shift), but the numeric
+keypad, Alt keys, and function keys don't work.
+I have run the board through <tt>showkey -s</tt>, so I know what
+scancodes this keyboard sends out.
+However, the F9 and F10 keys send out <bf>60</bf> and <bf>61</bf>,
+respectively, so their key release events send out <bf>e0</bf>
+and <bf>e1</bf>, confusing the keyboard driver.
+</it>
+<p>
+# These are across the top of the keyboard.
+<p>
+<bf>58</bf> (F1), <bf>59</bf> (F2), <bf>5a</bf> (F3),
+<bf>5b</bf> (F4), <bf>5c</bf> (F5), <bf>5d</bf> (F6),
+<bf>5e</bf> (F7), <bf>5f</bf> (F8), <bf>60</bf> (F9),
+<bf>61</bf> (F10), <bf>62</bf> (F11), <bf>63</bf> (F12)
+<p> 
+<bf>76</bf> (Break), <bf>77</bf> (Setup).
+<p> 
+# top row
+<p>
+<bf>64</bf> (Esc),
+<bf>02</bf> (1), <bf>03</bf> (2), <bf>04</bf> (3),
+<bf>05</bf> (4), <bf>06</bf> (5), <bf>07</bf> (6),
+<bf>08</bf> (7), <bf>09</bf> (8), <bf>0a</bf> (9),
+<bf>0b</bf> (0), <bf>0c</bf> (-), <bf>0d</bf> (=),
+<bf>29</bf> (`), <bf>0e</bf> (Backspace)
+
+<p>
+# 2nd row
+<p>
+<bf>0f</bf> (Tab),
+<bf>10</bf> (Q), <bf>11</bf> (W), <bf>12</bf> (E),
+<bf>13</bf> (R), <bf>14</bf> (T), <bf>15</bf> (Y),
+<bf>16</bf> (U), <bf>17</bf> (I), <bf>18</bf> (O),
+<bf>19</bf> (P), <bf>1a</bf> ([), <bf>1b</bf> (]),
+<bf>79</bf> (Del), <bf>6e</bf> (Line Feed)
+
+<p>
+# 3rd row
+<p>
+<bf>38</bf> (Ctrl),
+<bf>1e</bf> (A), <bf>1f</bf> (S), <bf>20</bf> (D),
+<bf>21</bf> (F), <bf>22</bf> (G), <bf>23</bf> (H),
+<bf>24</bf> (J), <bf>25</bf> (K), <bf>26</bf> (L),
+<bf>27</bf> (;), <bf>28</bf> ('), <bf>75</bf> (\),
+<bf>1c</bf> (Return)
+
+<p>
+# 4th row
+<p>
+<bf>2a</bf> (Shift_L),
+<bf>2c</bf> (Z), <bf>2d</bf> (X), <bf>2e</bf> (C),
+<bf>2f</bf> (V), <bf>30</bf> (B), <bf>31</bf> (N),
+<bf>32</bf> (M), <bf>33</bf> (,), <bf>34</bf> (.),
+<bf>35</bf> (/),
+<bf>3a</bf> ((unknown)),
+<bf>36</bf> (Shift_R)
+
+<p>
+# bottom row
+<p>
+<bf>1d</bf> (Caps Lock), <bf>71</bf> (Alt_L),
+<bf>01</bf> ((unknown)),
+<bf>39</bf> (Space),
+<bf>45</bf> ((unknown)),
+<bf>72</bf> (Alt_R),
+<bf>46</bf> ((unknown))
+
+<p>
+# numeric keypad.  No "grey" section on the keyboard.
+<p>
+<bf>47</bf> (7), <bf>48</bf> (8), <bf>49</bf> (9),
+<bf>54</bf> (Keypad -),
+<bf>4b</bf> (4), <bf>4c</bf> (5), <bf>4d</bf> (6),
+<bf>37</bf> (Keypad +),
+<bf>4f</bf> (1), <bf>50</bf> (2), <bf>51</bf> (3),
+<bf>4e</bf> (Keypad Enter),
+<bf>52</bf> (0),
+<bf>78</bf> (Up),
+<bf>53</bf> (Keypad .),
+<bf>56</bf> (Left),
+<bf>55</bf> (Down),
+<bf>7d</bf> (Right),
+<bf>7e</bf> (Keypad ,).
+<p>
+
+There are more keyboards that do not use <bf>e0</bf> as escape code.
+For example, Paul Schulz &lt;pauls@caemrad.com.au&gt;
+reports the same for Sun Type 5 Keyboard with PS/2 connector,
+NCD model N-123NA. A kernel patch is required for such keyboards.
+
+
+<sect1>IBM ThinkPad<p>
+George Staikos &lt;staikos@0wned.org&gt; writes:
+<p><it>
+I have an IBM ThinkPad i1460. It has the IBM EasyLaunch&lt;tm&gt; keys.
+These are four multicoloured keys up at the top of the keyboard
+for "Home Page", "Search", "Shop", "Mail".  They dont' seem to create
+any keyboard events at all.  The keyboard interrupt doesn't trigger,
+<tt>showkeys</tt> doesn't see them do anything, and in DOS, a simple
+sequence of BIOS calls doesn't see them either.
+Also, being a laptop, it has an FN key.  This key generates <bf>55</bf>.
+</it>
+
+<sect1>Keyboards with many keys<p>
+The current mechanism is unable to handle keyboards with more than
+127 keys. But such keyboards seem to exist. (So far, nobody has
+reported `I have one', but there are several reports saying
+`I have heard about someone who has one'.)
+
+Mark Hatle &lt;fray@kernel.crashing.org&gt; wrote:
+<p>
+<it>
+On some ADB keyboards there are actually 128 distinct keys.
+They use scancodes 0-127.
+</it><p><it>
+ADB is Apple Desktop Bus.  The way that ADB works is similar to SCSI but
+on a much slower level.  Specifically there is a communications chip in
+the computer, ADB controller, and the same chip in the keyboard.  The
+keyboard sends the scancode to its internal ADB controller, the internal
+ADB controller then does any key mapping needed (not used under linux
+from my understanding) and passes the data to the computer.
+</it><p><it>
+The ADB controller is capable of sending 256 distinct keys, but to my
+knowledge only 128 are sent.  The key 0 is the 'a' and key 127 is the
+"power button".
+</it><p><it>
+Also some of the Apple ADB keyboards have special "sound" and "function"
+keys.  These keys (used in MacOS for volume up and down, screen contrast
+changing, etc) also show up on the ADB scancodes.
+</it><p><it>
+ADB is used for both m68k and PPC Linux.  The m68k Macintosh port, and
+the PPC - Power Macintosh and CHRP ports.
+</it><p>
+and later:
+<p><it>
+Basically the scancode sequences for ADB are 16 bit. so there can actually
+be 65536 scancodes, currently though only 128 are defined.
+</it>
+
+<sect>Reporting<p>
+Additions and corrections are welcome.
+Use <tt>showkey -s</tt> to get the scancodes.
+Mention keyboard manufacturer and type, and the keycaps.
+<p>
+Andries Brouwer - <tt/aeb@cwi.nl/
+
+</article>
index 7ff36f6..e2f7637 100644 (file)
@@ -43,6 +43,5 @@ It is permissible to have multiple lines for the same glyph.
 .SH "SEE ALSO"
 .BR setfont (8),
 .BR psfgettable (1),
-.BR psfstriptable (1)
-
-
+.BR psfstriptable (1),
+.BR psfxtable (1)
\ No newline at end of file
index 702f2e3..228be18 100644 (file)
@@ -18,6 +18,5 @@ standard input.
 .SH "SEE ALSO"
 .BR setfont (8),
 .BR psfaddtable (1),
-.BR psfstriptable (1)
-
-
+.BR psfstriptable (1),
+.BR psfxtable (1)
index ffb81e4..f7e059d 100644 (file)
@@ -19,6 +19,5 @@ and an output file name of "\-" denotes standard output.
 .SH "SEE ALSO"
 .BR setfont (8),
 .BR psfaddtable (1),
-.BR psfgettable (1)
-
-
+.BR psfgettable (1),
+.BR psfxtable (1)
diff --git a/man/man1/psfxtable.1 b/man/man1/psfxtable.1
new file mode 100644 (file)
index 0000000..adc3bc9
--- /dev/null
@@ -0,0 +1,55 @@
+.\" @(#)psfxtable.1
+.TH PSFXTABLE 1 "9 Dec 1999"
+.SH NAME
+psfxtable \- handle Unicode character tables for console fonts
+.SH SYNOPSIS
+.B psfxtable
+.RB [ \-i
+.IR infont ]
+.RB [ \-o
+.IR outfont ]
+.RB [ \-it
+.IR intable ]
+.RB [ \-ot
+.IR outtable ]
+.RB [ \-nt ]
+.SH DESCRIPTION
+.IX "psfxtable command" "" "\fLpsfxtable\fR command"  
+.LP
+.B psfxtable
+handles the embedded Unicode character table for .psf format
+console fonts. It reads a font and possibly a table
+and writes a font and/or a table.
+.BR psfaddtable (1),
+.BR psfgettable (1)
+and
+.BR psfstriptable (1)
+are links to it.
+
+Each of the filenames
+.IR infont ,
+.IR outfont ,
+.IR intable ,
+and
+.IR outtable
+may be replaced by a single dash (\-), in which case
+standard input or standard output is used.
+If no \-i option is given, the font is read from standard input.
+If no \-it or \-o or \-ot option is given,
+no input table is read or no output font or output table is written.
+
+By default the output font (if any) will have a Unicode table
+when either the input font has one, or an explicit table
+(which overrides an input font table) has been provided.
+The option \-nt causes output of a font without table.
+When
+.I outfont
+is requested it will get a psf1 header when infont has
+a psf1 header and
+.I intable
+does not have sequences and a psf2 header otherwise.
+.SH "SEE ALSO"
+.BR setfont (8),
+.BR psfaddtable (1),
+.BR psfgettable (1),
+.BR psfstriptable (1)
index 1c8e6f7..9c15303 100644 (file)
@@ -15,7 +15,7 @@
 /*
  * Default keymap, and where the kernel copy of it lives.
  */
-#ifdef sparc
+#ifdef __sparc__
 # define DEFMAP "sunkeymap.map"
 # define KERNDIR "/usr/src/linux/drivers/sbus/char"
 #else
index def2333..8df477e 100644 (file)
@@ -98,7 +98,13 @@ assemble_utf8(char **inptr, int cnt) {
        *inptr = in;
        return uc;
 }
-       
+
+static void
+clear_uni_entry(struct unicode_list *up) {
+       up->next = NULL;
+       up->seq = NULL;
+       up->prev = up;
+}      
 
 /*
  * Read description of a single font position.
@@ -277,15 +283,18 @@ readpsffont(FILE *fontf, char **allbufp, int *allszp,
        if (fontlenp)
                *fontlenp = fontlen;
 
-       if (hastable && uclistheadsp) {
+       if (!uclistheadsp)
+               return 0;       /* got font, don't need unicode_list */
+
+       *uclistheadsp = xrealloc(*uclistheadsp,
+               (fontpos0+fontlen)*sizeof(struct unicode_list));
+
+       if (hastable) {
                char *inptr, *endptr;
 
                inptr = inputbuf + ftoffset + fontlen * charsize;
                endptr = inputbuf + inputlth;
 
-               *uclistheadsp = xrealloc(*uclistheadsp,
-                       (fontpos0+fontlen)*sizeof(struct unicode_list));
-
                for (i=0; i<fontlen; i++) {
                        k = fontpos0 + i;
                        get_uni_entry(&inptr, &endptr,
@@ -296,6 +305,11 @@ readpsffont(FILE *fontf, char **allbufp, int *allszp,
                        fprintf(stderr, u, progname);
                        exit(EX_DATAERR);
                }
+       } else {
+               for (i=0; i<fontlen; i++) {
+                       k = fontpos0 + i;
+                       clear_uni_entry(&(*uclistheadsp)[k]);
+               }
        }
 
        return 0;               /* got psf font */
index f151937..95069ea 100644 (file)
@@ -278,9 +278,11 @@ main(int argc, char **argv) {
                notable = 1;
        } else {
                for (i = 1; i < argc; i ++) {
-                       if (!strcmp(argv[i], "-i") && i < argc-1)
+                       if ((!strcmp(argv[i], "-i") || !strcmp(argv[i], "-if"))
+                           && i < argc-1)
                                ifname = argv[++i];
-                       else if(!strcmp(argv[i], "-o") && i < argc-1)
+                       else if((!strcmp(argv[i],"-o")||!strcmp(argv[i],"-of"))
+                               && i < argc-1)
                                ofname = argv[++i];
                        else if(!strcmp(argv[i], "-it") && i < argc-1)
                                itname = argv[++i];
index da09a63..eeb6b48 100644 (file)
@@ -232,11 +232,15 @@ static int erase_mode = 1;
 static void
 do_loadfont(int fd, char *inbuf, int unit, int hwunit, int fontsize,
            char *pathname) {
-       char buf[16384];
-       int i;
+       char *buf;
+       int i, buflen;
        int bad_video_erase_char = 0;
 
-       memset(buf,0,sizeof(buf));
+       buflen = 32*fontsize;
+       if (buflen < 32*128)            /* below we access position 32 */
+               buflen = 32*128;        /* so need at least 32*33 */
+       buf = xmalloc(buflen);
+       memset(buf,0,buflen);
 
        if (unit < 1 || unit > 32) {
                fprintf(stderr, _("Bad character size %d\n"), unit);
@@ -423,8 +427,8 @@ loadnewfonts(int fd, char **ifiles, int ifilct,
                memcpy(bigfontbuf+bigfontbuflth-fontbuflth,
                       fontbuf, fontbuflth);
        }
-
        do_loadfont(fd, bigfontbuf, bigunit, hwunit, bigfontsize, NULL);
+
        if (uclistheads && !no_u)
                do_loadtable(fd, uclistheads, bigfontsize);
 }
index ad20316..7f432a6 100644 (file)
@@ -1,6 +1,6 @@
 #include <string.h>
 
-#define VERSION "1.00"
+#define VERSION "1.02"
 
 char *progname;