1.04
diff --git a/CHANGES b/CHANGES
index 045eb8c..174dc6c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -120,3 +120,47 @@
Setfont now accepts a text file containing a list of fonts to load.
o Made distinction between koi8-r and koi8-u.
o spawn_console and spawn_login invoke openvt, not open.
+
+Changes for 1.03 (aeb):
+
+o Added doc/scancodes/* with information on the scancodes produced
+ by PC keyboards.
+o Added by.map.
+o Added Unicode maps to Greek fonts.
+
+Changes for 1.04 (aeb, Olaf Hering, Kurt Garloff):
+
+o Programs:
+ - setfont etc: support for font widths other than 8
+ - loadkeys.y: also look at mac/include
+ - cp1250.syms.h: new
+ - setlogcons: new
+ - contrib/showfont: new
+ - contrib/psfsplit: new
+ - cad: don't create a temp file
+o Documentation:
+ - Minor changes to kbd FAQ. Extended scancode FAQ. New A20 docs.
+ - Minor changes to man pages.
+o Keymaps:
+ - New keymap include dir mac/include.
+ - Added euro1.map and euro2.map.
+ - Added some compose definitions to compose.latin and compose.latin1.
+ - Deleted be-latin1.map and renamed be2-latin1.map to be-latin1.map.
+ There seems to be consensus that it is better than the original
+ be-latin1.map.
+ - Renamed hebrew.map to il-phonetic.map and added il.map.
+ - Applied fix from Jochen Hein to de.map.
+ - Applied SuSE fixes to mac-de-latin1-nodeadkeys.map, us.map, de*.map.
+ - Added mac-be.map, mac-de-latin1.map, mac-de_CH.map, mac-dk-latin1.map,
+ mac-es.map, mac-fi-latin1.map, mac-fr.map, mac-fr_CH-latin1.map,
+ mac-it.map, mac-pt-latin1.map, mac-se.map, mac-uk.map, mac-us.map,
+ br-latin1-abnt2.map, br-latin1-us.map, cz.map, de_CH-latin1.map,
+ mk.map (renamed the old one to mk0.map), mk-cp1251.map, mk-utf.map,
+ ro_win.map and cz-cp1250.map.
+o Unimaps:
+ - Added cp1250.uni.
+o Console translations:
+ - Added iso02_to_cp1250.trans.
+o Fonts:
+ - Added cybercafe.fnt, sun12x22.psfu, cp1250.psfu,
+ cp857.08, cp857.14, cp857.16.
diff --git a/Makefile.in b/Makefile.in
index ef5666a..99235cb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -10,7 +10,7 @@
FONTDIR = consolefonts
PARTIALDIR= partialfonts
TRANSDIR = consoletrans
-KEYMAPSUBDIRS = include sun amiga atari mac i386/azerty i386/dvorak i386/fgGIod i386/qwerty i386/qwertz i386/include
+KEYMAPSUBDIRS = include sun amiga atari i386/azerty i386/dvorak i386/fgGIod i386/qwerty i386/qwertz i386/include mac/include mac/all
# Do not use GZIP - it is interpreted by gzip
MYGZIP = gzip -f -9
diff --git a/configure b/configure
index 4a960c2..4ea6b92 100755
--- a/configure
+++ b/configure
@@ -1,9 +1,7 @@
#!/bin/sh
#
# Call:
-# ./configure
-# or
-# ./configure --datadir=DATADIR
+# ./configure [--datadir=DATADIR] [--disable-nls]
#
# Where shall we store our stuff?
# Old default: /usr/lib/kbd
@@ -55,7 +53,7 @@
;;
esac
-for i in Makefile src/Makefile man/man1/dumpkeys.1 man/man1/loadkeys.1 man/man8/setfont.8; do
+for i in Makefile src/Makefile man/man1/dumpkeys.1 man/man1/loadkeys.1 man/man8/setfont.8 man/man8/loadunimap.8 man/man8/mapscrn.8; do
sed -e "
s,@datadir@,$datadir,
" $i.in > $i
diff --git a/contrib/psfsplit b/contrib/psfsplit
new file mode 100755
index 0000000..558a8be
--- /dev/null
+++ b/contrib/psfsplit
@@ -0,0 +1,27 @@
+#!/bin/sh
+# (c) Ricardas Cepas <rch@pub.osf.lt>. Copying policy: GNU GPL V2.
+set -o errexit
+#set -x
+if [ $# != 1 ]
+then echo ' Usage: psfsplit <psf_bitmap_font_filename> '
+ exit
+fi
+if [ `hexdump -e '/2 "%X" ' -n2 $1 ` != "436" ]
+then echo $1 -- non .psf file
+ exit
+fi
+size=`hexdump -e '/1 "%i" ' -n1 -s2 $1 `
+size=$[ ($size % 2 + 1) * 256 ]
+height=`hexdump -e '/1 "%i" ' -n1 -s3 $1 `
+echo $size chars, height=$height
+mkdir $1_
+dd bs=4 count=1 if=$1 of=$1_/#psf_header &>/dev/null
+i=0
+while let $[ i < $size ]
+do
+ dd bs=1 count=$height skip=$[ $i * $height + 4 ] if=$1 \
+ of=$1_/`printf "%.3x" $i` &>/dev/null
+ let i+=1
+done
+dd bs=1 skip=$[ $i * $height + 4 ] if=$1 of=$1_/map_tables &>/dev/null
+
diff --git a/contrib/showfont b/contrib/showfont
new file mode 100755
index 0000000..7b60dc5
--- /dev/null
+++ b/contrib/showfont
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# From klaus.stehle@uni-tuebingen.de Tue Jan 25 07:24:02 2000
+#
+# A small shell script version of the `showfont' program
+#
+
+echo -e "\033%G"
+for L in "0 2 4 6" "1 3 5 7"; do
+ for P in 0 1 2 3 4 5 6 7; do
+ for U in 0 1 2 3; do
+ for K in $L; do
+ echo -ne " \357\20$U\2$K$P"
+ done
+ done
+ echo
+ done
+ echo
+done
+echo -ne "\033%@"
diff --git a/data/Makefile b/data/Makefile
index e123c79..2cee75b 100644
--- a/data/Makefile
+++ b/data/Makefile
@@ -10,6 +10,7 @@
install -m 644 $(UNIMAPDIR)/* $(DATADIR)/$(UNIMAPDIR)
install -d -m 755 $(DATADIR)/$(KEYMAPDIR)
install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/i386
+ install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/mac
for i in $(KEYMAPSUBDIRS); do \
install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/$$i ;\
install -m 644 $(KEYMAPDIR)_Z/$$i/* $(DATADIR)/$(KEYMAPDIR)/$$i ;\
diff --git a/data/consolefonts/README.cp1250 b/data/consolefonts/README.cp1250
new file mode 100644
index 0000000..02ea91e
--- /dev/null
+++ b/data/consolefonts/README.cp1250
@@ -0,0 +1,6 @@
+cp1250.psfu is a font for Microsoft cp1250.
+It was created by pasting suitable fragments of latin{0,1,2} fonts,
+and the symbols occurring in neither (various quotation marks,
+ellipsis, dagger, doubledagger, permille, bullet, endash, emdash,
+trademark) were left out. Maybe someone who actually uses this font
+can add them. - Andries
diff --git a/data/consolefonts/README.cybercafe b/data/consolefonts/README.cybercafe
new file mode 100644
index 0000000..94faf73
--- /dev/null
+++ b/data/consolefonts/README.cybercafe
@@ -0,0 +1,28 @@
+From alter@cybercafe.com.ua Thu Jun 29 03:35:34 2000
+
+I have created the font.
+I think that it is font of the 21st century.
+First time it looks unusual.
+But later any other font looks wrong.
+
+I made symbols from 0x20..0x7f|0xf0..0xff only.
+But I could made complete fonts.
+
+{
+Distribution policy.
+Such my font allowed to distribution in any form, and in any way.
+Such font have to be distributed only with this distribution policy
+and following information about the author.
+(It could be added somewhere in documentation or like a separate file.)
+Note: The entries, which was made with this font,
+is not an objects of this distribution policy.
+
+Information about author:
+handle: "the Alternative" or "Alt"
+real name: M[y|ee|i][|k]ha[i|j]lo M[ee|y|i]t[|h]ro[f|v]ano[w|v].
+borned in Kyiv/Ukraine in 21.XI.1976.
+email: alter@cybercafe.com.ua
+}
+
+---
+Since "alt" is a symbol encoding, I called this font cybercafe -- aeb
diff --git a/data/consolefonts/cp1250.psfu b/data/consolefonts/cp1250.psfu
new file mode 100644
index 0000000..5805c8f
--- /dev/null
+++ b/data/consolefonts/cp1250.psfu
Binary files differ
diff --git a/data/consolefonts/cp857.08 b/data/consolefonts/cp857.08
new file mode 100644
index 0000000..43792f5
--- /dev/null
+++ b/data/consolefonts/cp857.08
Binary files differ
diff --git a/data/consolefonts/cp857.14 b/data/consolefonts/cp857.14
new file mode 100644
index 0000000..ee7eb27
--- /dev/null
+++ b/data/consolefonts/cp857.14
Binary files differ
diff --git a/data/consolefonts/cp857.16 b/data/consolefonts/cp857.16
new file mode 100644
index 0000000..d65197f
--- /dev/null
+++ b/data/consolefonts/cp857.16
Binary files differ
diff --git a/data/consolefonts/cybercafe.fnt b/data/consolefonts/cybercafe.fnt
new file mode 100644
index 0000000..72a5820
--- /dev/null
+++ b/data/consolefonts/cybercafe.fnt
Binary files differ
diff --git a/data/consolefonts/sun12x22.psfu b/data/consolefonts/sun12x22.psfu
new file mode 100644
index 0000000..1ab6761
--- /dev/null
+++ b/data/consolefonts/sun12x22.psfu
Binary files differ
diff --git a/data/consoletrans/cp850_to_iso01.trans b/data/consoletrans/cp850_to_iso01.trans
index 29307ed..af06b1c 100644
--- a/data/consoletrans/cp850_to_iso01.trans
+++ b/data/consoletrans/cp850_to_iso01.trans
@@ -2,6 +2,8 @@
# this file allows using a cp850 encoded font to display iso-8859-1
# usage: setfont -m cp850_to_iso01.trans -u iso01.uni fontname
#
+# first column (internal value): iso-8859-1, second column (output): cp850
+#
0xa0 0xff
0xa1 0xad
0xa2 0xbd
diff --git a/data/consoletrans/iso02_to_cp1250.trans b/data/consoletrans/iso02_to_cp1250.trans
new file mode 100644
index 0000000..c83ef11
--- /dev/null
+++ b/data/consoletrans/iso02_to_cp1250.trans
@@ -0,0 +1,137 @@
+#
+# this file allows using an iso 8859-2 (latin-2) encoded font to display cp1250
+# (all letters will be OK, many symbols will be missing)
+#
+# usage: setfont -m iso02_to_cp1250.trans -u cp1250.uni fontname
+#
+# first column (internal value): cp1250, second column (output): iso-8859-2
+# first comment column: not in iso-8859-2
+#
+0x80 0x80 # EURO SIGN
+0x81 0x81 # UNDEFINED
+0x82 0x82 # SINGLE LOW-9 QUOTATION MARK
+0x83 0x83 # UNDEFINED
+0x84 0x84 # DOUBLE LOW-9 QUOTATION MARK
+0x85 0x85 # HORIZONTAL ELLIPSIS
+0x86 0x86 # DAGGER
+0x87 0x87 # DOUBLE DAGGER
+0x88 0x88 # UNDEFINED
+0x89 0x89 # PER MILLE SIGN
+0x8A 0xA9 # LATIN CAPITAL LETTER S WITH CARON
+0x8B 0x8B # SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+0x8C 0xA6 # LATIN CAPITAL LETTER S WITH ACUTE
+0x8D 0xAB # LATIN CAPITAL LETTER T WITH CARON
+0x8E 0xAE # LATIN CAPITAL LETTER Z WITH CARON
+0x8F 0xAC # LATIN CAPITAL LETTER Z WITH ACUTE
+0x90 0x90 # UNDEFINED
+0x91 0x91 # LEFT SINGLE QUOTATION MARK
+0x92 0x92 # RIGHT SINGLE QUOTATION MARK
+0x93 0x93 # LEFT DOUBLE QUOTATION MARK
+0x94 0x94 # RIGHT DOUBLE QUOTATION MARK
+0x95 0x95 # BULLET
+0x96 0x96 # EN DASH
+0x97 0x97 # EM DASH
+0x98 0x98 # UNDEFINED
+0x99 0x99 # TRADE MARK SIGN
+0x9A 0xB9 # LATIN SMALL LETTER S WITH CARON
+0x9B 0x9B # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+0x9C 0xB6 # LATIN SMALL LETTER S WITH ACUTE
+0x9D 0xBB # LATIN SMALL LETTER T WITH CARON
+0x9E 0xBE # LATIN SMALL LETTER Z WITH CARON
+0x9F 0xBC # LATIN SMALL LETTER Z WITH ACUTE
+0xA0 0xA0 # NO-BREAK SPACE
+0xA1 0xB7 # CARON
+0xA2 0xA2 # BREVE
+0xA3 0xA3 # LATIN CAPITAL LETTER L WITH STROKE
+0xA4 0xA4 # CURRENCY SIGN
+0xA5 0xA1 # LATIN CAPITAL LETTER A WITH OGONEK
+0xA6 0xA6 # BROKEN BAR
+0xA7 0xA7 # SECTION SIGN
+0xA8 0xA8 # DIAERESIS
+0xA9 0xA9 # COPYRIGHT SIGN
+0xAA 0xAA # LATIN CAPITAL LETTER S WITH CEDILLA
+0xAB 0xAB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xAC 0xAC # NOT SIGN
+0xAD 0xAD # SOFT HYPHEN
+0xAE 0xAE # REGISTERED SIGN
+0xAF 0xAF # LATIN CAPITAL LETTER Z WITH DOT ABOVE
+0xB0 0xB0 # DEGREE SIGN
+0xB1 0xB1 # PLUS-MINUS SIGN
+0xB2 0xB2 # OGONEK
+0xB3 0xB3 # LATIN SMALL LETTER L WITH STROKE
+0xB4 0xB4 # ACUTE ACCENT
+0xB5 0xB5 # MICRO SIGN
+0xB6 0xB6 # PILCROW SIGN
+0xB7 0xB7 # MIDDLE DOT
+0xB8 0xB8 # CEDILLA
+0xB9 0xB1 # LATIN SMALL LETTER A WITH OGONEK
+0xBA 0xBA # LATIN SMALL LETTER S WITH CEDILLA
+0xBB 0xBB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xBC 0xA5 # LATIN CAPITAL LETTER L WITH CARON
+0xBD 0xBD # DOUBLE ACUTE ACCENT
+0xBE 0xB5 # LATIN SMALL LETTER L WITH CARON
+0xBF 0xBF # LATIN SMALL LETTER Z WITH DOT ABOVE
+0xC0 0xC0 # LATIN CAPITAL LETTER R WITH ACUTE
+0xC1 0xC1 # LATIN CAPITAL LETTER A WITH ACUTE
+0xC2 0xC2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0xC3 0xC3 # LATIN CAPITAL LETTER A WITH BREVE
+0xC4 0xC4 # LATIN CAPITAL LETTER A WITH DIAERESIS
+0xC5 0xC5 # LATIN CAPITAL LETTER L WITH ACUTE
+0xC6 0xC6 # LATIN CAPITAL LETTER C WITH ACUTE
+0xC7 0xC7 # LATIN CAPITAL LETTER C WITH CEDILLA
+0xC8 0xC8 # LATIN CAPITAL LETTER C WITH CARON
+0xC9 0xC9 # LATIN CAPITAL LETTER E WITH ACUTE
+0xCA 0xCA # LATIN CAPITAL LETTER E WITH OGONEK
+0xCB 0xCB # LATIN CAPITAL LETTER E WITH DIAERESIS
+0xCC 0xCC # LATIN CAPITAL LETTER E WITH CARON
+0xCD 0xCD # LATIN CAPITAL LETTER I WITH ACUTE
+0xCE 0xCE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0xCF 0xCF # LATIN CAPITAL LETTER D WITH CARON
+0xD0 0xD0 # LATIN CAPITAL LETTER D WITH STROKE
+0xD1 0xD1 # LATIN CAPITAL LETTER N WITH ACUTE
+0xD2 0xD2 # LATIN CAPITAL LETTER N WITH CARON
+0xD3 0xD3 # LATIN CAPITAL LETTER O WITH ACUTE
+0xD4 0xD4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0xD5 0xD5 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+0xD6 0xD6 # LATIN CAPITAL LETTER O WITH DIAERESIS
+0xD7 0xD7 # MULTIPLICATION SIGN
+0xD8 0xD8 # LATIN CAPITAL LETTER R WITH CARON
+0xD9 0xD9 # LATIN CAPITAL LETTER U WITH RING ABOVE
+0xDA 0xDA # LATIN CAPITAL LETTER U WITH ACUTE
+0xDB 0xDB # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+0xDC 0xDC # LATIN CAPITAL LETTER U WITH DIAERESIS
+0xDD 0xDD # LATIN CAPITAL LETTER Y WITH ACUTE
+0xDE 0xDE # LATIN CAPITAL LETTER T WITH CEDILLA
+0xDF 0xDF # LATIN SMALL LETTER SHARP S
+0xE0 0xE0 # LATIN SMALL LETTER R WITH ACUTE
+0xE1 0xE1 # LATIN SMALL LETTER A WITH ACUTE
+0xE2 0xE2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
+0xE3 0xE3 # LATIN SMALL LETTER A WITH BREVE
+0xE4 0xE4 # LATIN SMALL LETTER A WITH DIAERESIS
+0xE5 0xE5 # LATIN SMALL LETTER L WITH ACUTE
+0xE6 0xE6 # LATIN SMALL LETTER C WITH ACUTE
+0xE7 0xE7 # LATIN SMALL LETTER C WITH CEDILLA
+0xE8 0xE8 # LATIN SMALL LETTER C WITH CARON
+0xE9 0xE9 # LATIN SMALL LETTER E WITH ACUTE
+0xEA 0xEA # LATIN SMALL LETTER E WITH OGONEK
+0xEB 0xEB # LATIN SMALL LETTER E WITH DIAERESIS
+0xEC 0xEC # LATIN SMALL LETTER E WITH CARON
+0xED 0xED # LATIN SMALL LETTER I WITH ACUTE
+0xEE 0xEE # LATIN SMALL LETTER I WITH CIRCUMFLEX
+0xEF 0xEF # LATIN SMALL LETTER D WITH CARON
+0xF0 0xF0 # LATIN SMALL LETTER D WITH STROKE
+0xF1 0xF1 # LATIN SMALL LETTER N WITH ACUTE
+0xF2 0xF2 # LATIN SMALL LETTER N WITH CARON
+0xF3 0xF3 # LATIN SMALL LETTER O WITH ACUTE
+0xF4 0xF4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
+0xF5 0xF5 # LATIN SMALL LETTER O WITH DOUBLE ACUTE
+0xF6 0xF6 # LATIN SMALL LETTER O WITH DIAERESIS
+0xF7 0xF7 # DIVISION SIGN
+0xF8 0xF8 # LATIN SMALL LETTER R WITH CARON
+0xF9 0xF9 # LATIN SMALL LETTER U WITH RING ABOVE
+0xFA 0xFA # LATIN SMALL LETTER U WITH ACUTE
+0xFB 0xFB # LATIN SMALL LETTER U WITH DOUBLE ACUTE
+0xFC 0xFC # LATIN SMALL LETTER U WITH DIAERESIS
+0xFD 0xFD # LATIN SMALL LETTER Y WITH ACUTE
+0xFE 0xFE # LATIN SMALL LETTER T WITH CEDILLA
+0xFF 0xFF # DOT ABOVE
diff --git a/data/keymaps/i386/azerty/be-latin1.map b/data/keymaps/i386/azerty/be-latin1.map
index 878be52..b6ee172 100644
--- a/data/keymaps/i386/azerty/be-latin1.map
+++ b/data/keymaps/i386/azerty/be-latin1.map
@@ -1,4 +1,5 @@
-# This map derived from one contributed by Robert Herzog <rherzog@ulb.ac.be>.
+# This map derived from one contributed by Robert Herzog <rherzog@ulb.ac.be>
+# with improvements by Pablo Saratxaga <srtxg@f2219.n293.z2.fidonet.org>
keymaps 0-2,4,6,8,12
alt_is_meta
include "azerty-layout"
@@ -20,7 +21,7 @@
keycode 6 = parenleft five
control keycode 6 = Control_bracketright
alt keycode 6 = Meta_five
-keycode 7 = paragraph six dead_circumflex
+keycode 7 = paragraph six asciicircum
control keycode 7 = Control_asciicircum
alt keycode 7 = Meta_six
keycode 8 = egrave seven
@@ -50,13 +51,10 @@
keycode 40 = ugrave percent dead_acute
control keycode 40 = Control_g
alt keycode 40 = Meta_apostrophe
-keycode 41 = mu sterling dead_grave
- control keycode 41 = nul
- alt keycode 41 = Meta_grave
+keycode 41 = twosuperior threesuperior
keycode 42 = Shift
-keycode 43 =
- control keycode 43 = Control_backslash
- alt keycode 43 = Meta_backslash
+keycode 43 = mu sterling dead_grave
+ alt keycode 43 = Meta_grave
keycode 50 = comma question
keycode 51 = semicolon period
keycode 52 = colon slash
diff --git a/data/keymaps/i386/azerty/be2-latin1.map b/data/keymaps/i386/azerty/be2-latin1.map
deleted file mode 100644
index 2c8723e..0000000
--- a/data/keymaps/i386/azerty/be2-latin1.map
+++ /dev/null
@@ -1,20 +0,0 @@
-#From srtxg@habcnx.interpac.be Wed Apr 26 07:21:00 1995
-#
-#I've seen some (minor) differences between be-latin1.map and my own keyboard,
-#so I send you the modified keymap.
-#(the differences are twosuperior and threesuperior added(keycode 41), grave at
-#the correct place(43), and changed the ^ on the numbers row (7) to have the
-#same behaviour than in ms-dos)
-
-# be-latin1.map modified by Pablo Saratxaga <srtxg@f2219.n293.z2.fidonet.org>
-include "be-latin1.map"
-
- altgr keycode 7 = asciicircum
-keycode 41 = twosuperior threesuperior
-keycode 43 = mu sterling dead_grave
- alt keycode 43 = Meta_grave
-
-# be-latin1.map has here:
-# altgr keycode 7 = dead_circumflex
-# keycode 41 = mu sterling dead_grave
-# keycode 43 = <absent>
diff --git a/data/keymaps/i386/include/ctrl.map b/data/keymaps/i386/include/ctrl.map
index 3db7259..5cff0c0 100644
--- a/data/keymaps/i386/include/ctrl.map
+++ b/data/keymaps/i386/include/ctrl.map
@@ -1,3 +1,6 @@
keycode 29 = Caps_Lock
keycode 58 = Control
keycode 97 = Compose
+
+# "keycode 97 = Control Compose" is also popular
+# (Right Ctrl + Shift for Compose)
diff --git a/data/keymaps/i386/include/euro1.map b/data/keymaps/i386/include/euro1.map
new file mode 100644
index 0000000..0e5be38
--- /dev/null
+++ b/data/keymaps/i386/include/euro1.map
@@ -0,0 +1,6 @@
+# Euro and cent
+# [Say: "loadkeys euro1" to get Euro and cent with AltGr (right alt)
+# on the positions where many keyboards have 5 and C.
+# To get it displayed, use a latin0 (i.e., latin9) font.]
+altgr keycode 6 = currency
+altgr keycode 46 = cent
diff --git a/data/keymaps/i386/include/euro2.map b/data/keymaps/i386/include/euro2.map
new file mode 100644
index 0000000..1f456f7
--- /dev/null
+++ b/data/keymaps/i386/include/euro2.map
@@ -0,0 +1,6 @@
+# Euro and cent
+# [Say: "loadkeys euro2" to get Euro and cent with AltGr (right alt)
+# on the positions where many keyboards have E and C.
+# To get it displayed, use a latin0 (i.e., latin9) font.]
+altgr keycode 18 = currency
+altgr keycode 46 = cent
diff --git a/data/keymaps/i386/include/windowkeys.map b/data/keymaps/i386/include/windowkeys.map
index bb5517f..aaa5c78 100644
--- a/data/keymaps/i386/include/windowkeys.map
+++ b/data/keymaps/i386/include/windowkeys.map
@@ -3,3 +3,5 @@
keycode 125 = Decr_Console
keycode 126 = Incr_Console
keycode 127 = Last_Console
+
+# "keycode 127 = Compose" is also popular
diff --git a/data/keymaps/i386/qwerty/br-latin1-abnt2.map b/data/keymaps/i386/qwerty/br-latin1-abnt2.map
new file mode 100644
index 0000000..a9c10ee
--- /dev/null
+++ b/data/keymaps/i386/qwerty/br-latin1-abnt2.map
@@ -0,0 +1,75 @@
+#
+# $Id: Brazilian Mapping for Brazilian ABNT2 Keyboards $
+# $Revision: 1.1.1 $
+# $Author: Antonio Dias <accdias@sst.com.br> $
+#
+# Console fonts lat1-*.psfu work best with this mapping
+#
+# Changelog:
+# 2000-03-06 accdias Initial Release
+# 2000-03-12 accdias Modified keycode 14 to send Delete
+#
+keymaps 0-2,4-6,8-9,12
+alt_is_meta
+include "qwerty-layout"
+include "linux-with-alt-and-altgr"
+strings as usual
+compose as usual for "iso-8859-1"
+compose '\'' 'C' to Ccedilla
+compose '\'' 'c' to ccedilla
+
+keycode 1 = Escape
+keycode 2 = one exclam onesuperior
+keycode 3 = two at twosuperior nul nul
+keycode 4 = three numbersign threesuperior
+ control keycode 4 = Escape
+keycode 5 = four dollar sterling Control_backslash
+keycode 6 = five percent cent
+ control keycode 6 = Control_bracketright
+keycode 7 = six dead_diaeresis notsign
+ control keycode 7 = Control_asciicircum
+keycode 8 = seven ampersand braceleft Control_underscore
+keycode 9 = eight asterisk bracketleft Delete
+keycode 10 = nine parenleft bracketright
+keycode 11 = zero parenright braceright
+keycode 12 = minus underscore backslash Control_underscore Control_underscore
+keycode 13 = equal plus section
+keycode 14 = Delete
+keycode 15 = Tab
+keycode 26 = dead_acute dead_grave
+ control keycode 26 = Escape
+keycode 27 = bracketleft braceleft ordfeminine
+keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+keycode 29 = Control
+keycode 39 = +ccedilla +Ccedilla
+keycode 40 = dead_tilde dead_circumflex
+ control keycode 40 = Control_g
+keycode 41 = apostrophe quotedbl
+ control keycode 41 = nul
+keycode 42 = Shift
+keycode 43 = bracketright braceright masculine
+ control keycode 43 = Control_bracketright
+keycode 51 = comma less
+keycode 52 = period greater
+keycode 53 = slash question
+ control keycode 52 = nul
+keycode 54 = Shift
+keycode 56 = Alt
+keycode 57 = space
+ control keycode 57 = nul
+ alt keycode 57 = Meta_space
+keycode 58 = Caps_Lock
+keycode 97 = Control
+#
+# Windows Left and Right Keys
+#
+keycode 125 = Decr_Console
+keycode 126 = Incr_Console
+#
+# Windows Menu Key
+#
+keycode 127 = Last_Console
+#
+# End of file
+#
diff --git a/data/keymaps/i386/qwerty/br-latin1-us.map b/data/keymaps/i386/qwerty/br-latin1-us.map
new file mode 100644
index 0000000..cf22bff
--- /dev/null
+++ b/data/keymaps/i386/qwerty/br-latin1-us.map
@@ -0,0 +1,74 @@
+#
+# $Id: Brazilian Mapping for US International Keyboards $
+# $Revision: 1.0.1 $
+# $Author: Antonio Dias <accdias@sst.com.br> $
+#
+# Console fonts lat1-*.psfu work best with this mapping
+#
+# Changelog:
+# 2000-03-06 accdias Initial Release
+# 2000-03-12 accdias Modified keycode 14 to send Delete
+#
+keymaps 0-2,4-6,8-9,12
+alt_is_meta
+include "qwerty-layout"
+include "linux-with-two-alt-keys"
+strings as usual
+compose as usual for "iso-8859-1"
+compose '\'' 'C' to Ccedilla
+compose '\'' 'c' to ccedilla
+
+keycode 1 = Escape
+keycode 2 = one exclam onesuperior
+keycode 3 = two at twosuperior nul nul
+keycode 4 = three numbersign threesuperior
+ control keycode 4 = Escape
+keycode 5 = four dollar sterling Control_backslash
+keycode 6 = five percent cent
+ control keycode 6 = Control_bracketright
+keycode 7 = six dead_circumflex notsign
+ control keycode 7 = Control_asciicircum
+keycode 8 = seven ampersand braceleft Control_underscore
+keycode 9 = eight asterisk bracketleft Delete
+keycode 10 = nine parenleft bracketright
+keycode 11 = zero parenright braceright
+keycode 12 = minus underscore backslash Control_underscore Control_underscore
+keycode 13 = equal plus section
+keycode 14 = Delete
+keycode 15 = Tab
+keycode 26 = bracketleft braceleft
+ control keycode 26 = Escape
+keycode 27 = bracketright braceright asciitilde Control_bracketright
+keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+keycode 29 = Control
+keycode 39 = semicolon colon
+keycode 40 = dead_acute dead_diaeresis
+ control keycode 40 = Control_g
+keycode 41 = dead_grave dead_tilde
+ control keycode 41 = nul
+keycode 42 = Shift
+keycode 43 = backslash bar masculine
+ control keycode 43 = Control_backslash
+keycode 51 = comma less
+keycode 52 = period greater
+keycode 53 = slash question
+ control keycode 53 = Delete
+keycode 54 = Shift
+keycode 56 = Alt
+keycode 57 = space
+ control keycode 57 = nul
+keycode 58 = Caps_Lock
+keycode 97 = Control
+#
+# Windows Left and Right Keys
+#
+keycode 125 = Decr_Console
+keycode 126 = Incr_Console
+#
+# Windows Menu Key
+#
+keycode 127 = Last_Console
+#
+# End of file
+#
diff --git a/data/keymaps/i386/qwerty/cz-cp1250.map b/data/keymaps/i386/qwerty/cz-cp1250.map
new file mode 100644
index 0000000..b29066c
--- /dev/null
+++ b/data/keymaps/i386/qwerty/cz-cp1250.map
@@ -0,0 +1,255 @@
+# Czech Windows CP 1250 keyboard map for text console
+# Modified by Tomas Lorenc (tomas@ct.cz) from:
+# Czech ISO 8859-2 keyboard map for text console
+# Written and (c) copyright by Jan Kasprzak (kas@ics.muni.cz)
+# You can distribute this file under the terms of GNU General
+# Public License (GPL). See the file COPYING.
+#
+# Ceska klavesnice se zapne a vypne klavesou Pause.
+# Klavesou AltGr (Right Alt) je mozne se prepnout z ceske do US a naopak.
+# Klavesa Pause pak funguje jako AltGr-lock.
+#
+# Klavesnice je kompletne ceska, krome jedineho pripadu:
+# Ma rozlozeni klaves qwerty a nikoliv qwertz, jak je tomu
+# na standardnim ceskem psacim stroji.
+#
+charset "cp-1250"
+keymaps 0-15
+strings as usual
+keycode 1 = Escape Escape Escape Escape Escape Escape Escape Escape Meta_Escape Meta_Escape Meta_Escape Meta_Escape Meta_Escape Meta_Escape Meta_Escape Meta_Escape
+keycode 2 = one exclam plus one VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_one Meta_one Meta_one Meta_one
+keycode 3 = two at ecaron two nul nul nul nul Meta_two Meta_two Meta_two Meta_two
+keycode 4 = three numbersign scaron three Escape VoidSymbol Escape VoidSymbol Meta_three Meta_three Meta_three Meta_three Meta_three
+keycode 5 = four dollar ccaron four Control_backslash VoidSymbol Control_backslash VoidSymbol Meta_four Meta_four Meta_four Meta_four
+keycode 6 = five percent rcaron five Control_bracketright VoidSymbol Control_bracketright VoidSymbol Meta_five Meta_five Meta_five Meta_five
+keycode 7 = six asciicircum zcaron six Control_asciicircum VoidSymbol Control_asciicircum VoidSymbol Meta_six Meta_six Meta_six Meta_six
+keycode 8 = seven ampersand yacute seven Control_underscore VoidSymbol Control_underscore VoidSymbol Meta_seven Meta_seven Meta_seven Meta_seven
+keycode 9 = eight asterisk aacute eight Delete VoidSymbol Delete VoidSymbol Meta_eight Meta_eight Meta_eight Meta_eight
+keycode 10 = nine parenleft iacute nine VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_nine Meta_nine Meta_nine Meta_nine
+keycode 11 = zero parenright eacute zero VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_zero Meta_zero Meta_zero Meta_zero
+keycode 12 = minus underscore equal percent Control_underscore Control_underscore Control_underscore Control_underscore Meta_minus Meta_minus Meta_minus Meta_minus
+keycode 13 = equal plus dead_acute dead_circumflex VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_equal Meta_equal Meta_equal Meta_equal
+keycode 14 = Delete Delete Delete Delete VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_Delete Meta_Delete Meta_Delete Meta_Delete
+keycode 15 = Tab Tab Tab Tab VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_Tab Meta_Tab Meta_Tab Meta_Tab
+keycode 16 = q
+keycode 17 = w
+keycode 18 = e
+keycode 19 = r
+keycode 20 = t
+keycode 21 = y
+keycode 22 = u
+keycode 23 = i
+keycode 24 = o
+keycode 25 = p
+keycode 26 = bracketleft braceleft uacute slash Escape VoidSymbol Escape VoidSymbol Meta_bracketleft Meta_bracketleft Meta_bracketleft Meta_bracketleft
+keycode 27 = bracketright braceright parenright parenleft Control_bracketright VoidSymbol Control_bracketright VoidSymbol Meta_bracketright Meta_bracketright Meta_bracketright Meta_bracketright
+keycode 28 = Return
+altgr keycode 28 = Return
+alt keycode 28 = Meta_Control_m
+alt altgr keycode 28 = Meta_Control_m
+keycode 29 = Control
+keycode 30 = a
+keycode 31 = s
+keycode 32 = d
+keycode 33 = f
+keycode 34 = g
+keycode 35 = h
+keycode 36 = j
+keycode 37 = k
+keycode 38 = l
+keycode 39 = semicolon colon uring quotedbl VoidSymbol VoidSymbol VoidSymbol VoidSymbol Meta_semicolon Meta_semicolon Meta_semicolon Meta_semicolon
+keycode 40 = apostrophe quotedbl 0xa7 exclam Control_g VoidSymbol Control_g VoidSymbol Meta_apostrophe Meta_apostrophe Meta_apostrophe Meta_apostrophe
+keycode 41 = grave asciitilde grave semicolon nul VoidSymbol nul VoidSymbol Meta_grave VoidSymbol Meta_grave
+keycode 42 = Shift
+keycode 43 = backslash bar backslash bar Control_backslash VoidSymbol Control_backslash VoidSymbol Meta_backslash VoidSymbol Meta_backslash
+keycode 44 = z
+keycode 45 = x
+keycode 46 = c
+keycode 47 = v
+keycode 48 = b
+keycode 49 = n
+keycode 50 = m
+keycode 51 = comma less comma question
+alt keycode 51 = Meta_comma
+alt altgr keycode 51 = Meta_comma
+keycode 52 = period greater period colon Compose VoidSymbol Compose VoidSymbol Meta_period VoidSymbol Meta_period
+keycode 53 = slash question minus underscore Delete VoidSymbol Delete VoidSymbol Meta_slash VoidSymbol Meta_slash
+keycode 54 = Shift
+keycode 55 = KP_Multiply
+keycode 56 = Alt
+keycode 57 = space space space space nul nul nul nul Meta_space Meta_space Meta_space Meta_space
+keycode 58 = Caps_Lock
+keycode 59 = F1 F13 F1 F13 F1 VoidSymbol F1 VoidSymbol Console_1 VoidSymbol Console_1
+keycode 60 = F2 F14 F2 F14 F2 VoidSymbol F2 VoidSymbol Console_2 VoidSymbol Console_2
+keycode 61 = F3 F15 F3 F15 F3 VoidSymbol F3 VoidSymbol Console_3 VoidSymbol Console_3
+keycode 62 = F4 F16 F4 F15 F4 VoidSymbol F4 VoidSymbol Console_4 VoidSymbol Console_4
+keycode 63 = F5 F17 F5 F15 F5 VoidSymbol F5 VoidSymbol Console_5 VoidSymbol Console_5
+keycode 64 = F6 F18 F6 F15 F6 VoidSymbol F6 VoidSymbol Console_6 VoidSymbol Console_6
+keycode 65 = F7 F19 F7 F15 F7 VoidSymbol F7 VoidSymbol Console_7 VoidSymbol Console_7
+keycode 66 = F8 F20 F8 F15 F8 VoidSymbol F8 VoidSymbol Console_8 VoidSymbol Console_8
+keycode 67 = F9 F9 F9 F9 F9 VoidSymbol F9 VoidSymbol Console_9 VoidSymbol Console_9
+keycode 68 = F10 F10 F10 F10 F10 VoidSymbol F10 VoidSymbol Console_10 VoidSymbol Console_10
+keycode 69 = Num_Lock
+keycode 70 = Scroll_Lock Show_Memory Show_Registers
+control keycode 70 = Show_State
+alt keycode 70 = Scroll_Lock
+keycode 71 = KP_7
+alt keycode 71 = Ascii_7
+keycode 72 = KP_8
+alt keycode 72 = Ascii_8
+keycode 73 = KP_9
+alt keycode 73 = Ascii_9
+keycode 74 = KP_Subtract
+keycode 75 = KP_4
+alt keycode 75 = Ascii_4
+keycode 76 = KP_5
+alt keycode 76 = Ascii_5
+keycode 77 = KP_6
+alt keycode 77 = Ascii_6
+keycode 78 = KP_Add
+keycode 79 = KP_1
+alt keycode 79 = Ascii_1
+keycode 80 = KP_2
+alt keycode 80 = Ascii_2
+keycode 81 = KP_3
+alt keycode 81 = Ascii_3
+keycode 82 = KP_0
+alt keycode 82 = Ascii_0
+keycode 83 = KP_Period
+control alt keycode 83 = Boot
+keycode 84 = Last_Console
+keycode 85 =
+keycode 86 = less greater bar
+alt keycode 86 = Meta_less
+keycode 87 = F11 F11 F11 F11 F11 VoidSymbol F11 VoidSymbol Console_11 VoidSymbol Console_11
+keycode 88 = F12 F12 F12 F12 F12 VoidSymbol F12 VoidSymbol Console_12 VoidSymbol Console_12
+keycode 89 =
+keycode 90 =
+keycode 91 =
+keycode 92 =
+keycode 93 =
+keycode 94 =
+keycode 95 =
+keycode 96 = KP_Enter
+keycode 97 = Control
+keycode 98 = KP_Divide
+keycode 99 = Control_backslash
+control keycode 99 = Control_backslash
+alt keycode 99 = Control_backslash
+keycode 100 = AltGr
+keycode 101 = Break
+keycode 102 = Find
+keycode 103 = Up
+keycode 104 = Prior
+shift keycode 104 = Scroll_Backward
+keycode 105 = Left
+ alt keycode 105 = Decr_Console
+ alt altgr keycode 105 = Decr_Console
+keycode 106 = Right
+ alt keycode 106 = Incr_Console
+ alt altgr keycode 106 = Incr_Console
+keycode 107 = Select
+keycode 108 = Down
+keycode 109 = Next
+shift keycode 109 = Scroll_Forward
+keycode 110 = Insert
+keycode 111 = Remove
+control alt keycode 111 = 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 = AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock AltGr_Lock
+keycode 120 =
+keycode 121 =
+keycode 122 =
+keycode 123 =
+keycode 124 =
+keycode 125 =
+keycode 126 =
+keycode 127 =
+compose ',' 'A' to '¡'
+compose '/' 'L' to '£'
+compose '^' 'L' to '¥'
+compose '\'' 'S' to '¦'
+compose '^' 'S' to ''
+compose ',' 'S' to 'ª'
+compose '^' 'T' to ''
+compose '\'' 'Z' to '¬'
+compose '^' 'Z' to ''
+compose '.' 'Z' to '¯'
+compose ',' 'a' to '±'
+compose '/' 'l' to '³'
+compose '^' 'l' to 'µ'
+compose '\'' 's' to '¶'
+compose '^' 's' to ''
+compose ',' 's' to 'º'
+compose '^' 't' to ''
+compose '\'' 'z' to '¼'
+compose '^' 'z' to ''
+compose '.' 'z' to '¿'
+compose '\'' 'R' to 'À'
+compose '\'' 'A' to 'Á'
+compose '^' 'A' to 'Â'
+compose '^' 'A' to 'Ã'
+compose ':' 'A' to 'Ä'
+compose '\'' 'L' to 'Å'
+compose '\'' 'C' to 'Æ'
+compose ',' 'C' to 'Ç'
+compose '^' 'C' to 'È'
+compose '\'' 'E' to 'É'
+compose ',' 'E' to 'Ê'
+compose '"' 'E' to 'Ë'
+compose '^' 'E' to 'Ì'
+compose '\'' 'I' to 'Í'
+compose '^' 'I' to 'Î'
+compose '^' 'D' to 'Ï'
+compose '-' 'D' to 'Ð'
+compose '\'' 'N' to 'Ñ'
+compose '^' 'N' to 'Ò'
+compose '\'' 'O' to 'Ó'
+compose '^' 'O' to 'Ô'
+compose '"' 'O' to 'Õ'
+compose ':' 'O' to 'Ö'
+compose '^' 'R' to 'Ø'
+compose '^' 'U' to 'Ù'
+compose '\'' 'U' to 'Ú'
+compose '"' 'U' to 'Û'
+compose ':' 'U' to 'Ü'
+compose '\'' 'Y' to 'Ý'
+compose ',' 'T' to 'Þ'
+compose 's' 's' to 'ß'
+compose 'S' 'S' to 'ß'
+compose '\'' 'r' to 'à'
+compose '\'' 'a' to 'á'
+compose '^' 'a' to 'â'
+compose '^' 'a' to 'ã'
+compose ':' 'a' to 'ä'
+compose '\'' 'l' to 'å'
+compose '\'' 'c' to 'æ'
+compose ',' 'c' to 'ç'
+compose '^' 'c' to 'è'
+compose '\'' 'e' to 'é'
+compose ',' 'e' to 'ê'
+compose ':' 'e' to 'ë'
+compose '^' 'e' to 'ì'
+compose '\'' 'i' to 'í'
+compose '^' 'e' to 'î'
+compose '^' 'd' to 'ï'
+compose '-' 'd' to 'ð'
+compose '\'' 'n' to 'ñ'
+compose '^' 'n' to 'ò'
+compose '\'' 'o' to 'ó'
+compose '^' 'o' to 'ô'
+compose ':' 'o' to 'õ'
+compose '"' 'o' to 'ö'
+compose '^' 'r' to 'ø'
+compose '^' 'u' to 'ù'
+compose '\'' 'u' to 'ú'
+compose '"' 'u' to 'û'
+compose ':' 'u' to 'ü'
+compose '\'' 'y' to 'ý'
+compose ',' 't' to 'þ'
diff --git a/data/keymaps/i386/qwerty/cz.map b/data/keymaps/i386/qwerty/cz.map
new file mode 100644
index 0000000..7b48edc
--- /dev/null
+++ b/data/keymaps/i386/qwerty/cz.map
@@ -0,0 +1,1430 @@
+# Tato keymapa NENI urcena pro jadro "opatchovane" programem "patch-capslock"
+#
+# klavesova mapa kompatibilni s windows QWERTZ
+#
+# Vytvoril: Richard S~puta, Richard.Sputa@os3.os.ds.mfcr.cz
+#
+# verze: 2.0.2
+#
+# License: GNU GPL 2
+#
+# Links: ftp://ftp.penguin.cz/pub/cestina/klavesnice/console/
+# - primary ftp archiv
+# http://www.debian.cz/proj/czkbd/index.php3
+# - czech keyboard standarts
+#
+#
+# POZOR: Tato klavesova mapa obsahuje ve skutecnosti 2 (dve) klavesnice
+# Primarni je CESKA
+# Sekundarni je US
+# Prepinani se provadi pomoci klavesy "Pause"
+# ktera funguje jako "ShiftR_Lock"
+# CESKA: Control-Klavesa, Alt-Klavesa, Alt-Shift-Klavesa
+# => funguje stejne jako v US klavesnici
+# US: AltGr-Klavesa, AltGr-Shift-Klavesa
+# => funguje stejne jako v CESKE klavesnici
+# (i dead klavesy na AltGr-2 az AltGr-9, AltGr-0, AltGr--, AltGr-=)
+# Navic klavesa "PrintScreen" funguje jako carka a hacek
+#
+#
+# Rozsireni oproti standartni_CESKE_unikodove_klavesnici
+# (zde jsou popsany pouze kombinace, jejichz umisteni je diskutabilni)
+# (popis ostatnich rozsireni je v souboru "readme.txt")
+# 1) AltGr-SPACE => znak "nobreakspace" (neoddelitelna mezera kod 0xa0)
+# 2) Ctrl-SPACE => znak "nul" (kod 0x00)
+# 3) AltGr-A => ~ (tilda - pozor AltGr-1 genruje mrtvou tildu)
+# 4) AltGr-H => ` (zpetny apostrof)
+# 5) AltGr-J => ' (apostrof)
+# 6) AltGr-M => ^ (jiz nikdy vice us-klavesnice)
+# 7) AltGr-Z => ° (stupen "degree")
+#
+#
+# Mrtve klavesy (u obou klavesnic - CESKE i US)
+# AltGr-2 => dead_caron (hacek_nad_pismenem)
+# AltGr-3 => dead_circumflex (striska_nad_pismenem)
+# AltGr-4 => dead_breve (obloucek_nad_pismenem)
+# AltGr-5 => (krouzek_nad_pismenem)
+# AltGr-6 => dead_cedilla (ocasek_pod_pismenem_smerujici_zprava_doleva)
+# AltGr-7 => (nedefinovano)
+# AltGr-8 => (tecka_nad_pismenem)
+# AltGr-9 => dead_acute (carka_nad_pismenem)
+# AltGr-0 => dead_doubleacute (dve_carky_nad_pismenem)
+# AltGr-- => dead_diaeresis (dve_tecky_nad_pismenem)
+# AltGr-= => dead_ogonek (ocasek_pod_pismenem_smerujici_zleva_doprava)
+# Mrtve klavesy (pouze u US klavesnice)
+# PrintScreen => dead_acute (carka_nad_pismenem)
+# Shift-PrintScreen => dead_caron (hacek_nad_pismenem)
+# => mozno pouzit i na krouzkovane U
+# Mrtve klavesy (pouze u CESKE klavesnice)
+# = => dead_acute (carka_nad_pismenem)
+# Shift-= => dead_caron (hacek_nad_pismenem)
+# Shift-~ => (krouzek_nad_pismenem)
+# Mrtva klavesa (pouze u ceske - ne vsak slovenske)
+# \ => dead_diaeresis (dve_tecky_nad_pismenem)
+#
+#
+#
+# Prosim zasilejte mi navrhy na zmeny a vylepseni - staci slovne.
+# (prosim piste pred kazdou klavesou slova "fyzicka" "logicka")
+# napr. Fyzicky stisk AltGr-Q generuje logickou klavesu \
+#
+#
+# Poznamka: Prosim napiste mi jak klavesnice funguje v emacsu
+# (mam na mysli klavesove kombinace jako Alt-Control-"neco")
+#
+# Poznamka: Ponevadz program "loadkeys" nezna keysym-y
+# dead_ring => mrtva klavesa pro krouzek
+# dead_dot => mrtva klavesa pro tecku_nad_pismenem
+# (krouzek je nutny pro U s krouzkem - cesky znak)
+# (tecka_nad_pismenem je nutna pro Z s teckou - polsky znak)
+# Naopak zna "dead_grave" => carka_nad_pismenem
+# v opacnem smeru nez je ceska carka
+# => nevyuzite v ISO-8859-2
+# pouzil jsem "dead_grave" misto "dead_ring" a "dead_abovedot"
+# KEYSYM-y kterych se to tyka:
+# dead_abovedot => "keysym 9" -> AltGr-8
+# dead_ring => "keysym 6" -> AltGr-5
+# "keysym 41" -> klavesa_pod_ESCAPE
+# U "keysym 8" by mnel byt definovan "pravy dead_grave"
+# ale protoze zadny znak v ISO-8859-2 toto nepouziva
+# a take proto, ze "dead_grave" je pouzit na neco jineho
+# tak tam neni nadefinovan
+# U "keysym 2" by mnel byt definovan "pravy dead_tilde"
+# ale protoze zadny znak v ISO-8859-2 toto nepouziva
+# tak tam neni nadefinovan
+# U "keysym 41" by mnel byt definovan "pravy dead_carka_nad_pismenem"
+# ale protoze zadny znak v ISO-8859-2 toto nepouziva
+# tak tam neni nadefinovan
+# navic tato dead klavesa neni ani definovana (v jadru 2.0.3x)
+#
+#
+#
+#
+#
+# znakova sada: Iso Latin 2
+charset "iso-8859-2"
+#
+# modifikator "ShiftL" byl pouzit pri stisku klaves "Shift"
+# modifikator "Shift" se meni pouze pri stisku klavesy "CapsLock"
+# modifikatory:
+###############
+# Shift 1
+# AltGr 2
+# Control 4
+# Alt 8
+# ShiftL 16
+# ShiftR 32
+# CtrlL 64
+# CtrlR 128
+#
+# plain 0 +32=32
+# Shift 1 +32=33
+# AltGr 2 +32=34
+# AltGr+Shift 3 +32=35
+# Control 4 +32=36
+# Control+Shift 5 +32=37
+# Control+AltGr 6 +32=38
+# Control+AltGr+Shift 7 +32=39
+# Alt 8 +32=40
+# Alt+Shift 9 +32=41
+# Alt+Control 12 +32=44
+# Alt+Control+Shift 13 +32=45
+# ShiftL 16 +32=48
+# ShiftL+Shift 17 +32=49
+# ShiftL+AltGr 18 +32=50
+# ShiftL+AltGr+Shift 19 +32=51
+# ShiftL+Control 20 +32=52
+# ShiftL+Control+AltGr 22 +32=54
+# ShiftL+Alt 24 +32=56
+# ShiftL+Alt+Shift 25 +32=57
+# ShiftL+Alt+Control 28 +32=60
+keymaps 0-9,12-13,16-20,22,24-25,28,32-41,44-45,48-52,54,56-57,60
+# Alt je Meta klavesa
+alt_is_meta
+#
+# synonyma:
+# BackSpace (primarni) => Control_h
+# Tab (primarni) => Control_i
+# Linefeed (primarni) => Control_j
+#
+# vzdalenost mezi zacatky symbolu:
+# 12 znaku (standartne) vyhovuje 80% symbolickych nazvu
+# 25 znaku ma symbolicky nazev Meta_Control_bracketright
+# 123456789012 123456789012 123456789012 123456789012 123456789012
+keycode 1 = Escape Escape VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Escape Escape VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 2 = plus plus VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_one Meta_one \
+ VoidSymbol VoidSymbol one one exclam \
+ exclam VoidSymbol VoidSymbol Meta_exclam Meta_exclam \
+ VoidSymbol \
+ one one VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_one Meta_one \
+ VoidSymbol VoidSymbol exclam exclam VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_exclam Meta_exclam \
+ VoidSymbol
+keycode 3 = +ecaron Ecaron dead_caron dead_caron nul \
+ nul VoidSymbol VoidSymbol Meta_two Meta_two \
+ VoidSymbol VoidSymbol two two at \
+ at VoidSymbol VoidSymbol Meta_at Meta_at \
+ VoidSymbol \
+ two two dead_caron dead_caron nul \
+ nul VoidSymbol VoidSymbol Meta_two Meta_two \
+ VoidSymbol VoidSymbol at at VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_at Meta_at \
+ VoidSymbol
+keycode 4 = +scaron Scaron dead_circumflex \
+ dead_circumflex Escape Escape VoidSymbol \
+ VoidSymbol Meta_three Meta_three VoidSymbol VoidSymbol \
+ three three numbersign numbersign VoidSymbol \
+ VoidSymbol Meta_numbersign Meta_numbersign \
+ VoidSymbol \
+ three three dead_circumflex \
+ dead_circumflex Escape Escape VoidSymbol \
+ VoidSymbol Meta_three Meta_three VoidSymbol VoidSymbol \
+ numbersign numbersign VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_numbersign Meta_numbersign \
+ VoidSymbol
+keycode 5 = +ccaron Ccaron dead_breve dead_breve \
+ Control_backslash Control_backslash VoidSymbol \
+ VoidSymbol Meta_four Meta_four VoidSymbol VoidSymbol \
+ four four dollar dollar VoidSymbol \
+ VoidSymbol Meta_dollar Meta_dollar VoidSymbol \
+ four four dead_breve dead_breve \
+ Control_backslash Control_backslash VoidSymbol \
+ VoidSymbol Meta_four Meta_four VoidSymbol VoidSymbol \
+ dollar dollar VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_dollar Meta_dollar VoidSymbol
+keycode 6 = +rcaron Rcaron dead_grave dead_grave \
+ Control_bracketright Control_bracketright VoidSymbol \
+ VoidSymbol Meta_five Meta_five VoidSymbol VoidSymbol \
+ five five percent percent VoidSymbol \
+ VoidSymbol Meta_percent Meta_percent VoidSymbol \
+ five five dead_grave dead_grave \
+ Control_bracketright Control_bracketright VoidSymbol \
+ VoidSymbol Meta_five Meta_five VoidSymbol VoidSymbol \
+ percent percent VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_percent Meta_percent VoidSymbol
+keycode 7 = +zcaron Zcaron dead_ogonek dead_ogonek \
+ Control_asciicircum Control_asciicircum VoidSymbol \
+ VoidSymbol Meta_six Meta_six VoidSymbol VoidSymbol \
+ six six asciicircum asciicircum VoidSymbol \
+ VoidSymbol Meta_asciicircum Meta_asciicircum \
+ VoidSymbol \
+ six six dead_ogonek dead_ogonek \
+ Control_asciicircum Control_asciicircum VoidSymbol \
+ VoidSymbol Meta_six Meta_six VoidSymbol VoidSymbol \
+ asciicircum asciicircum VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_asciicircum Meta_asciicircum \
+ VoidSymbol
+keycode 8 = +yacute Yacute VoidSymbol VoidSymbol \
+ Control_underscore Control_underscore VoidSymbol \
+ VoidSymbol Meta_seven Meta_seven VoidSymbol VoidSymbol \
+ seven seven ampersand ampersand VoidSymbol \
+ VoidSymbol Meta_ampersand Meta_ampersand \
+ VoidSymbol \
+ seven seven VoidSymbol VoidSymbol \
+ Control_underscore Control_underscore VoidSymbol \
+ VoidSymbol Meta_seven Meta_seven VoidSymbol VoidSymbol \
+ ampersand ampersand VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_ampersand Meta_ampersand \
+ VoidSymbol
+#
+#
+# "Delete" je znak s kodem 0x7f (127)
+#
+keycode 9 = +aacute Aacute dead_grave dead_grave Delete \
+ Delete VoidSymbol VoidSymbol Meta_eight Meta_eight \
+ VoidSymbol VoidSymbol eight eight asterisk \
+ asterisk VoidSymbol VoidSymbol Meta_asterisk \
+ Meta_asterisk VoidSymbol \
+ eight eight dead_grave dead_grave Delete \
+ Delete VoidSymbol VoidSymbol Meta_eight Meta_eight \
+ VoidSymbol VoidSymbol asterisk asterisk VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_asterisk \
+ Meta_asterisk VoidSymbol
+#
+#
+keycode 10 = +iacute Iacute dead_acute dead_acute VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_nine Meta_nine \
+ VoidSymbol VoidSymbol nine nine parenleft \
+ parenleft VoidSymbol VoidSymbol Meta_parenleft \
+ Meta_parenleft VoidSymbol \
+ nine nine dead_acute dead_acute VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_nine Meta_nine \
+ VoidSymbol VoidSymbol parenleft parenleft VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_parenleft \
+ Meta_parenleft VoidSymbol
+keycode 11 = +eacute Eacute dead_doubleacute \
+ dead_doubleacute VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_zero Meta_zero VoidSymbol VoidSymbol \
+ zero zero parenright parenright VoidSymbol \
+ VoidSymbol Meta_parenright Meta_parenright \
+ VoidSymbol \
+ zero zero dead_doubleacute \
+ dead_doubleacute VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_zero Meta_zero VoidSymbol VoidSymbol \
+ parenright parenright VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_parenright Meta_parenright \
+ VoidSymbol
+keycode 12 = equal equal dead_diaeresis \
+ dead_diaeresis Control_underscore \
+ Control_underscore VoidSymbol VoidSymbol Meta_minus \
+ Meta_minus VoidSymbol VoidSymbol percent percent \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_underscore Meta_underscore VoidSymbol \
+ minus minus dead_diaeresis \
+ dead_diaeresis Control_underscore \
+ Control_underscore VoidSymbol VoidSymbol Meta_minus \
+ Meta_minus VoidSymbol VoidSymbol underscore underscore \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_underscore Meta_underscore VoidSymbol
+keycode 13 = dead_acute dead_acute dead_cedilla dead_cedilla VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_equal Meta_equal \
+ VoidSymbol VoidSymbol dead_caron dead_caron VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_plus Meta_plus \
+ VoidSymbol \
+ equal equal dead_cedilla dead_cedilla VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_equal Meta_equal \
+ VoidSymbol VoidSymbol plus plus VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_plus Meta_plus \
+ VoidSymbol
+#
+#
+# Toto je spatne => linux consola pouziva znak "Delete" (0x7f)
+# misto znaku "BackSpace" (0x08) (Control-H)
+#
+#keycode 14 = BackSpace BackSpace VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol Meta_BackSpace \
+# Meta_BackSpace VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol \
+# BackSpace BackSpace VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol Meta_BackSpace \
+# Meta_BackSpace VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol
+#
+keycode 14 = Delete Delete VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Delete \
+ Meta_Delete VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol \
+ Delete Delete VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Delete \
+ Meta_Delete VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol
+keycode 15 = Tab Tab VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Tab Meta_Tab \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Tab Tab VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Tab Meta_Tab \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 16 = +q Q backslash backslash Control_q \
+ Control_q Control_backslash Control_backslash \
+ Meta_q Meta_Q VoidSymbol VoidSymbol +Q \
+ q VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_Q Meta_q VoidSymbol \
+ +q Q backslash backslash Control_q \
+ Control_q Control_backslash Control_backslash \
+ Meta_q Meta_Q VoidSymbol VoidSymbol +Q \
+ q VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_Q Meta_q VoidSymbol
+keycode 17 = +w W bar bar Control_w \
+ Control_w VoidSymbol VoidSymbol Meta_w Meta_W \
+ VoidSymbol VoidSymbol +W w VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_W Meta_w \
+ VoidSymbol \
+ +w W bar bar Control_w \
+ Control_w VoidSymbol VoidSymbol Meta_w Meta_W \
+ VoidSymbol VoidSymbol +W w VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_W Meta_w \
+ VoidSymbol
+keycode 18 = +e E VoidSymbol VoidSymbol Control_e \
+ Control_e VoidSymbol VoidSymbol Meta_e Meta_E \
+ VoidSymbol VoidSymbol +E e VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_E Meta_e \
+ VoidSymbol \
+ +e E VoidSymbol VoidSymbol Control_e \
+ Control_e VoidSymbol VoidSymbol Meta_e Meta_E \
+ VoidSymbol VoidSymbol +E e VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_E Meta_e \
+ VoidSymbol
+keycode 19 = +r R VoidSymbol VoidSymbol Control_r \
+ Control_r VoidSymbol VoidSymbol Meta_r Meta_R \
+ VoidSymbol VoidSymbol +R r VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_R Meta_r \
+ VoidSymbol \
+ +r R VoidSymbol VoidSymbol Control_r \
+ Control_r VoidSymbol VoidSymbol Meta_r Meta_R \
+ VoidSymbol VoidSymbol +R r VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_R Meta_r \
+ VoidSymbol
+keycode 20 = +t T VoidSymbol VoidSymbol Control_t \
+ Control_t VoidSymbol VoidSymbol Meta_t Meta_T \
+ VoidSymbol VoidSymbol +T t VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_T Meta_t \
+ VoidSymbol \
+ +t T VoidSymbol VoidSymbol Control_t \
+ Control_t VoidSymbol VoidSymbol Meta_t Meta_T \
+ VoidSymbol VoidSymbol +T t VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_T Meta_t \
+ VoidSymbol
+keycode 21 = +z Z VoidSymbol VoidSymbol Control_z \
+ Control_z VoidSymbol VoidSymbol Meta_z Meta_Z \
+ VoidSymbol VoidSymbol +Z z VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_z \
+ VoidSymbol \
+ +z Z VoidSymbol VoidSymbol Control_z \
+ Control_z VoidSymbol VoidSymbol Meta_z Meta_Z \
+ VoidSymbol VoidSymbol +Z z VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Z Meta_z \
+ VoidSymbol
+keycode 22 = +u U VoidSymbol VoidSymbol Control_u \
+ Control_u VoidSymbol VoidSymbol Meta_u Meta_U \
+ VoidSymbol VoidSymbol +U u VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_U Meta_u \
+ VoidSymbol \
+ +u U VoidSymbol VoidSymbol Control_u \
+ Control_u VoidSymbol VoidSymbol Meta_u Meta_U \
+ VoidSymbol VoidSymbol +U u VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_U Meta_u \
+ VoidSymbol
+keycode 23 = +i I VoidSymbol VoidSymbol Control_i \
+ Control_i VoidSymbol VoidSymbol Meta_i Meta_I \
+ VoidSymbol VoidSymbol +I i VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_I Meta_i \
+ VoidSymbol \
+ +i I VoidSymbol VoidSymbol Control_i \
+ Control_i VoidSymbol VoidSymbol Meta_i Meta_I \
+ VoidSymbol VoidSymbol +I i VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_I Meta_i \
+ VoidSymbol
+keycode 24 = +o O VoidSymbol VoidSymbol Control_o \
+ Control_o VoidSymbol VoidSymbol Meta_o Meta_O \
+ VoidSymbol VoidSymbol +O o VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_O Meta_o \
+ VoidSymbol \
+ +o O VoidSymbol VoidSymbol Control_o \
+ Control_o VoidSymbol VoidSymbol Meta_o Meta_O \
+ VoidSymbol VoidSymbol +O o VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_O Meta_o \
+ VoidSymbol
+keycode 25 = +p P VoidSymbol VoidSymbol Control_p \
+ Control_p VoidSymbol VoidSymbol Meta_p Meta_P \
+ VoidSymbol VoidSymbol +P p VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_P Meta_p \
+ VoidSymbol \
+ +p P VoidSymbol VoidSymbol Control_p \
+ Control_p VoidSymbol VoidSymbol Meta_p Meta_P \
+ VoidSymbol VoidSymbol +P p VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_P Meta_p \
+ VoidSymbol
+keycode 26 = +uacute Uacute division division Escape \
+ Escape VoidSymbol VoidSymbol Meta_bracketleft \
+ Meta_bracketleft VoidSymbol VoidSymbol slash \
+ slash VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_braceleft Meta_braceleft VoidSymbol \
+ bracketleft bracketleft division division Escape \
+ Escape VoidSymbol VoidSymbol Meta_bracketleft \
+ Meta_bracketleft VoidSymbol VoidSymbol braceleft \
+ braceleft VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_braceleft Meta_braceleft VoidSymbol
+keycode 27 = parenright parenright multiply multiply \
+ Control_bracketright Control_bracketright VoidSymbol \
+ VoidSymbol Meta_bracketright Meta_bracketright \
+ VoidSymbol VoidSymbol parenleft parenleft VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_braceright \
+ Meta_braceright VoidSymbol \
+ bracketright bracketright multiply multiply \
+ Control_bracketright Control_bracketright VoidSymbol \
+ VoidSymbol Meta_bracketright Meta_bracketright \
+ VoidSymbol VoidSymbol braceright braceright VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_braceright \
+ Meta_braceright VoidSymbol
+keycode 28 = Return Return VoidSymbol VoidSymbol Control_m \
+ Control_m VoidSymbol VoidSymbol Meta_Control_m \
+ Meta_Control_m VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol \
+ Return Return VoidSymbol VoidSymbol Control_m \
+ Control_m VoidSymbol VoidSymbol Meta_Control_m \
+ Meta_Control_m VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol
+keycode 29 = Control
+keycode 30 = +a A asciitilde asciitilde Control_a \
+ Control_a VoidSymbol VoidSymbol Meta_a Meta_A \
+ VoidSymbol VoidSymbol +A a VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_A Meta_a \
+ VoidSymbol \
+ +a A asciitilde asciitilde Control_a \
+ Control_a VoidSymbol VoidSymbol Meta_a Meta_A \
+ VoidSymbol VoidSymbol +A a VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_A Meta_a \
+ VoidSymbol
+keycode 31 = +s S dstroke dstroke Control_s \
+ Control_s VoidSymbol VoidSymbol Meta_s Meta_S \
+ VoidSymbol VoidSymbol +S s VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_S Meta_s \
+ VoidSymbol \
+ +s S dstroke dstroke Control_s \
+ Control_s VoidSymbol VoidSymbol Meta_s Meta_S \
+ VoidSymbol VoidSymbol +S s VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_S Meta_s \
+ VoidSymbol
+keycode 32 = +d D Dstroke Dstroke Control_d \
+ Control_d VoidSymbol VoidSymbol Meta_d Meta_D \
+ VoidSymbol VoidSymbol +D d VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_D Meta_d \
+ VoidSymbol \
+ +d D Dstroke Dstroke Control_d \
+ Control_d VoidSymbol VoidSymbol Meta_d Meta_D \
+ VoidSymbol VoidSymbol +D d VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_D Meta_d \
+ VoidSymbol
+keycode 33 = +f F bracketleft bracketleft Control_f \
+ Control_f Escape Escape Meta_f Meta_F \
+ VoidSymbol VoidSymbol +F f VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_F Meta_f \
+ VoidSymbol \
+ +f F bracketleft bracketleft Control_f \
+ Control_f Escape Escape Meta_f Meta_F \
+ VoidSymbol VoidSymbol +F f VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_F Meta_f \
+ VoidSymbol
+keycode 34 = +g G bracketright bracketright Control_g \
+ Control_g Control_bracketright Control_bracketright \
+ Meta_g Meta_G VoidSymbol VoidSymbol +G \
+ g VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_G Meta_g VoidSymbol \
+ +g G bracketright bracketright Control_g \
+ Control_g Control_bracketright Control_bracketright \
+ Meta_g Meta_G VoidSymbol VoidSymbol +G \
+ g VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_G Meta_g VoidSymbol
+keycode 35 = +h H grave grave Control_h \
+ Control_h VoidSymbol VoidSymbol Meta_h Meta_H \
+ VoidSymbol VoidSymbol +H h VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_H Meta_h \
+ VoidSymbol \
+ +h H grave grave Control_h \
+ Control_h VoidSymbol VoidSymbol Meta_h Meta_H \
+ VoidSymbol VoidSymbol +H h VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_H Meta_h \
+ VoidSymbol
+keycode 36 = +j J apostrophe apostrophe Control_j \
+ Control_j VoidSymbol VoidSymbol Meta_j Meta_J \
+ VoidSymbol VoidSymbol +J j VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_J Meta_j \
+ VoidSymbol \
+ +j J apostrophe apostrophe Control_j \
+ Control_j VoidSymbol VoidSymbol Meta_j Meta_J \
+ VoidSymbol VoidSymbol +J j VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_J Meta_j \
+ VoidSymbol
+keycode 37 = +k K lstroke lstroke Control_k \
+ Control_k VoidSymbol VoidSymbol Meta_k Meta_K \
+ VoidSymbol VoidSymbol +K k VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_K Meta_k \
+ VoidSymbol \
+ +k K lstroke lstroke Control_k \
+ Control_k VoidSymbol VoidSymbol Meta_k Meta_K \
+ VoidSymbol VoidSymbol +K k VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_K Meta_k \
+ VoidSymbol
+keycode 38 = +l L Lstroke Lstroke Control_l \
+ Control_l VoidSymbol VoidSymbol Meta_l Meta_L \
+ VoidSymbol VoidSymbol +L l VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_L Meta_l \
+ VoidSymbol \
+ +l L Lstroke Lstroke Control_l \
+ Control_l VoidSymbol VoidSymbol Meta_l Meta_L \
+ VoidSymbol VoidSymbol +L l VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_L Meta_l \
+ VoidSymbol
+keycode 39 = +uring Uring dollar dollar VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_semicolon \
+ Meta_semicolon VoidSymbol VoidSymbol quotedbl \
+ quotedbl VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_colon Meta_colon VoidSymbol \
+ semicolon semicolon dollar dollar VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_semicolon \
+ Meta_semicolon VoidSymbol VoidSymbol colon \
+ colon VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_colon Meta_colon VoidSymbol
+keycode 40 = section section ssharp ssharp VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_apostrophe \
+ Meta_apostrophe VoidSymbol VoidSymbol exclam \
+ exclam VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_quotedbl Meta_quotedbl VoidSymbol \
+ apostrophe apostrophe ssharp ssharp VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_apostrophe \
+ Meta_apostrophe VoidSymbol VoidSymbol quotedbl \
+ quotedbl VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Meta_quotedbl Meta_quotedbl VoidSymbol
+keycode 41 = semicolon semicolon VoidSymbol VoidSymbol nul \
+ nul VoidSymbol VoidSymbol Meta_grave Meta_grave \
+ VoidSymbol VoidSymbol dead_grave dead_grave VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_asciitilde \
+ Meta_asciitilde VoidSymbol \
+ grave grave VoidSymbol VoidSymbol nul \
+ nul VoidSymbol VoidSymbol Meta_grave Meta_grave \
+ VoidSymbol VoidSymbol asciitilde asciitilde VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_asciitilde \
+ Meta_asciitilde VoidSymbol
+keycode 42 = ShiftL
+keycode 43 = dead_diaeresis dead_diaeresis currency \
+ currency Control_backslash Control_backslash \
+ VoidSymbol VoidSymbol Meta_backslash \
+ Meta_backslash Meta_Control_backslash \
+ Meta_Control_backslash apostrophe apostrophe VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_bar Meta_bar \
+ VoidSymbol \
+ backslash backslash currency \
+ currency Control_backslash Control_backslash \
+ VoidSymbol VoidSymbol Meta_backslash \
+ Meta_backslash Meta_Control_backslash \
+ Meta_Control_backslash bar bar VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_bar Meta_bar \
+ VoidSymbol
+keycode 44 = +y Y degree degree Control_y \
+ Control_y VoidSymbol VoidSymbol Meta_y Meta_Y \
+ VoidSymbol VoidSymbol +Y y VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Y Meta_y \
+ VoidSymbol \
+ +y Y degree degree Control_y \
+ Control_y VoidSymbol VoidSymbol Meta_y Meta_Y \
+ VoidSymbol VoidSymbol +Y y VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_Y Meta_y \
+ VoidSymbol
+keycode 45 = +x X numbersign numbersign Control_x \
+ Control_x VoidSymbol VoidSymbol Meta_x Meta_X \
+ VoidSymbol VoidSymbol +X x VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_X Meta_x \
+ VoidSymbol \
+ +x X numbersign numbersign Control_x \
+ Control_x VoidSymbol VoidSymbol Meta_x Meta_X \
+ VoidSymbol VoidSymbol +X x VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_X Meta_x \
+ VoidSymbol
+keycode 46 = +c C ampersand ampersand Control_c \
+ Control_c VoidSymbol VoidSymbol Meta_c Meta_C \
+ VoidSymbol VoidSymbol +C c VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_C Meta_c \
+ VoidSymbol \
+ +c C ampersand ampersand Control_c \
+ Control_c VoidSymbol VoidSymbol Meta_c Meta_C \
+ VoidSymbol VoidSymbol +C c VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_C Meta_c \
+ VoidSymbol
+keycode 47 = +v V at at Control_v \
+ Control_v VoidSymbol VoidSymbol Meta_v Meta_V \
+ VoidSymbol VoidSymbol +V v VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_V Meta_v \
+ VoidSymbol \
+ +v V at at Control_v \
+ Control_v VoidSymbol VoidSymbol Meta_v Meta_V \
+ VoidSymbol VoidSymbol +V v VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_V Meta_v \
+ VoidSymbol
+keycode 48 = +b B braceleft braceleft Control_b \
+ Control_b VoidSymbol VoidSymbol Meta_b Meta_B \
+ VoidSymbol VoidSymbol +B b VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_B Meta_b \
+ VoidSymbol \
+ +b B braceleft braceleft Control_b \
+ Control_b VoidSymbol VoidSymbol Meta_b Meta_B \
+ VoidSymbol VoidSymbol +B b VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_B Meta_b \
+ VoidSymbol
+keycode 49 = +n N braceright braceright Control_n \
+ Control_n VoidSymbol VoidSymbol Meta_n Meta_N \
+ VoidSymbol VoidSymbol +N n VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_N Meta_n \
+ VoidSymbol \
+ +n N braceright braceright Control_n \
+ Control_n VoidSymbol VoidSymbol Meta_n Meta_N \
+ VoidSymbol VoidSymbol +N n VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_N Meta_n \
+ VoidSymbol
+keycode 50 = +m M asciicircum asciicircum Control_m \
+ Control_m VoidSymbol VoidSymbol Meta_m Meta_M \
+ VoidSymbol VoidSymbol +M M VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_M Meta_m \
+ VoidSymbol \
+ +m M asciicircum asciicircum Control_m \
+ Control_m VoidSymbol VoidSymbol Meta_m Meta_M \
+ VoidSymbol VoidSymbol +M M VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_M Meta_m \
+ VoidSymbol
+keycode 51 = comma comma less less VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_comma Meta_comma \
+ VoidSymbol VoidSymbol question question less \
+ less VoidSymbol VoidSymbol Meta_less Meta_less \
+ VoidSymbol \
+ comma comma less less VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_comma Meta_comma \
+ VoidSymbol VoidSymbol less less less \
+ less VoidSymbol VoidSymbol Meta_less Meta_less \
+ VoidSymbol
+keycode 52 = period period greater greater VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_period Meta_period \
+ VoidSymbol VoidSymbol colon colon greater \
+ greater VoidSymbol VoidSymbol Meta_greater \
+ Meta_greater VoidSymbol \
+ period period greater greater VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Meta_period Meta_period \
+ VoidSymbol VoidSymbol greater greater greater \
+ greater VoidSymbol VoidSymbol Meta_greater \
+ Meta_greater VoidSymbol
+keycode 53 = minus minus asterisk asterisk \
+ Control_underscore Control_underscore VoidSymbol \
+ VoidSymbol Meta_slash Meta_slash VoidSymbol VoidSymbol \
+ underscore underscore VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_question Meta_question \
+ VoidSymbol \
+ slash slash asterisk asterisk \
+ Control_underscore Control_underscore VoidSymbol \
+ VoidSymbol Meta_slash Meta_slash VoidSymbol VoidSymbol \
+ question question VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_question Meta_question \
+ VoidSymbol
+keycode 54 = ShiftL
+keycode 55 = KP_Multiply KP_Multiply asterisk asterisk VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Do Do \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_Multiply KP_Multiply asterisk asterisk VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Do Do \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 56 = Alt
+keycode 57 = space space nobreakspace nobreakspace nul \
+ nul VoidSymbol VoidSymbol Meta_space Meta_space \
+ Meta_nul Meta_nul space space VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ space space nobreakspace nobreakspace nul \
+ nul VoidSymbol VoidSymbol Meta_space Meta_space \
+ Meta_nul Meta_nul space space VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 58 = Caps_Lock
+keycode 59 = F1 F1 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_1 Console_1 Console_1 Console_1 \
+ Console_1 Console_1 F11 F11 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F1 F1 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_1 Console_1 Console_1 Console_1 \
+ Console_1 Console_1 F11 F11 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 60 = F2 F2 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_2 Console_2 Console_2 Console_2 \
+ Console_2 Console_2 F12 F12 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F2 F2 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_2 Console_2 Console_2 Console_2 \
+ Console_2 Console_2 F12 F12 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 61 = F3 F3 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_3 Console_3 Console_3 Console_3 \
+ Console_3 Console_3 F13 F13 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F3 F3 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_3 Console_3 Console_3 Console_3 \
+ Console_3 Console_3 F13 F13 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 62 = F4 F4 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_4 Console_4 Console_4 Console_4 \
+ Console_4 Console_4 F14 F14 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F4 F4 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_4 Console_4 Console_4 Console_4 \
+ Console_4 Console_4 F14 F14 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 63 = F5 F5 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_5 Console_5 Console_5 Console_5 \
+ Console_5 Console_5 F15 F15 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F5 F5 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_5 Console_5 Console_5 Console_5 \
+ Console_5 Console_5 F15 F15 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 64 = F6 F6 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_6 Console_6 Console_6 Console_6 \
+ Console_6 Console_6 F16 F16 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F6 F6 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_6 Console_6 Console_6 Console_6 \
+ Console_6 Console_6 F16 F16 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 65 = F7 F7 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_7 Console_7 Console_7 Console_7 \
+ Console_7 Console_7 F17 F17 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F7 F7 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_7 Console_7 Console_7 Console_7 \
+ Console_7 Console_7 F17 F17 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 66 = F8 F8 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_8 Console_8 Console_8 Console_8 \
+ Console_8 Console_8 F18 F18 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F8 F8 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_8 Console_8 Console_8 Console_8 \
+ Console_8 Console_8 F18 F18 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 67 = F9 F9 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_9 Console_9 Console_9 Console_9 \
+ Console_9 Console_9 F19 F19 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F9 F9 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_9 Console_9 Console_9 Console_9 \
+ Console_9 Console_9 F19 F19 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 68 = F10 F10 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_10 Console_10 Console_10 Console_10 \
+ Console_10 Console_10 F20 F20 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F10 F10 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_10 Console_10 Console_10 Console_10 \
+ Console_10 Console_10 F20 F20 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 69 = Num_Lock Num_Lock Bare_Num_Lock \
+ Bare_Num_Lock VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Bare_Num_Lock Bare_Num_Lock \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Num_Lock Num_Lock Bare_Num_Lock \
+ Bare_Num_Lock VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Bare_Num_Lock Bare_Num_Lock \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 70 = Scroll_Lock Scroll_Lock VoidSymbol VoidSymbol \
+ Show_State Show_State VoidSymbol VoidSymbol \
+ Show_Registers Show_Registers VoidSymbol \
+ VoidSymbol Show_Memory Show_Memory VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Scroll_Lock Scroll_Lock VoidSymbol VoidSymbol \
+ Show_State Show_State VoidSymbol VoidSymbol \
+ Show_Registers Show_Registers VoidSymbol \
+ VoidSymbol Show_Memory Show_Memory VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol
+keycode 71 = KP_7 KP_7 seven seven Hex_7 \
+ Hex_7 VoidSymbol VoidSymbol Ascii_7 Ascii_7 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_7 KP_7 seven seven Hex_7 \
+ Hex_7 VoidSymbol VoidSymbol Ascii_7 Ascii_7 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 72 = KP_8 KP_8 eight eight Hex_8 \
+ Hex_8 VoidSymbol VoidSymbol Ascii_8 Ascii_8 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_8 KP_8 eight eight Hex_8 \
+ Hex_8 VoidSymbol VoidSymbol Ascii_8 Ascii_8 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 73 = KP_9 KP_9 nine nine Hex_9 \
+ Hex_9 VoidSymbol VoidSymbol Ascii_9 Ascii_9 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_9 KP_9 nine nine Hex_9 \
+ Hex_9 VoidSymbol VoidSymbol Ascii_9 Ascii_9 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 74 = KP_Subtract KP_Subtract minus minus VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_Subtract KP_Subtract minus minus VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 75 = KP_4 KP_4 four four Hex_4 \
+ Hex_4 VoidSymbol VoidSymbol Ascii_4 Ascii_4 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_4 KP_4 four four Hex_4 \
+ Hex_4 VoidSymbol VoidSymbol Ascii_4 Ascii_4 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 76 = KP_5 KP_5 five five Hex_5 \
+ Hex_5 VoidSymbol VoidSymbol Ascii_5 Ascii_5 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_5 KP_5 five five Hex_5 \
+ Hex_5 VoidSymbol VoidSymbol Ascii_5 Ascii_5 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 77 = KP_6 KP_6 six six Hex_6 \
+ Hex_6 VoidSymbol VoidSymbol Ascii_6 Ascii_6 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_6 KP_6 six six Hex_6 \
+ Hex_6 VoidSymbol VoidSymbol Ascii_6 Ascii_6 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 78 = KP_Add KP_Add plus plus VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_Add KP_Add plus plus VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 79 = KP_1 KP_1 one one Hex_1 \
+ Hex_1 VoidSymbol VoidSymbol Ascii_1 Ascii_1 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_1 KP_1 one one Hex_1 \
+ Hex_1 VoidSymbol VoidSymbol Ascii_1 Ascii_1 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 80 = KP_2 KP_2 two two Hex_2 \
+ Hex_2 VoidSymbol VoidSymbol Ascii_2 Ascii_2 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_2 KP_2 two two Hex_2 \
+ Hex_2 VoidSymbol VoidSymbol Ascii_2 Ascii_2 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 81 = KP_3 KP_3 three three Hex_3 \
+ Hex_3 VoidSymbol VoidSymbol Ascii_3 Ascii_3 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_3 KP_3 three three Hex_3 \
+ Hex_3 VoidSymbol VoidSymbol Ascii_3 Ascii_3 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 82 = KP_0 KP_0 zero zero Hex_0 \
+ Hex_0 VoidSymbol VoidSymbol Ascii_0 Ascii_0 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_0 KP_0 zero zero Hex_0 \
+ Hex_0 VoidSymbol VoidSymbol Ascii_0 Ascii_0 \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+#
+keycode 83 = KP_Period KP_Period period period VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_Period KP_Period period period VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+# Desetinna carka na numericke klavesnici
+#
+#keycode 83 = KP_Comma KP_Comma comma comma VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol \
+# KP_Comma KP_Comma comma comma VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol
+#
+#
+#
+#keycode 84 = Alt PrintScreen => SysRq
+keycode 84 = Spawn_Console Spawn_Console VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol \
+ Spawn_Console Spawn_Console VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol
+#
+#
+# 102-ha klavesa
+#
+keycode 86 = backslash backslash slash slash \
+ Control_backslash Control_backslash \
+ Control_underscore Control_underscore \
+ Meta_backslash Meta_backslash \
+ Meta_Control_backslash Meta_Control_backslash \
+ bar bar VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_bar Meta_bar VoidSymbol \
+ backslash backslash slash slash \
+ Control_backslash Control_backslash \
+ Control_underscore Control_underscore \
+ Meta_backslash Meta_backslash \
+ Meta_Control_backslash Meta_Control_backslash \
+ bar bar VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Meta_bar Meta_bar VoidSymbol
+#
+#
+keycode 87 = F11 F11 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_11 Console_11 Console_11 Console_11 \
+ Console_11 Console_11 F21 F21 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F11 F11 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_11 Console_11 Console_11 Console_11 \
+ Console_11 Console_11 F21 F21 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 88 = F12 F12 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_12 Console_12 Console_12 Console_12 \
+ Console_12 Console_12 F22 F22 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F12 F12 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_12 Console_12 Console_12 Console_12 \
+ Console_12 Console_12 F22 F22 VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 96 = KP_Enter KP_Enter VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_Enter KP_Enter VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 97 = Control
+keycode 98 = KP_Divide KP_Divide slash slash VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Macro Macro \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ KP_Divide KP_Divide slash slash VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol Macro Macro \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+#keycode 99 = PrintScreen => POZOR: Alt PrintScreen = keycode 84
+keycode 99 = dead_acute dead_acute VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol dead_caron dead_caron VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 100 = AltGr
+#
+#keycode 101 = Break
+keycode 101 = Break Break VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Break Break VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+# synonyma:
+# Find (primarni) => Home
+# Select (primarni) => End
+# Prior (primarni) => PageUp
+# Next (primarni) => PageDown
+#
+keycode 102 = Home Home +b B Hex_B \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Home Home +b B Hex_B \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 103 = Up Up Console_1 Console_1 Up \
+ Up VoidSymbol VoidSymbol Console_1 Console_1 \
+ VoidSymbol VoidSymbol Up Up VoidSymbol \
+ VoidSymbol Up VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Up Up Console_1 Console_1 Up \
+ Up VoidSymbol VoidSymbol Console_1 Console_1 \
+ VoidSymbol VoidSymbol Up Up VoidSymbol \
+ VoidSymbol Up VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 104 = PageUp PageUp +c C Hex_C \
+ Hex_C VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol Scroll_Backward \
+ Scroll_Backward VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ PageUp PageUp +c C Hex_C \
+ Hex_C VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol Scroll_Backward \
+ Scroll_Backward VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol
+keycode 105 = Left Left Decr_Console Decr_Console Left \
+ Left VoidSymbol VoidSymbol Decr_Console \
+ Decr_Console VoidSymbol VoidSymbol Left Left \
+ VoidSymbol VoidSymbol Left VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol \
+ Left Left Decr_Console Decr_Console Left \
+ Left VoidSymbol VoidSymbol Decr_Console \
+ Decr_Console VoidSymbol VoidSymbol Left Left \
+ VoidSymbol VoidSymbol Left VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol
+keycode 106 = Right Right Incr_Console Incr_Console Right \
+ Right VoidSymbol VoidSymbol Incr_Console \
+ Incr_Console VoidSymbol VoidSymbol Right Right \
+ VoidSymbol VoidSymbol Right VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol \
+ Right Right Incr_Console Incr_Console Right \
+ Right VoidSymbol VoidSymbol Incr_Console \
+ Incr_Console VoidSymbol VoidSymbol Right Right \
+ VoidSymbol VoidSymbol Right VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol
+keycode 107 = End End +e E Hex_E \
+ Hex_E VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ End End +e E Hex_E \
+ Hex_E VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 108 = Down Down Last_Console Last_Console Down \
+ Down VoidSymbol VoidSymbol Last_Console \
+ Last_Console VoidSymbol VoidSymbol Down Down \
+ VoidSymbol VoidSymbol Down VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol \
+ Down Down Last_Console Last_Console Down \
+ Down VoidSymbol VoidSymbol Last_Console \
+ Last_Console VoidSymbol VoidSymbol Down Down \
+ VoidSymbol VoidSymbol Down VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol
+keycode 109 = PageDown PageDown +f F Hex_F \
+ Hex_F VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol Scroll_Forward \
+ Scroll_Forward VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ PageDown PageDown +f F Hex_F \
+ Hex_F VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol Scroll_Forward \
+ Scroll_Forward VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol
+keycode 110 = Insert Insert +a A Hex_A \
+ Hex_A VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Insert Insert +a A Hex_A \
+ Hex_A VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+#
+# Keysym Delete reprezentuje znak s kodem 0x7f (127)
+# - je pouzit pro klavesu BackSpace (viz keycode 14)
+#
+#keycode 111 = Delete Delete +d D Hex_D \
+# Hex_D VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# Boot Boot VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol \
+# Delete Delete +d D Hex_D \
+# Hex_D VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# Boot Boot VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol
+#
+keycode 111 = Remove Remove +d D Hex_D \
+ Hex_D VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Boot Boot VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ Remove Remove +d D Hex_D \
+ Hex_D VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ Boot Boot VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+#
+#
+#keycode 119 = Pause => POZOR: Control Pause = keycode 101
+#keycode 119 = Pause Pause VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol \
+# Pause Pause VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+# VoidSymbol
+#
+# Pause se pouziva pro prepinani CESKE a ANGLICKE klavesnice
+# - funguje jako ShiftR_Lock
+#
+keycode 119 = ShiftR_Lock ShiftR_Lock VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ ShiftR_Lock ShiftR_Lock VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+#
+#
+#
+# keycode 125 => Windows klavesa vlevo (symbol okna)
+# keycode 126 => Windows klavesa vpravo (symbol okna)
+# keycode 127 => Windows klavesa nejvice vpravo (symbol menu)
+keycode 125 = F13 F13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_13 Console_13 Console_13 Console_13 \
+ Console_13 Console_13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F13 F13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_13 Console_13 Console_13 Console_13 \
+ Console_13 Console_13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 126 = F13 F13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_13 Console_13 Console_13 Console_13 \
+ Console_13 Console_13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F13 F13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_13 Console_13 Console_13 Console_13 \
+ Console_13 Console_13 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+keycode 127 = F14 F14 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_14 Console_14 Console_14 Console_14 \
+ Console_14 Console_14 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol \
+ F14 F14 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol Console_14 Console_14 Console_14 Console_14 \
+ Console_14 Console_14 VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol VoidSymbol VoidSymbol VoidSymbol VoidSymbol \
+ VoidSymbol
+#
+#
+#
+# string: kdyz je jedne klavese prirazeno vice znaku (napr. funkcni klavesy)
+#
+# Vite-li nekdo co maji generovat klavesy F21 a F22 prosim reknete mi to
+#
+string F1 = "\033[[A"
+string F2 = "\033[[B"
+string F3 = "\033[[C"
+string F4 = "\033[[D"
+string F5 = "\033[[E"
+string F6 = "\033[17~"
+string F7 = "\033[18~"
+string F8 = "\033[19~"
+string F9 = "\033[20~"
+string F10 = "\033[21~"
+string F11 = "\033[23~"
+string F12 = "\033[24~"
+string F13 = "\033[25~"
+string F14 = "\033[26~"
+string F15 = "\033[28~"
+string F16 = "\033[29~"
+string F17 = "\033[31~"
+string F18 = "\033[32~"
+string F19 = "\033[33~"
+string F20 = "\033[34~"
+string F21 = ""
+string F22 = ""
+#
+# compose: jak se pomoci mrtvych klaves generuji znaky s diakritikou
+# transformace dead klavesy na prvni znak za compose:
+# (v zavorce jsou synonyma -> proto maji stejne oznaceni dead klavesy)
+# dead_grave ======================================> '`'
+# dead_acute --------------------------------------> '\''
+# dead_diaeresis ==================================> '"' (:)
+# dead_circumflex (dead_caron) --------------------> '^'
+# dead_tilde (dead_breve) (dead_doubleacute) => '~'
+# dead_cedilla (dead_ogonek) -------------------> ','
+# --
+# dead_grave => pouzito misto nedefinovanych "dead_ring" a "dead_dot"
+# dead_acute => carka_nad_pismenem (pozivaji take cesi)
+# dead_diaeresis => dve_tecky_nad_pismenem - pouzivaji napr. nemci
+# dead_circumflex => striska_nad_pismenem
+# dead_caron => hacek_nad_pismenem
+# dead_tilde => vlnovka_nad_pismenem (neni v ISO-8859-2)
+# dead_breve => obloucek_nad_pismenem
+# dead_doubleacute => dve_carky_nad_pismenem (myslim ze je to madarsky prehlas)
+# dead_cedilla => ocasek_pod_pismenem_smerujici_zprava_doleva
+# dead_ogonek => ocasek_pod_pismenem_smerujici_zleva_doprava
+# --
+#
+# dead_grave => pouzito pro krouzek a tecku_nad_pismenem (a znak stupne)
+compose '`' 'u' to 'ù'
+compose '`' 'U' to 'Ù'
+compose '`' 'z' to '¿'
+compose '`' 'Z' to '¯'
+# dead_acute (pouze ceske)
+compose '\'' 'a' to 'á'
+compose '\'' 'A' to 'Á'
+compose '\'' 'e' to 'é'
+compose '\'' 'E' to 'É'
+compose '\'' 'i' to 'í'
+compose '\'' 'I' to 'Í'
+compose '\'' 'o' to 'ó'
+compose '\'' 'O' to 'Ó'
+compose '\'' 'u' to 'ú'
+compose '\'' 'U' to 'Ú'
+compose '\'' 'y' to 'ý'
+compose '\'' 'Y' to 'Ý'
+# dead_caron (pouze ceske)
+compose '^' 'u' to 'ù'
+compose '^' 'U' to 'Ù'
+compose '^' 'c' to 'è'
+compose '^' 'C' to 'È'
+compose '^' 'd' to 'ï'
+compose '^' 'D' to 'Ï'
+compose '^' 'e' to 'ì'
+compose '^' 'E' to 'Ì'
+compose '^' 'n' to 'ò'
+compose '^' 'N' to 'Ò'
+compose '^' 'r' to 'ø'
+compose '^' 'R' to 'Ø'
+compose '^' 's' to '¹'
+compose '^' 'S' to '©'
+compose '^' 't' to '»'
+compose '^' 'T' to '«'
+compose '^' 'z' to '¾'
+compose '^' 'Z' to '®'
+#
+# Zde je misto pro neceske znaky generovane pres mrtvou klavesu
+#
+# dead_acute (neceske znaky)
+compose '\'' 'c' to 'æ'
+compose '\'' 'C' to 'Æ'
+compose '\'' 'l' to 'å'
+compose '\'' 'L' to 'Å'
+compose '\'' 'n' to 'ñ'
+compose '\'' 'N' to 'Ñ'
+compose '\'' 'r' to 'à'
+compose '\'' 'R' to 'À'
+compose '\'' 's' to '¶'
+compose '\'' 'S' to '¦'
+compose '\'' 'z' to '¼'
+compose '\'' 'Z' to '¬'
+# dead_caron (neceske znaky)
+compose '^' 'l' to 'µ'
+compose '^' 'L' to '¥'
+# dead_circumflex (neceske znaky)
+compose '^' 'a' to 'â'
+compose '^' 'A' to 'Â'
+compose '^' 'i' to 'î'
+compose '^' 'I' to 'Î'
+compose '^' 'o' to 'ô'
+compose '^' 'O' to 'Ô'
+# dead_tilde (neceske znaky) => nedefinovan znak v ISO-8859-2
+#
+# dead_breve (neceske_znaky)
+compose '~' 'a' to 'ã'
+compose '~' 'A' to 'Ã'
+# dead_doubleacute (neceske znaky)
+compose '~' 'o' to 'õ'
+compose '~' 'O' to 'Õ'
+compose '~' 'u' to 'û'
+compose '~' 'U' to 'Û'
+# dead_diaeresis (neceske znaky)
+compose '"' 'a' to 'ä'
+compose '"' 'A' to 'Ä'
+compose '"' 'e' to 'ë'
+compose '"' 'E' to 'Ë'
+compose '"' 'o' to 'ö'
+compose '"' 'O' to 'Ö'
+compose '"' 'u' to 'ü'
+compose '"' 'U' to 'Ü'
+# dead_cedilla (neceske znaky)
+compose ',' 'c' to 'ç'
+compose ',' 'C' to 'Ç'
+compose ',' 's' to 'º'
+compose ',' 'S' to 'ª'
+compose ',' 't' to 'þ'
+compose ',' 'T' to 'Þ'
+# dead_ogonek (neceske znaky)
+compose ',' 'a' to '±'
+compose ',' 'A' to '¡'
+compose ',' 'e' to 'ê'
+compose ',' 'E' to 'Ê'
+
diff --git a/data/keymaps/i386/qwerty/hebrew.map b/data/keymaps/i386/qwerty/il-phonetic.map
similarity index 100%
rename from data/keymaps/i386/qwerty/hebrew.map
rename to data/keymaps/i386/qwerty/il-phonetic.map
diff --git a/data/keymaps/i386/qwerty/il.map b/data/keymaps/i386/qwerty/il.map
new file mode 100644
index 0000000..51779f2
--- /dev/null
+++ b/data/keymaps/i386/qwerty/il.map
@@ -0,0 +1,294 @@
+# From coutal@netvision.net.il Sun Dec 24 11:20:58 2000 - Gil Bahat
+# .il hebrew keymap, non-phonetic one. (does anyone ever use phonetic maps?)
+# Problems? Suggestions? coutal@netvision.net.il . flames? /dev/null.
+# if it breaks, you get to keep one piece. the other goes for recycling.
+# no key does shifting, Right_Ctrl does locking
+
+
+charset "iso-8859-8"
+keymaps 0-4,6,8,10,12
+strings as usual
+
+ keycode 1 = Escape Escape Escape Escape
+ alt keycode 1 = Meta_Escape
+ keycode 2 = one exclam one exclam
+ alt keycode 2 = Meta_one
+ keycode 3 = two at two at
+ control keycode 3 = nul
+ alt keycode 3 = Meta_two
+ keycode 4 = three numbersign three numbersign
+ control keycode 4 = Escape
+ alt keycode 4 = Meta_three
+ keycode 5 = four dollar four dollar
+ control keycode 5 = Control_backslash
+ alt keycode 5 = Meta_four
+ keycode 6 = five percent five percent
+ control keycode 6 = Control_bracketright
+ alt keycode 6 = Meta_five
+ keycode 7 = six asciicircum six asciicircum
+ control keycode 7 = Control_asciicircum
+ alt keycode 7 = Meta_six
+ keycode 8 = seven ampersand seven ampersand
+ control keycode 8 = Control_underscore
+ alt keycode 8 = Meta_seven
+ keycode 9 = eight asterisk eight asterisk
+ control keycode 9 = Delete
+ alt keycode 9 = Meta_eight
+ keycode 10 = nine parenleft nine parenleft
+ alt keycode 10 = Meta_nine
+ keycode 11 = zero parenright zero parenright
+ alt keycode 11 = Meta_zero
+ keycode 12 = minus underscore minus underscore
+ control keycode 12 = Control_underscore
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+ keycode 14 = Delete Delete Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+ alt keycode 15 = Meta_Tab
+ keycode 16 = +q +Q slash +Q
+ control keycode 16 = Control_q
+altgr control keycode 16 = Control_q
+ keycode 17 = +w +W comma +W
+ control keycode 17 = Control_w
+altgr control keycode 17 = Control_w
+ keycode 18 = +e +E qof +E
+ control keycode 18 = Control_e
+altgr control keycode 18 = Control_e
+ keycode 19 = +r +R resh +R
+ control keycode 19 = Control_r
+altgr control keycode 19 = Control_r
+ keycode 20 = +t +T alef +T
+ control keycode 20 = Control_t
+altgr control keycode 20 = Control_t
+ keycode 21 = +y +Y tet +Y
+ control keycode 21 = Control_y
+altgr control keycode 21 = Control_y
+ keycode 22 = +u +U vav +U
+ control keycode 22 = Control_u
+altgr control keycode 22 = Control_u
+ keycode 23 = +i +I finalnun +I
+ control keycode 23 = Tab
+altgr control keycode 23 = Tab
+ keycode 24 = +o +O finalmem +O
+ control keycode 24 = Control_o
+altgr control keycode 24 = Control_o
+ keycode 25 = +p +P pe +P
+ control keycode 25 = Control_p
+altgr control keycode 25 = Control_p
+ keycode 26 = bracketleft braceleft bracketleft braceleft
+ control keycode 26 = Escape
+altgr control keycode 26 = Escape
+ alt keycode 26 = Meta_bracketleft
+ keycode 27 = bracketright braceright bracketright braceright
+ control keycode 27 = Control_bracketright
+altgr control keycode 27 = Control_bracketright
+ alt keycode 27 = Meta_bracketright
+ keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+ keycode 29 = Control
+ keycode 30 = +a +A shin +A
+ control keycode 30 = Control_a
+altgr control keycode 30 = Control_a
+ keycode 31 = +s +S dalet +S
+ control keycode 31 = Control_s
+altgr control keycode 31 = Control_s
+ keycode 32 = +d +D gimel +D
+ control keycode 32 = Control_d
+altgr control keycode 32 = Control_d
+ keycode 33 = +f +F kaf +F
+ control keycode 33 = Control_f
+altgr control keycode 33 = Control_f
+ keycode 34 = +g +G ayin +G
+ control keycode 34 = Control_g
+altgr control keycode 34 = Control_g
+ keycode 35 = +h +H yod +H
+ control keycode 35 = BackSpace
+altgr control keycode 35 = BackSpace
+ keycode 36 = +j +J het +J
+ control keycode 36 = Linefeed
+altgr control keycode 36 = Linefeed
+ keycode 37 = +k +K lamed +K
+ control keycode 37 = Control_k
+altgr control keycode 37 = Control_k
+ keycode 38 = +l +L finalkaf +L
+ control keycode 38 = Control_l
+altgr control keycode 38 = Control_l
+ keycode 39 = semicolon colon finalpe colon
+ alt keycode 39 = Meta_semicolon
+ keycode 40 = apostrophe quotedbl comma quotedbl
+ control keycode 40 = Control_g
+altgr control keycode 40 = Control_g
+ alt keycode 40 = Meta_apostrophe
+ keycode 41 = grave asciitilde semicolon asciitilde
+ control keycode 41 = nul
+ alt keycode 41 = Meta_grave
+ keycode 42 = Shift
+ keycode 43 = backslash bar backslash bar
+ control keycode 43 = Control_backslash
+ alt keycode 43 = Meta_backslash
+ keycode 44 = +z +Z zayin +Z
+ control keycode 44 = Control_z
+altgr control keycode 44 = Control_z
+ keycode 45 = +x +X samekh +X
+ control keycode 45 = Control_x
+altgr control keycode 45 = Control_x
+ keycode 46 = +c +C bet +C
+ control keycode 46 = Control_c
+altgr control keycode 46 = Control_c
+ keycode 47 = +v +V he +V
+ control keycode 47 = Control_v
+altgr control keycode 47 = Control_v
+ keycode 48 = +b +B nun +B
+ control keycode 48 = Control_b
+altgr control keycode 48 = Control_b
+ keycode 49 = +n +N mem +N
+ control keycode 49 = Control_n
+altgr control keycode 49 = Control_n
+ keycode 50 = +m +M tsadi +M
+ control keycode 50 = Control_m
+altgr control keycode 50 = Control_m
+ keycode 51 = comma less tav less
+ alt keycode 51 = Meta_comma
+ keycode 52 = period greater finaltsadi greater
+ alt keycode 52 = Meta_period
+ keycode 53 = slash question period question
+ control keycode 53 = Delete
+ alt keycode 53 = Meta_slash
+ keycode 54 = Shift
+ keycode 55 = KP_Multiply
+ keycode 56 = Alt
+ keycode 57 = space space space space
+ control keycode 57 = nul
+ alt keycode 57 = Meta_space
+ keycode 58 = Caps_Lock
+ keycode 59 = F1 F11 F1 F11
+ control keycode 59 = F1
+ alt keycode 59 = Console_1
+altgr alt keycode 59 = Console_1
+ keycode 60 = F2 F12 F2 F12
+ control keycode 60 = F2
+ alt keycode 60 = Console_2
+altgr alt keycode 60 = Console_2
+ keycode 61 = F3 F13 F3 F13
+ control keycode 61 = F3
+ alt keycode 61 = Console_3
+altgr alt keycode 61 = Console_3
+ keycode 62 = F4 F14 F4 F14
+ control keycode 62 = F4
+ alt keycode 62 = Console_4
+altgr alt keycode 62 = Console_4
+ keycode 63 = F5 F15 F5 F15
+ control keycode 63 = F5
+ alt keycode 63 = Console_5
+altgr alt keycode 63 = Console_5
+ keycode 64 = F6 F16 F6 F16
+ control keycode 64 = F6
+ alt keycode 64 = Console_6
+altgr alt keycode 64 = Console_6
+ keycode 65 = F7 F17 F7 F17
+ control keycode 65 = F7
+ alt keycode 65 = Console_7
+altgr alt keycode 65 = Console_7
+ keycode 66 = F8 F18 F8 F18
+ control keycode 66 = F8
+ alt keycode 66 = Console_8
+altgr alt keycode 66 = Console_8
+ keycode 67 = F9 F19 F9 F19
+ control keycode 67 = F9
+ alt keycode 67 = Console_9
+altgr alt keycode 67 = Console_9
+ keycode 68 = F10 F20 F10 F20
+ control keycode 68 = F10
+ alt keycode 68 = Console_10
+altgr alt keycode 68 = Console_10
+ keycode 69 = Num_Lock
+ keycode 70 = Scroll_Lock Show_Memory Show_Registers
+ control keycode 70 = Show_State
+ alt keycode 70 = Scroll_Lock
+ keycode 71 = KP_7
+ alt keycode 71 = Ascii_7
+ keycode 72 = KP_8
+ alt keycode 72 = Ascii_8
+ keycode 73 = KP_9
+ alt keycode 73 = Ascii_9
+ keycode 74 = KP_Subtract
+ keycode 75 = KP_4
+ alt keycode 75 = Ascii_4
+ keycode 76 = KP_5
+ alt keycode 76 = Ascii_5
+ keycode 77 = KP_6
+ alt keycode 77 = Ascii_6
+ keycode 78 = KP_Add
+ keycode 79 = KP_1
+ alt keycode 79 = Ascii_1
+ keycode 80 = KP_2
+ alt keycode 80 = Ascii_2
+ keycode 81 = KP_3
+ alt keycode 81 = Ascii_3
+ keycode 82 = KP_0
+ alt keycode 82 = Ascii_0
+ keycode 83 = KP_Period
+altgr control keycode 83 = Boot
+control alt keycode 83 = Boot
+ keycode 84 = Last_Console
+ keycode 85 =
+ keycode 86 = less greater bar
+ alt keycode 86 = Meta_less
+ keycode 87 = F11 F11 F11 F11
+ control keycode 87 = F11
+ alt keycode 87 = Console_11
+altgr alt keycode 87 = Console_11
+ keycode 88 = F12 F12 F12 F12
+ control keycode 88 = F12
+ alt keycode 88 = Console_12
+altgr alt keycode 88 = Console_12
+ keycode 89 =
+ keycode 90 =
+ keycode 91 =
+ keycode 92 =
+ keycode 93 =
+ keycode 94 =
+ keycode 95 =
+ keycode 96 = KP_Enter
+ keycode 97 = AltGr_Lock
+ keycode 98 = KP_Divide
+ keycode 99 = Control_backslash
+ control keycode 99 = Control_backslash
+ alt keycode 99 = Control_backslash
+ keycode 100 = Alt
+ keycode 101 = Break
+ keycode 102 = Find
+ keycode 103 = Up
+ keycode 104 = Prior
+ shift keycode 104 = Scroll_Backward
+ keycode 105 = Left
+ alt keycode 105 = Decr_Console
+ keycode 106 = Right
+ alt keycode 106 = Incr_Console
+ keycode 107 = Select
+ keycode 108 = Down
+ keycode 109 = Next
+ shift keycode 109 = Scroll_Forward
+ keycode 110 = Insert
+ keycode 111 = Remove
+altgr control keycode 111 = Boot
+control alt keycode 111 = Boot
+ keycode 112 =
+ keycode 113 =
+ keycode 114 =
+ keycode 115 =
+ keycode 116 =
+ keycode 117 =
+ keycode 118 =
+ keycode 119 =
+ keycode 120 =
+ keycode 121 =
+ keycode 122 =
+ keycode 123 =
+ keycode 124 =
+ keycode 125 =
+ keycode 126 =
+ keycode 127 =
diff --git a/data/keymaps/i386/qwerty/mk-cp1251.map b/data/keymaps/i386/qwerty/mk-cp1251.map
new file mode 100644
index 0000000..ea3fcf8
--- /dev/null
+++ b/data/keymaps/i386/qwerty/mk-cp1251.map
@@ -0,0 +1,304 @@
+### Macedonian keymap, ver:0.9 (cp-1251 version)
+### author: Damjan Georgievski <gdamjan@freemail.org.mk>
+###
+### keycode 125 (left win95 key) shift to cyrillic letters
+### keycode 126 (right win95 key) is the Compose key
+### keycode 127 (win95 menu key) toggles to cyryllic mode
+### -- You should custom-paint this keys :-)
+###
+### KeyboardSignal is Ctrl-Alt-End
+###
+### Also added by popular demand :-)
+### Left alt-shift toggles to cyrillic
+### Right alt is altgr, it shifts to cyrillic
+###
+keymaps 0-15
+strings as usual
+
+ keycode 1 = Escape Escape Escape Escape
+ alt keycode 1 = Meta_Escape
+ keycode 2 = one exclam one exclam
+ alt keycode 2 = Meta_one
+shift alt keycode 2 = Meta_exclam
+ keycode 3 = two at two 132
+ control keycode 3 = nul
+shift control keycode 3 = nul
+ alt keycode 3 = Meta_two
+shift alt keycode 3 = Meta_at
+ keycode 4 = three numbersign three 147
+ control keycode 4 = Escape
+ alt keycode 4 = Meta_three
+shift alt keycode 4 = Meta_numbersign
+ keycode 5 = four dollar four dollar
+ control keycode 5 = Control_backslash
+ alt keycode 5 = Meta_four
+shift alt keycode 5 = Meta_dollar
+ keycode 6 = five percent five percent
+ control keycode 6 = Control_bracketright
+ alt keycode 6 = Meta_five
+shift alt keycode 6 = Meta_percent
+ keycode 7 = six asciicircum six asciicircum
+ control keycode 7 = Control_asciicircum
+ alt keycode 7 = Meta_six
+shift alt keycode 7 = Meta_asciicircum
+ keycode 8 = seven ampersand seven ampersand
+ control keycode 8 = Control_underscore
+ alt keycode 8 = Meta_seven
+ keycode 9 = eight asterisk eight asterisk
+ control keycode 9 = Delete
+ alt keycode 9 = Meta_eight
+ keycode 10 = nine parenleft nine parenleft
+ alt keycode 10 = Meta_nine
+ keycode 11 = zero parenright zero parenright
+ alt keycode 11 = Meta_zero
+ keycode 12 = minus underscore minus underscore
+ control keycode 12 = Control_underscore
+shift control keycode 12 = Control_underscore
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+ keycode 14 = Delete Delete Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+ alt keycode 15 = Meta_Tab
+keycode 16 = +q +Q +154 +138 Control_q Control_q Control_q Control_q \
+Meta_q Meta_Q Meta_q Meta_Q Meta_Control_q Meta_Control_q Meta_Control_q Meta_Control_q
+keycode 17 = +w +W +156 +140 Control_w Control_w Control_w Control_w \
+Meta_w Meta_W Meta_w Meta_W Meta_Control_w Meta_Control_w Meta_Control_w Meta_Control_w
+keycode 18 = +e +E +229 +197 Control_e Control_e Control_e Control_e \
+Meta_e Meta_E Meta_e Meta_E Meta_Control_e Meta_Control_e Meta_Control_e Meta_Control_e
+keycode 19 = +r +R +240 +208 Control_r Control_r Control_r Control_r \
+Meta_r Meta_R Meta_r Meta_R Meta_Control_r Meta_Control_r Meta_Control_r Meta_Control_r
+keycode 20 = +t +T +242 +210 Control_t Control_t Control_t Control_t \
+Meta_t Meta_T Meta_t Meta_T Meta_Control_t Meta_Control_t Meta_Control_t Meta_Control_t
+keycode 21 = +y +Y +190 +189 Control_y Control_y Control_y Control_y \
+Meta_y Meta_Y Meta_y Meta_Y Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y
+keycode 22 = +u +U +243 +211 Control_u Control_u Control_u Control_u\
+Meta_u Meta_U Meta_u Meta_U Meta_Control_u Meta_Control_u Meta_Control_u Meta_Control_u
+keycode 23 = +i +I +232 +200 Control_i Control_i Control_i Control_i \
+Meta_i Meta_I Meta_i Meta_I Meta_Control_i Meta_Control_i Meta_Control_i Meta_Control_i
+keycode 24 = +o +O +238 +206 Control_o Control_o Control_o Control_o \
+Meta_o Meta_O Meta_o Meta_O Meta_Control_o Meta_Control_o Meta_Control_o Meta_Control_o
+keycode 25 = +p +P +239 +207 Control_p Control_p Control_p Control_p \
+Meta_p Meta_P Meta_p Meta_P Meta_Control_p Meta_Control_p Meta_Control_p Meta_Control_p
+ keycode 26 = bracketleft braceleft +248 +216
+ control keycode 26 = Escape
+ alt keycode 26 = Meta_bracketleft
+shift alt keycode 26 = Meta_braceleft
+ keycode 27 = bracketright braceright +131 +129
+ control keycode 27 = Control_bracketright
+ alt keycode 27 = Meta_bracketright
+shift alt keycode 27 = Meta_braceright
+ keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+ keycode 29 = Control
+keycode 30 = +a +A +224 +192 Control_a Control_a Control_a Control_a \
+Meta_a Meta_A Meta_a Meta_A Meta_Control_a Meta_Control_a Meta_Control_a Meta_Control_a
+keycode 31 = +s +S +241 +209 Control_s Control_s Control_s Control_s \
+Meta_s Meta_S Meta_s Meta_S Meta_Control_s Meta_Control_s Meta_Control_s Meta_Control_s
+keycode 32 = +d +D +228 +196 Control_d Control_d Control_d Control_d\
+Meta_d Meta_D Meta_d Meta_D Meta_Control_d Meta_Control_d Meta_Control_d Meta_Control_d
+keycode 33 = +f +F +244 +212 Control_f Control_f Control_f Control_f \
+Meta_f Meta_F Meta_f Meta_F Meta_Control_f Meta_Control_f Meta_Control_f Meta_Control_f
+keycode 34 = +g +G +227 +195 Control_g Control_g Control_g Control_g \
+Meta_g Meta_G Meta_g Meta_G Meta_Control_g Meta_Control_g Meta_Control_g Meta_Control_g
+keycode 35 = +h +H +245 +213 Control_h Control_h Control_h Control_h \
+Meta_h Meta_H Meta_h Meta_H Meta_Control_h Meta_Control_h Meta_Control_h Meta_Control_h
+keycode 36 = +j +J +188 +163 Control_j Control_j Control_j Control_j \
+Meta_j Meta_J Meta_j Meta_J Meta_Control_j Meta_Control_j Meta_Control_j Meta_Control_j
+keycode 37 = +k +K +234 +202 Control_k Control_k Control_k Control_k \
+Meta_k Meta_K Meta_k Meta_K Meta_Control_k Meta_Control_k Meta_Control_k Meta_Control_k
+keycode 38 = +l +L +235 +203 Control_l Control_l Control_l Control_l \
+Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l
+ keycode 39 = semicolon colon +247 +215
+ alt keycode 39 = Meta_semicolon
+ keycode 40 = apostrophe quotedbl +157 +141
+ control keycode 40 = Control_g
+ alt keycode 40 = Meta_apostrophe
+ keycode 41 = grave asciitilde grave asciitilde
+ control keycode 41 = nul
+ alt keycode 41 = Meta_grave
+ keycode 42 = Shift
+ alt keycode 42 = AltGr_Lock
+altgr alt keycode 42 = AltGr_Lock
+ keycode 43 = backslash bar +230 +198
+ control keycode 43 = Control_backslash
+ alt keycode 43 = Meta_backslash
+shift alt keycode 43 = Meta_bar
+keycode 44 = +z +Z +231 +199 Control_z Control_z Control_z Control_z \
+Meta_z Meta_Z Meta_z Meta_Z Meta_Control_z Meta_Control_z Meta_Control_z Meta_Control_z
+keycode 45 = +x +X +159 +143 Control_x Control_x Control_x Control_x \
+Meta_x Meta_X Meta_x Meta_X Meta_Control_x Meta_Control_x Meta_Control_x Meta_Control_x
+keycode 46 = +c +C +246 +214 Control_c Control_c Control_c Control_c \
+Meta_c Meta_C Meta_c Meta_C Meta_Control_c Meta_Control_c Meta_Control_c Meta_Control_c
+keycode 47 = +v +V +226 +194 Control_v Control_v Control_v Control_v\
+Meta_v Meta_V Meta_v Meta_V Meta_Control_v Meta_Control_v Meta_Control_v Meta_Control_v
+keycode 48 = +b +B +225 +193 Control_b Control_b Control_b Control_b \
+Meta_b Meta_B Meta_b Meta_B Meta_Control_b Meta_Control_b Meta_Control_b Meta_Control_b
+keycode 49 = +n +N +237 +205 Control_n Control_n Control_n Control_n \
+Meta_n Meta_N Meta_n Meta_N Meta_Control_n Meta_Control_n Meta_Control_n Meta_Control_n
+keycode 50 = +m +M +236 +204 Control_m Control_m Control_m Control_m\
+Meta_m Meta_M Meta_m Meta_M Meta_Control_m Meta_Control_m Meta_Control_m Meta_Control_m
+ keycode 51 = comma less comma semicolon
+ alt keycode 51 = Meta_comma
+shift alt keycode 51 = Meta_less
+ keycode 52 = period greater period colon
+ control keycode 52 = Compose
+ alt keycode 52 = Meta_period
+shift alt keycode 52 = Meta_greater
+ keycode 53 = slash question slash question
+ control keycode 53 = Delete
+shift control keycode 53 = Delete
+ alt keycode 53 = Meta_slash
+ keycode 54 = Shift
+ keycode 55 = KP_Multiply
+ keycode 56 = Alt
+ shift keycode 56 = AltGr_Lock
+altgr shift keycode 56 = AltGr_Lock
+ keycode 57 = space space space space
+ control keycode 57 = nul
+ alt keycode 57 = Meta_space
+ keycode 58 = Caps_Lock
+ keycode 59 = F1 F13 F1 F13 F25 F37 F25 F37 \
+Console_1 Console_13 Console_1 Console_13 Console_1 Console_13 Console_1 Console_13
+ keycode 60 = F2 F14 F2 F14 F26 F38 F26 F38 \
+Console_2 Console_14 Console_2 Console_14 Console_2 Console_14 Console_2 Console_14
+ keycode 61 = F3 F15 F3 F15 F27 F39 F27 F39 \
+Console_3 Console_15 Console_3 Console_15 Console_3 Console_15 Console_3 Console_15
+ keycode 62 = F4 F16 F4 F16 F28 F40 F28 F40 \
+Console_4 Console_16 Console_4 Console_16 Console_4 Console_16 Console_4 Console_16
+ keycode 63 = F5 F17 F5 F17 F29 F41 F29 F41 \
+Console_5 Console_17 Console_5 Console_17 Console_5 Console_17 Console_5 Console_17
+ keycode 64 = F6 F18 F6 F18 F30 F42 F30 F42 \
+Console_6 Console_18 Console_6 Console_18 Console_6 Console_18 Console_6 Console_18
+ keycode 65 = F7 F19 F7 F19 F31 F43 F31 F43 \
+Console_7 Console_19 Console_7 Console_19 Console_7 Console_19 Console_7 Console_19
+ keycode 66 = F8 F20 F8 F20 F32 F44 F32 F44 \
+Console_8 Console_20 Console_8 Console_20 Console_8 Console_20 Console_8 Console_20
+ keycode 67 = F9 F21 F9 F21 F33 F45 F33 F45 \
+Console_9 Console_21 Console_9 Console_21 Console_9 Console_21 Console_9 Console_21
+ keycode 68 = F10 F22 F10 F22 F34 F46 F34 F46 \
+Console_10 Console_22 Console_10 Console_22 Console_10 Console_22 Console_10 Console_22
+ keycode 69 = Num_Lock
+ keycode 70 = Scroll_Lock Show_Memory Show_Registers
+ control keycode 70 = Show_State
+ alt keycode 70 = Scroll_Lock
+ keycode 71 = KP_7
+ alt keycode 71 = Ascii_7
+ keycode 72 = KP_8
+ alt keycode 72 = Ascii_8
+ keycode 73 = KP_9
+ alt keycode 73 = Ascii_9
+ keycode 74 = KP_Subtract
+ keycode 75 = KP_4
+ alt keycode 75 = Ascii_4
+ keycode 76 = KP_5
+ alt keycode 76 = Ascii_5
+ keycode 77 = KP_6
+ alt keycode 77 = Ascii_6
+ keycode 78 = KP_Add
+ keycode 79 = KP_1
+ alt keycode 79 = Ascii_1
+ keycode 80 = KP_2
+ alt keycode 80 = Ascii_2
+ keycode 81 = KP_3
+ alt keycode 81 = Ascii_3
+ keycode 82 = KP_0
+ alt keycode 82 = Ascii_0
+ keycode 83 = KP_Period
+control alt keycode 83 = Boot
+altgr control alt keycode 83 = Boot
+ keycode 84 = Last_Console
+ keycode 85 =
+ keycode 86 = less greater bar
+ alt keycode 86 = Meta_less
+ keycode 87 = F11 F23 F11 F23 F35 F47 F35 F47 \
+Console_11 Console_23 Console_11 Console_23 Console_11 Console_23 Console_11 Console_23
+ keycode 88 = F12 F24 F12 F24 F36 F48 F36 F48 \
+Console_12 Console_24 Console_12 Console_24 Console_12 Console_24 Console_12 Console_24
+ keycode 89 =
+ keycode 90 =
+ keycode 91 =
+ keycode 92 =
+ keycode 93 =
+ keycode 94 =
+ keycode 95 =
+ keycode 96 = KP_Enter
+ keycode 97 = Control
+ keycode 98 = KP_Divide
+ keycode 99 = Control_backslash
+ keycode 100 = AltGr
+ keycode 101 = Break
+ keycode 102 = Find
+ keycode 103 = Up
+ keycode 104 = Prior
+ shift keycode 104 = Scroll_Backward
+altgr shift keycode 104 = Scroll_Backward
+ keycode 105 = Left
+ alt keycode 105 = Decr_Console
+altgr alt keycode 105 = Decr_Console
+ keycode 106 = Right
+ alt keycode 106 = Incr_Console
+altgr alt keycode 106 = Incr_Console
+ keycode 107 = Select
+control alt keycode 107 = KeyboardSignal
+altgr control alt keycode 107 = KeyboardSignal
+ keycode 108 = Down
+ keycode 109 = Next
+ shift keycode 109 = Scroll_Forward
+altgr shift keycode 109 = Scroll_Forward
+ keycode 110 = Insert
+ keycode 111 = Remove
+control alt keycode 111 = Boot
+altgr control alt keycode 111 = 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 =
+ keycode 121 =
+ keycode 122 =
+ keycode 123 =
+ keycode 124 =
+ keycode 125 = AltGr
+ keycode 126 = Compose
+ keycode 127 = AltGr_Lock
+
+compose 'å' '.' to 184
+compose 'è' '.' to 233
+compose 'Å' '.' to 168
+compose 'È' '.' to 201
+
+string F1 = "\033[[A"
+string F2 = "\033[[B"
+string F3 = "\033[[C"
+string F4 = "\033[[D"
+string F5 = "\033[[E"
+string F6 = "\033[17~"
+string F7 = "\033[18~"
+string F8 = "\033[19~"
+string F9 = "\033[20~"
+string F10 = "\033[21~"
+string F11 = "\033[23~"
+string F12 = "\033[24~"
+string F13 = "\033[25~"
+string F14 = "\033[26~"
+string F15 = "\033[28~"
+string F16 = "\033[29~"
+string F17 = "\033[31~"
+string F18 = "\033[32~"
+string F19 = "\033[33~"
+string F20 = "\033[34~"
+string Find = "\033[1~"
+string Insert = "\033[2~"
+string Remove = "\033[3~"
+string Select = "\033[4~"
+string Prior = "\033[5~"
+string Next = "\033[6~"
+string Macro = "\033[M"
+string Pause = "\033[P"
diff --git a/data/keymaps/i386/qwerty/mk-utf.map b/data/keymaps/i386/qwerty/mk-utf.map
new file mode 100644
index 0000000..059b2bd
--- /dev/null
+++ b/data/keymaps/i386/qwerty/mk-utf.map
@@ -0,0 +1,306 @@
+### Macedonian keymap, ver:0.9 (UTF-8 version)
+### author: Damjan Georgievski <gdamjan@freemail.org.mk>
+###
+### keycode 125 (left win95 key) shift to cyrillic letters
+### keycode 126 (right win95 key) is the Compose key
+### keycode 127 (win95 menu key) toggles to cyrillic mode
+### -- You should custom-paint this keys :-)
+###
+### KeyboardSignal is Ctrl-Alt-End
+###
+### Also added by popular demand :-)
+### Left alt-shift toggles to cyrillic
+### Right alt is altgr, it shifts to cyrillic
+###
+keymaps 0-15
+strings as usual
+
+ keycode 1 = Escape Escape Escape Escape
+ alt keycode 1 = Meta_Escape
+ keycode 2 = one exclam one exclam
+ alt keycode 2 = Meta_one
+shift alt keycode 2 = Meta_exclam
+ keycode 3 = two at two U+201e
+ control keycode 3 = nul
+shift control keycode 3 = nul
+ alt keycode 3 = Meta_two
+shift alt keycode 3 = Meta_at
+ keycode 4 = three numbersign three U+201c
+ control keycode 4 = Escape
+ alt keycode 4 = Meta_three
+shift alt keycode 4 = Meta_numbersign
+ keycode 5 = four dollar four dollar
+ control keycode 5 = Control_backslash
+ alt keycode 5 = Meta_four
+shift alt keycode 5 = Meta_dollar
+ keycode 6 = five percent five percent
+ control keycode 6 = Control_bracketright
+ alt keycode 6 = Meta_five
+shift alt keycode 6 = Meta_percent
+ keycode 7 = six asciicircum six asciicircum
+ control keycode 7 = Control_asciicircum
+ alt keycode 7 = Meta_six
+shift alt keycode 7 = Meta_asciicircum
+ keycode 8 = seven ampersand seven ampersand
+ control keycode 8 = Control_underscore
+ alt keycode 8 = Meta_seven
+ keycode 9 = eight asterisk eight asterisk
+ control keycode 9 = Delete
+ alt keycode 9 = Meta_eight
+ keycode 10 = nine parenleft nine parenleft
+ alt keycode 10 = Meta_nine
+ keycode 11 = zero parenright zero braceright
+ alt keycode 11 = Meta_zero
+ keycode 12 = minus underscore minus underscore
+ control keycode 12 = Control_underscore
+shift control keycode 12 = Control_underscore
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+ keycode 14 = Delete Delete Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+ alt keycode 15 = Meta_Tab
+keycode 16 = +q +Q U+0459 U+0409 Control_q Control_q Control_q Control_q \
+Meta_q Meta_Q Meta_q Meta_Q Meta_Control_q Meta_Control_q Meta_Control_q Meta_Control_q
+keycode 17 = +w +W U+045a U+040a Control_w Control_w Control_w Control_w \
+Meta_w Meta_W Meta_w Meta_W Meta_Control_w Meta_Control_w Meta_Control_w Meta_Control_w
+keycode 18 = +e +E U+0435 U+0415 Control_e Control_e U+0450 U+0400 \
+Meta_e Meta_E Meta_e Meta_E Meta_Control_e Meta_Control_e Meta_Control_e Meta_Control_e
+keycode 19 = +r +R U+0440 U+0420 Control_r Control_r Control_r Control_r \
+Meta_r Meta_R Meta_r Meta_R Meta_Control_r Meta_Control_r Meta_Control_r Meta_Control_r
+keycode 20 = +t +T U+0442 U+0422 Control_t Control_t Control_t Control_t \
+Meta_t Meta_T Meta_t Meta_T Meta_Control_t Meta_Control_t Meta_Control_t Meta_Control_t
+keycode 21 = +y +Y U+0455 U+0405 Control_y Control_y Control_y Control_y \
+Meta_y Meta_Y Meta_y Meta_Y Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y
+keycode 22 = +u +U U+0443 U+0423 Control_u Control_u Control_u Control_u \
+Meta_u Meta_U Meta_u Meta_U Meta_Control_u Meta_Control_u Meta_Control_u Meta_Control_u
+keycode 23 = +i +I U+0438 U+0418 Control_i Control_i U+045D U+040D \
+Meta_i Meta_I Meta_i Meta_I Meta_Control_i Meta_Control_i Meta_Control_i Meta_Control_i
+keycode 24 = +o +O U+043e U+041e Control_o Control_o Control_o Control_o \
+Meta_o Meta_O Meta_o Meta_O Meta_Control_o Meta_Control_o Meta_Control_o Meta_Control_o
+keycode 25 = +p +P U+043f U+041f Control_p Control_p Control_p Control_p \
+Meta_p Meta_P Meta_p Meta_P Meta_Control_p Meta_Control_p Meta_Control_p Meta_Control_p
+ keycode 26 = bracketleft braceleft U+0448 U+0428
+ control keycode 26 = Escape
+ alt keycode 26 = Meta_bracketleft
+shift alt keycode 26 = Meta_braceleft
+ keycode 27 = bracketright braceright U+0453 U+0403
+ control keycode 27 = Control_bracketright
+ alt keycode 27 = Meta_bracketright
+shift alt keycode 27 = Meta_braceright
+ keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+ keycode 29 = Control
+keycode 30 = +a +A U+0430 U+0410 Control_a Control_a Control_a Control_a \
+Meta_a Meta_A Meta_a Meta_A Meta_Control_a Meta_Control_a Meta_Control_a Meta_Control_a
+keycode 31 = +s +S U+0441 U+0421 Control_s Control_s Control_s Control_s \
+Meta_s Meta_S Meta_s Meta_S Meta_Control_s Meta_Control_s Meta_Control_s Meta_Control_s
+keycode 32 = +d +D U+0434 U+0414 Control_d Control_d Control_d Control_d \
+Meta_d Meta_D Meta_d Meta_D Meta_Control_d Meta_Control_d Meta_Control_d Meta_Control_d
+keycode 33 = +f +F U+0444 U+0424 Control_f Control_f Control_f Control_f \
+Meta_f Meta_F Meta_f Meta_F Meta_Control_f Meta_Control_f Meta_Control_f Meta_Control_f
+keycode 34 = +g +G U+0433 U+0413 Control_g Control_g Control_g Control_g \
+Meta_g Meta_G Meta_g Meta_G Meta_Control_g Meta_Control_g Meta_Control_g Meta_Control_g
+keycode 35 = +h +H U+0445 U+0425 Control_h Control_h Control_h Control_h \
+Meta_h Meta_H Meta_h Meta_H Meta_Control_h Meta_Control_h Meta_Control_h Meta_Control_h
+keycode 36 = +j +J U+0458 U+0408 Control_j Control_j Control_j Control_j \
+Meta_j Meta_J Meta_j Meta_J Meta_Control_j Meta_Control_j Meta_Control_j Meta_Control_j
+keycode 37 = +k +K U+043a U+041a Control_k Control_k Control_k Control_k \
+Meta_k Meta_K Meta_k Meta_K Meta_Control_k Meta_Control_k Meta_Control_k Meta_Control_k
+keycode 38 = +l +L U+043b U+041b Control_l Control_l Control_l Control_l \
+Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l
+ keycode 39 = semicolon colon U+0447 U+0427
+ alt keycode 39 = Meta_semicolon
+ keycode 40 = apostrophe quotedbl U+045c U+040c
+ control keycode 40 = Control_g
+ alt keycode 40 = Meta_apostrophe
+ keycode 41 = grave asciitilde grave asciitilde
+ control keycode 41 = nul
+ alt keycode 41 = Meta_grave
+ keycode 42 = Shift
+ alt keycode 42 = AltGr_Lock
+altgr alt keycode 42 = AltGr_Lock
+ keycode 43 = backslash bar U+0436 U+0416
+ control keycode 43 = Control_backslash
+ alt keycode 43 = Meta_backslash
+shift alt keycode 43 = Meta_bar
+keycode 44 = +z +Z U+0437 U+0417 Control_z Control_z Control_z Control_z \
+Meta_z Meta_Z Meta_z Meta_Z Meta_Control_z Meta_Control_z Meta_Control_z Meta_Control_z
+keycode 45 = +x +X U+045f U+040f Control_x Control_x Control_x Control_x \
+Meta_x Meta_X Meta_x Meta_X Meta_Control_x Meta_Control_x Meta_Control_x Meta_Control_x
+keycode 46 = +c +C U+0446 U+0426 Control_c Control_c Control_c Control_c \
+Meta_c Meta_C Meta_c Meta_C Meta_Control_c Meta_Control_c Meta_Control_c Meta_Control_c
+keycode 47 = +v +V U+0432 U+0412 Control_v Control_v Control_v Control_v \
+Meta_v Meta_V Meta_v Meta_V Meta_Control_v Meta_Control_v Meta_Control_v Meta_Control_v
+keycode 48 = +b +B U+0431 U+0411 Control_b Control_b Control_b Control_b \
+Meta_b Meta_B Meta_b Meta_B Meta_Control_b Meta_Control_b Meta_Control_b Meta_Control_b
+keycode 49 = +n +N U+043d U+041d Control_n Control_n Control_n Control_n \
+Meta_n Meta_N Meta_n Meta_N Meta_Control_n Meta_Control_n Meta_Control_n Meta_Control_n
+keycode 50 = +m +M U+043c U+041c Control_m Control_m Control_m Control_m \
+Meta_m Meta_M Meta_m Meta_M Meta_Control_m Meta_Control_m Meta_Control_m Meta_Control_m
+ keycode 51 = comma less comma less
+ alt keycode 51 = Meta_comma
+shift alt keycode 51 = Meta_less
+ keycode 52 = period greater period greater
+ control keycode 52 = Compose
+ alt keycode 52 = Meta_period
+shift alt keycode 52 = Meta_greater
+ keycode 53 = slash question slash question
+ control keycode 53 = Delete
+shift control keycode 53 = Delete
+ alt keycode 53 = Meta_slash
+ keycode 54 = Shift
+ keycode 55 = KP_Multiply
+ keycode 56 = Alt
+ shift keycode 56 = AltGr_Lock
+altgr shift keycode 56 = AltGr_Lock
+ keycode 57 = space space space space
+ control keycode 57 = nul
+ alt keycode 57 = Meta_space
+ keycode 58 = Caps_Lock
+ keycode 59 = F1 F13 F1 F13 F25 F37 F25 F37 \
+Console_1 Console_13 Console_1 Console_13 Console_1 Console_13 Console_1 Console_13
+ keycode 60 = F2 F14 F2 F14 F26 F38 F26 F38 \
+Console_2 Console_14 Console_2 Console_14 Console_2 Console_14 Console_2 Console_14
+ keycode 61 = F3 F15 F3 F15 F27 F39 F27 F39 \
+Console_3 Console_15 Console_3 Console_15 Console_3 Console_15 Console_3 Console_15
+ keycode 62 = F4 F16 F4 F16 F28 F40 F28 F40 \
+Console_4 Console_16 Console_4 Console_16 Console_4 Console_16 Console_4 Console_16
+ keycode 63 = F5 F17 F5 F17 F29 F41 F29 F41 \
+Console_5 Console_17 Console_5 Console_17 Console_5 Console_17 Console_5 Console_17
+ keycode 64 = F6 F18 F6 F18 F30 F42 F30 F42 \
+Console_6 Console_18 Console_6 Console_18 Console_6 Console_18 Console_6 Console_18
+ keycode 65 = F7 F19 F7 F19 F31 F43 F31 F43 \
+Console_7 Console_19 Console_7 Console_19 Console_7 Console_19 Console_7 Console_19
+ keycode 66 = F8 F20 F8 F20 F32 F44 F32 F44 \
+Console_8 Console_20 Console_8 Console_20 Console_8 Console_20 Console_8 Console_20
+ keycode 67 = F9 F21 F9 F21 F33 F45 F33 F45 \
+Console_9 Console_21 Console_9 Console_21 Console_9 Console_21 Console_9 Console_21
+ keycode 68 = F10 F22 F10 F22 F34 F46 F34 F46 \
+Console_10 Console_22 Console_10 Console_22 Console_10 Console_22 Console_10 Console_22
+ keycode 69 = Num_Lock
+ keycode 70 = Scroll_Lock Show_Memory Show_Registers
+ control keycode 70 = Show_State
+ alt keycode 70 = Scroll_Lock
+ keycode 71 = KP_7
+ alt keycode 71 = Ascii_7
+ keycode 72 = KP_8
+ alt keycode 72 = Ascii_8
+ keycode 73 = KP_9
+ alt keycode 73 = Ascii_9
+ keycode 74 = KP_Subtract
+ keycode 75 = KP_4
+ alt keycode 75 = Ascii_4
+ keycode 76 = KP_5
+ alt keycode 76 = Ascii_5
+ keycode 77 = KP_6
+ alt keycode 77 = Ascii_6
+ keycode 78 = KP_Add
+ keycode 79 = KP_1
+ alt keycode 79 = Ascii_1
+ keycode 80 = KP_2
+ alt keycode 80 = Ascii_2
+ keycode 81 = KP_3
+ alt keycode 81 = Ascii_3
+ keycode 82 = KP_0
+ alt keycode 82 = Ascii_0
+ keycode 83 = KP_Period
+control alt keycode 83 = Boot
+altgr control alt keycode 83 = Boot
+ keycode 84 = Last_Console
+ keycode 85 =
+ keycode 86 = less greater bar
+ alt keycode 86 = Meta_less
+ keycode 87 = F11 F23 F11 F23 F35 F47 F35 F47 \
+Console_11 Console_23 Console_11 Console_23 Console_11 Console_23 Console_11 Console_23
+ keycode 88 = F12 F24 F12 F24 F36 F48 F36 F48 \
+Console_12 Console_24 Console_12 Console_24 Console_12 Console_24 Console_12 Console_24
+ keycode 89 =
+ keycode 90 =
+ keycode 91 =
+ keycode 92 =
+ keycode 93 =
+ keycode 94 =
+ keycode 95 =
+ keycode 96 = KP_Enter
+ keycode 97 = Control
+ keycode 98 = KP_Divide
+ keycode 99 = Control_backslash
+ keycode 100 = AltGr
+ keycode 101 = Break
+ keycode 102 = Find
+ keycode 103 = Up
+ keycode 104 = Prior
+ shift keycode 104 = Scroll_Backward
+altgr shift keycode 104 = Scroll_Backward
+ keycode 105 = Left
+ alt keycode 105 = Decr_Console
+altgr alt keycode 105 = Decr_Console
+ keycode 106 = Right
+ alt keycode 106 = Incr_Console
+altgr alt keycode 106 = Incr_Console
+ keycode 107 = Select
+control alt keycode 107 = KeyboardSignal
+altgr control alt keycode 107 = KeyboardSignal
+ keycode 108 = Down
+ keycode 109 = Next
+ shift keycode 109 = Scroll_Forward
+altgr shift keycode 109 = Scroll_Forward
+ keycode 110 = Insert
+ keycode 111 = Remove
+control alt keycode 111 = Boot
+altgr control alt keycode 111 = 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 =
+ keycode 121 =
+ keycode 122 =
+ keycode 123 =
+ keycode 124 =
+ keycode 125 = AltGr
+ keycode 126 = Compose
+ keycode 127 = AltGr_Lock
+#
+# I'll need kernel-2.4 and glibc-2.2 for this to work
+#
+#compose U+0435 <grave> to U+0450 # Cyrillic_e_grave
+#compose U+0415 <grave> to U+0400 # Cyrillic_E_grave
+#compose U+0438 <grave> to U+045D # Cyrillic_i_grave
+#compose U+0418 <grave> to U+040D # Cyrillic_I_grave
+#
+string F1 = "\033[[A"
+string F2 = "\033[[B"
+string F3 = "\033[[C"
+string F4 = "\033[[D"
+string F5 = "\033[[E"
+string F6 = "\033[17~"
+string F7 = "\033[18~"
+string F8 = "\033[19~"
+string F9 = "\033[20~"
+string F10 = "\033[21~"
+string F11 = "\033[23~"
+string F12 = "\033[24~"
+string F13 = "\033[25~"
+string F14 = "\033[26~"
+string F15 = "\033[28~"
+string F16 = "\033[29~"
+string F17 = "\033[31~"
+string F18 = "\033[32~"
+string F19 = "\033[33~"
+string F20 = "\033[34~"
+string Find = "\033[1~"
+string Insert = "\033[2~"
+string Remove = "\033[3~"
+string Select = "\033[4~"
+string Prior = "\033[5~"
+string Next = "\033[6~"
+string Macro = "\033[M"
+string Pause = "\033[P"
diff --git a/data/keymaps/i386/qwerty/mk.map b/data/keymaps/i386/qwerty/mk.map
index 4ff529b..451fffc 100644
--- a/data/keymaps/i386/qwerty/mk.map
+++ b/data/keymaps/i386/qwerty/mk.map
@@ -1,108 +1,304 @@
-# From: Danko Ilik <danko@mindless.com>
-# Date: Sun Feb 7 19:58:47 CET 1999
-#
-# Macedonian Cyrilic Unicode keyboard mapping
-###############################################
-#
-# Vkluchuvanje/iskluchuvanje na kirilichen mod se pravi so left_alt+left_shift
-#
-# kaj mene, so slednata niza naredbi se vkluchuva terminalskata podrshka
-# za nashiot jazik:
-# setfont iso05.f14
-# loadunimap iso05.uni
-# kbd_mode -u
-# loadkeys mk.map
-# so
-# echo -e '\033%G'
-# se ovozmozhuva prikaz na kirilichni simboli na terminalot, shto nekogash
-# znae da go razneubavi displayot (kaj programi shto koristat ncurses,
-# na primer) pa e zgodno da se iskluchi ispisot na kirilicata:
-# echo -e '\033%@'
-#
-# Mnogu od programite se zbunuvaat koga kje im se prati tolku mokjen :)
-# karakter kako kirilichniot, pa treba da se iskluchat soodvetnite
-# blokadi na 8-bitovi.
-#
-# Verojatno, tekst so komentari za nashite raboti mozhe da najdete na
-# http://eon.pmf.ukim.edu.mk/~danko/linux.mk/
-#
-# Pratete komentar so sugestii.
-#
-# korisna e dokumentacijata za kbd paketot (/usr/doc/kbd*)
-###############################################
-# (adapted a bit, aeb)
-#
+### Macedonian keymap, ver:0.9 (iso-8859-5 version)
+### author: Damjan Georgievski <gdamjan@freemail.org.mk>
+###
+### keycode 125 (left win95 key) shift to cyrillic letters
+### keycode 126 (right win95 key) is the Compose key
+### keycode 127 (win95 menu key) toggles to cyryllic mode
+### -- You should custom-paint this keys :-)
+###
+### KeyboardSignal is Ctrl-Alt-End
+###
+### Also added by popular demand :-)
+### Left alt-shift toggles to cyrillic
+### Right alt is altgr, it shifts to cyrillic
+###
charset "iso-8859-5"
-alt_is_meta
-keymaps 0-10,12,14
-include "linux-with-modeshift-altgr.inc"
+keymaps 0-15
strings as usual
-keycode 1 = Escape
-keycode 2 = one exclam one exclam
-keycode 3 = two at two at nul nul
-keycode 4 = three numbersign three numbersign Escape
-keycode 5 = four dollar four dollar Control_backslash
-keycode 6 = five percent five percent Control_bracketright
-keycode 7 = six asciicircum six asciicircum Control_asciicircum
-keycode 8 = seven ampersand seven ampersand Control_underscore
-keycode 9 = eight asterisk eight asterisk Delete
-keycode 10 = nine parenleft nine parenleft
-keycode 11 = zero parenright zero parenright
-keycode 12 = minus underscore minus underscore Control_underscore Control_underscore
-keycode 13 = equal plus equal plus
-keycode 14 = Delete Delete Delete Delete BackSpace
-keycode 15 = Tab
-keycode 16 = +q +Q U+0459 U+0409 Control_q Control_q Control_q Control_q
-keycode 17 = +w +W U+045a U+040a Control_w Control_w Control_w Control_w
-keycode 18 = +e +E U+0435 U+0415 Control_e Control_e Control_e Control_e
-keycode 19 = +r +R U+0440 U+0420 Control_r Control_r Control_r Control_r
-keycode 20 = +t +T U+0442 U+0422 Control_t Control_t Control_t Control_t
-keycode 21 = +y +Y U+0455 U+0405 Control_y Control_y Control_y Control_y
-keycode 22 = +u +U U+0443 U+0423 Control_u Control_u Control_u Control_u
-keycode 23 = +i +I U+0438 U+0418 Tab Tab Tab Tab
-keycode 24 = +o +O U+043e U+041e Control_o Control_o Control_o Control_o
-keycode 25 = +p +P U+043f U+041f Control_p Control_p Control_p Control_p
-keycode 26 = bracketleft braceleft U+0448 U+0428 Escape
-keycode 27 = bracketright braceright U+0453 U+0403 Control_bracketright
-keycode 28 = Return
-alt keycode 28 = Meta_Control_m
-keycode 29 = Control
-keycode 30 = +a +A U+0430 U+0410 Control_a Control_a Control_a Control_a
-keycode 31 = +s +S U+0441 U+0421 Control_s Control_s Control_s Control_s
-keycode 32 = +d +D U+0434 U+0414 Control_d Control_d Control_d Control_d
-keycode 33 = +f +F U+0444 U+0424 Control_f Control_f Control_f Control_f
-keycode 34 = +g +G U+0433 U+0413 Control_g Control_g Control_g Control_g
-keycode 35 = +h +H U+0445 U+0425 BackSpace BackSpace BackSpace BackSpace
-keycode 36 = +j +J U+0458 U+0408 Linefeed Linefeed Linefeed Linefeed
-keycode 37 = +k +K U+043a U+041a Control_k Control_k Control_k Control_k
-keycode 38 = +l +L U+043b U+041b Control_l Control_l Control_l Control_l
-keycode 39 = semicolon colon U+0447 U+0427
-keycode 40 = apostrophe quotedbl U+045c U+040c Control_g
-keycode 41 = grave asciitilde apostrophe quotedbl nul
-
-keycode 42 = Shift
-alt keycode 42 = AltGr_Lock
-altgr alt keycode 42 = AltGr_Lock
-
-keycode 43 = backslash bar U+0436 U+0416 Control_backslash
-keycode 44 = +z +Z U+0437 U+0417 Control_z Control_z Control_z Control_z
-keycode 45 = +x +X U+045f U+040f Control_x Control_x Control_x Control_x
-keycode 46 = +c +C U+0446 U+0426 Control_c Control_c Control_c Control_c
-keycode 47 = +v +V U+0432 U+0412 Control_v Control_v Control_v Control_v
-keycode 48 = +b +B U+0431 U+0411 Control_b Control_b Control_b Control_b
-keycode 49 = +n +N U+043d U+041d Control_n Control_n Control_n Control_n
-keycode 50 = +m +M U+043c U+041c Control_m Control_m Control_m Control_m
-keycode 51 = comma less comma semicolon
-keycode 52 = period greater period colon
-keycode 53 = slash question slash question Delete Delete
-keycode 54 = Shift
-keycode 55 = KP_Multiply
-keycode 56 = Alt
-keycode 57 = space
-control keycode 57 = nul
-keycode 58 = Caps_Lock
-
-keycode 86 = less greater bar
-
+ keycode 1 = Escape Escape Escape Escape
+ alt keycode 1 = Meta_Escape
+ keycode 2 = one exclam one exclam
+ alt keycode 2 = Meta_one
+shift alt keycode 2 = Meta_exclam
+ keycode 3 = two at two at
+ control keycode 3 = nul
+shift control keycode 3 = nul
+ alt keycode 3 = Meta_two
+shift alt keycode 3 = Meta_at
+ keycode 4 = three numbersign three numbersign
+ control keycode 4 = Escape
+ alt keycode 4 = Meta_three
+shift alt keycode 4 = Meta_numbersign
+ keycode 5 = four dollar four dollar
+ control keycode 5 = Control_backslash
+ alt keycode 5 = Meta_four
+shift alt keycode 5 = Meta_dollar
+ keycode 6 = five percent five percent
+ control keycode 6 = Control_bracketright
+ alt keycode 6 = Meta_five
+shift alt keycode 6 = Meta_percent
+ keycode 7 = six asciicircum six asciicircum
+ control keycode 7 = Control_asciicircum
+ alt keycode 7 = Meta_six
+shift alt keycode 7 = Meta_asciicircum
+ keycode 8 = seven ampersand seven ampersand
+ control keycode 8 = Control_underscore
+ alt keycode 8 = Meta_seven
+ keycode 9 = eight asterisk eight asterisk
+ control keycode 9 = Delete
+ alt keycode 9 = Meta_eight
+ keycode 10 = nine parenleft nine parenleft
+ alt keycode 10 = Meta_nine
+ keycode 11 = zero parenright zero parenright
+ alt keycode 11 = Meta_zero
+ keycode 12 = minus underscore minus underscore
+ control keycode 12 = Control_underscore
+shift control keycode 12 = Control_underscore
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+ keycode 14 = Delete Delete Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+ alt keycode 15 = Meta_Tab
+keycode 16 = +q +Q +249 +169 Control_q Control_q Control_q Control_q \
+Meta_q Meta_Q Meta_q Meta_Q Meta_Control_q Meta_Control_q Meta_Control_q Meta_Control_q
+keycode 17 = +w +W +250 +170 Control_w Control_w Control_w Control_w \
+Meta_w Meta_W Meta_w Meta_W Meta_Control_w Meta_Control_w Meta_Control_w Meta_Control_w
+keycode 18 = +e +E +213 +181 Control_e Control_e Control_e Control_e \
+Meta_e Meta_E Meta_e Meta_E Meta_Control_e Meta_Control_e Meta_Control_e Meta_Control_e
+keycode 19 = +r +R +224 +192 Control_r Control_r Control_r Control_r \
+Meta_r Meta_R Meta_r Meta_R Meta_Control_r Meta_Control_r Meta_Control_r Meta_Control_r
+keycode 20 = +t +T +226 +194 Control_t Control_t Control_t Control_t \
+Meta_t Meta_T Meta_t Meta_T Meta_Control_t Meta_Control_t Meta_Control_t Meta_Control_t
+keycode 21 = +y +Y +245 +165 Control_y Control_y Control_y Control_y \
+Meta_y Meta_Y Meta_y Meta_Y Meta_Control_y Meta_Control_y Meta_Control_y Meta_Control_y
+keycode 22 = +u +U +227 +195 Control_u Control_u Control_u Control_u \
+Meta_u Meta_U Meta_u Meta_U Meta_Control_u Meta_Control_u Meta_Control_u Meta_Control_u
+keycode 23 = +i +I +216 +184 Control_i Control_i Control_i Control_i \
+Meta_i Meta_I Meta_i Meta_I Meta_Control_i Meta_Control_i Meta_Control_i Meta_Control_i
+keycode 24 = +o +O +222 +190 Control_o Control_o Control_o Control_o \
+Meta_o Meta_O Meta_o Meta_O Meta_Control_o Meta_Control_o Meta_Control_o Meta_Control_o
+keycode 25 = +p +P +223 +191 Control_p Control_p Control_p Control_p \
+Meta_p Meta_P Meta_p Meta_P Meta_Control_p Meta_Control_p Meta_Control_p Meta_Control_p
+ keycode 26 = bracketleft braceleft +232 +200
+ control keycode 26 = Escape
+ alt keycode 26 = Meta_bracketleft
+shift alt keycode 26 = Meta_braceleft
+ keycode 27 = bracketright braceright +243 +163
+ control keycode 27 = Control_bracketright
+ alt keycode 27 = Meta_bracketright
+shift alt keycode 27 = Meta_braceright
+ keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+ keycode 29 = Control
+keycode 30 = +a +A +208 +176 Control_a Control_a Control_a Control_a \
+Meta_a Meta_A Meta_a Meta_A Meta_Control_a Meta_Control_a Meta_Control_a Meta_Control_a
+keycode 31 = +s +S +225 +193 Control_s Control_s Control_s Control_s \
+Meta_s Meta_S Meta_s Meta_S Meta_Control_s Meta_Control_s Meta_Control_s Meta_Control_s
+keycode 32 = +d +D +212 +180 Control_d Control_d Control_d Control_d \
+Meta_d Meta_D Meta_d Meta_D Meta_Control_d Meta_Control_d Meta_Control_d Meta_Control_d
+keycode 33 = +f +F +228 +196 Control_f Control_f Control_f Control_f \
+Meta_f Meta_F Meta_f Meta_F Meta_Control_f Meta_Control_f Meta_Control_f Meta_Control_f
+keycode 34 = +g +G +211 +179 Control_g Control_g Control_g Control_g \
+Meta_g Meta_G Meta_g Meta_G Meta_Control_g Meta_Control_g Meta_Control_g Meta_Control_g
+keycode 35 = +h +H +229 +197 Control_h Control_h Control_h Control_h \
+Meta_h Meta_H Meta_h Meta_H Meta_Control_h Meta_Control_h Meta_Control_h Meta_Control_h
+keycode 36 = +j +J +248 +168 Control_j Control_j Control_j Control_j \
+Meta_j Meta_J Meta_j Meta_J Meta_Control_j Meta_Control_j Meta_Control_j Meta_Control_j
+keycode 37 = +k +K +218 +186 Control_k Control_k Control_k Control_k \
+Meta_k Meta_K Meta_k Meta_K Meta_Control_k Meta_Control_k Meta_Control_k Meta_Control_k
+keycode 38 = +l +L +219 +187 Control_l Control_l Control_l Control_l \
+Meta_l Meta_L Meta_l Meta_L Meta_Control_l Meta_Control_l Meta_Control_l Meta_Control_l
+ keycode 39 = semicolon colon +231 +199
+ alt keycode 39 = Meta_semicolon
+ keycode 40 = apostrophe quotedbl +252 +172
+ control keycode 40 = Control_g
+ alt keycode 40 = Meta_apostrophe
+ keycode 41 = grave asciitilde grave asciitilde
+ control keycode 41 = nul
+ alt keycode 41 = Meta_grave
+ keycode 42 = Shift
+ alt keycode 42 = AltGr_Lock
+altgr alt keycode 42 = AltGr_Lock
+ keycode 43 = backslash bar +214 +182
+ control keycode 43 = Control_backslash
+ alt keycode 43 = Meta_backslash
+shift alt keycode 43 = Meta_bar
+keycode 44 = +z +Z +215 +183 Control_z Control_z Control_z Control_z \
+Meta_z Meta_Z Meta_z Meta_Z Meta_Control_z Meta_Control_z Meta_Control_z Meta_Control_z
+keycode 45 = +x +X +255 +175 Control_x Control_x Control_x Control_x \
+Meta_x Meta_X Meta_x Meta_X Meta_Control_x Meta_Control_x Meta_Control_x Meta_Control_x
+keycode 46 = +c +C +230 +198 Control_c Control_c Control_c Control_c \
+Meta_c Meta_C Meta_c Meta_C Meta_Control_c Meta_Control_c Meta_Control_c Meta_Control_c
+keycode 47 = +v +V +210 +178 Control_v Control_v Control_v Control_v \
+Meta_v Meta_V Meta_v Meta_V Meta_Control_v Meta_Control_v Meta_Control_v Meta_Control_v
+keycode 48 = +b +B +209 +177 Control_b Control_b Control_b Control_b \
+Meta_b Meta_B Meta_b Meta_B Meta_Control_b Meta_Control_b Meta_Control_b Meta_Control_b
+keycode 49 = +n +N +221 +189 Control_n Control_n Control_n Control_n \
+Meta_n Meta_N Meta_n Meta_N Meta_Control_n Meta_Control_n Meta_Control_n Meta_Control_n
+keycode 50 = +m +M +220 +188 Control_m Control_m Control_m Control_m \
+Meta_m Meta_M Meta_m Meta_M Meta_Control_m Meta_Control_m Meta_Control_m Meta_Control_m
+ keycode 51 = comma less comma semicolon
+ alt keycode 51 = Meta_comma
+shift alt keycode 51 = Meta_less
+ keycode 52 = period greater period colon
+ control keycode 52 = Compose
+ alt keycode 52 = Meta_period
+shift alt keycode 52 = Meta_greater
+ keycode 53 = slash question slash question
+ control keycode 53 = Delete
+shift control keycode 53 = Delete
+ alt keycode 53 = Meta_slash
+ keycode 54 = Shift
+ keycode 55 = KP_Multiply
+ keycode 56 = Alt
+ shift keycode 56 = AltGr_Lock
+altgr shift keycode 56 = AltGr_Lock
+ keycode 57 = space space space space
+ control keycode 57 = nul
+ alt keycode 57 = Meta_space
+ keycode 58 = Caps_Lock
+ keycode 59 = F1 F13 F1 F13 F25 F37 F25 F37 \
+Console_1 Console_13 Console_1 Console_13 Console_1 Console_13 Console_1 Console_13
+ keycode 60 = F2 F14 F2 F14 F26 F38 F26 F38 \
+Console_2 Console_14 Console_2 Console_14 Console_2 Console_14 Console_2 Console_14
+ keycode 61 = F3 F15 F3 F15 F27 F39 F27 F39 \
+Console_3 Console_15 Console_3 Console_15 Console_3 Console_15 Console_3 Console_15
+ keycode 62 = F4 F16 F4 F16 F28 F40 F28 F40 \
+Console_4 Console_16 Console_4 Console_16 Console_4 Console_16 Console_4 Console_16
+ keycode 63 = F5 F17 F5 F17 F29 F41 F29 F41 \
+Console_5 Console_17 Console_5 Console_17 Console_5 Console_17 Console_5 Console_17
+ keycode 64 = F6 F18 F6 F18 F30 F42 F30 F42 \
+Console_6 Console_18 Console_6 Console_18 Console_6 Console_18 Console_6 Console_18
+ keycode 65 = F7 F19 F7 F19 F31 F43 F31 F43 \
+Console_7 Console_19 Console_7 Console_19 Console_7 Console_19 Console_7 Console_19
+ keycode 66 = F8 F20 F8 F20 F32 F44 F32 F44 \
+Console_8 Console_20 Console_8 Console_20 Console_8 Console_20 Console_8 Console_20
+ keycode 67 = F9 F21 F9 F21 F33 F45 F33 F45 \
+Console_9 Console_21 Console_9 Console_21 Console_9 Console_21 Console_9 Console_21
+ keycode 68 = F10 F22 F10 F22 F34 F46 F34 F46 \
+Console_10 Console_22 Console_10 Console_22 Console_10 Console_22 Console_10 Console_22
+ keycode 69 = Num_Lock
+ keycode 70 = Scroll_Lock Show_Memory Show_Registers
+ control keycode 70 = Show_State
+ alt keycode 70 = Scroll_Lock
+ keycode 71 = KP_7
+ alt keycode 71 = Ascii_7
+ keycode 72 = KP_8
+ alt keycode 72 = Ascii_8
+ keycode 73 = KP_9
+ alt keycode 73 = Ascii_9
+ keycode 74 = KP_Subtract
+ keycode 75 = KP_4
+ alt keycode 75 = Ascii_4
+ keycode 76 = KP_5
+ alt keycode 76 = Ascii_5
+ keycode 77 = KP_6
+ alt keycode 77 = Ascii_6
+ keycode 78 = KP_Add
+ keycode 79 = KP_1
+ alt keycode 79 = Ascii_1
+ keycode 80 = KP_2
+ alt keycode 80 = Ascii_2
+ keycode 81 = KP_3
+ alt keycode 81 = Ascii_3
+ keycode 82 = KP_0
+ alt keycode 82 = Ascii_0
+ keycode 83 = KP_Period
+control alt keycode 83 = Boot
+altgr control alt keycode 83 = Boot
+ keycode 84 = Last_Console
+ keycode 85 =
+ keycode 86 = less greater bar
+ alt keycode 86 = Meta_less
+ keycode 87 = F11 F23 F11 F23 F35 F47 F35 F47 \
+Console_11 Console_23 Console_11 Console_23 Console_11 Console_23 Console_11 Console_23
+ keycode 88 = F12 F24 F12 F24 F36 F48 F36 F48 \
+Console_12 Console_24 Console_12 Console_24 Console_12 Console_24 Console_12 Console_24
+ keycode 89 =
+ keycode 90 =
+ keycode 91 =
+ keycode 92 =
+ keycode 93 =
+ keycode 94 =
+ keycode 95 =
+ keycode 96 = KP_Enter
+ keycode 97 = Control
+ keycode 98 = KP_Divide
+ keycode 99 = Control_backslash
+ keycode 100 = AltGr
+ keycode 101 = Break
+ keycode 102 = Find
+ keycode 103 = Up
+ keycode 104 = Prior
+ shift keycode 104 = Scroll_Backward
+altgr shift keycode 104 = Scroll_Backward
+ keycode 105 = Left
+ alt keycode 105 = Decr_Console
+altgr alt keycode 105 = Decr_Console
+ keycode 106 = Right
+ alt keycode 106 = Incr_Console
+altgr alt keycode 106 = Incr_Console
+ keycode 107 = Select
+control alt keycode 107 = KeyboardSignal
+altgr control alt keycode 107 = KeyboardSignal
+ keycode 108 = Down
+ keycode 109 = Next
+ shift keycode 109 = Scroll_Forward
+altgr shift keycode 109 = Scroll_Forward
+ keycode 110 = Insert
+ keycode 111 = Remove
+control alt keycode 111 = Boot
altgr control alt keycode 111 = 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 =
+ keycode 121 =
+ keycode 122 =
+ keycode 123 =
+ keycode 124 =
+ keycode 125 = AltGr
+ keycode 126 = Compose
+ keycode 127 = AltGr_Lock
+compose 'Õ' '.' to 241
+compose 'Ø' '.' to 217
+compose 'µ' '.' to 161
+compose '¸' '.' to 185
+
+string F1 = "\033[[A"
+string F2 = "\033[[B"
+string F3 = "\033[[C"
+string F4 = "\033[[D"
+string F5 = "\033[[E"
+string F6 = "\033[17~"
+string F7 = "\033[18~"
+string F8 = "\033[19~"
+string F9 = "\033[20~"
+string F10 = "\033[21~"
+string F11 = "\033[23~"
+string F12 = "\033[24~"
+string F13 = "\033[25~"
+string F14 = "\033[26~"
+string F15 = "\033[28~"
+string F16 = "\033[29~"
+string F17 = "\033[31~"
+string F18 = "\033[32~"
+string F19 = "\033[33~"
+string F20 = "\033[34~"
+string Find = "\033[1~"
+string Insert = "\033[2~"
+string Remove = "\033[3~"
+string Select = "\033[4~"
+string Prior = "\033[5~"
+string Next = "\033[6~"
+string Macro = "\033[M"
+string Pause = "\033[P"
diff --git a/data/keymaps/i386/qwerty/mk0.map b/data/keymaps/i386/qwerty/mk0.map
new file mode 100644
index 0000000..4ff529b
--- /dev/null
+++ b/data/keymaps/i386/qwerty/mk0.map
@@ -0,0 +1,108 @@
+# From: Danko Ilik <danko@mindless.com>
+# Date: Sun Feb 7 19:58:47 CET 1999
+#
+# Macedonian Cyrilic Unicode keyboard mapping
+###############################################
+#
+# Vkluchuvanje/iskluchuvanje na kirilichen mod se pravi so left_alt+left_shift
+#
+# kaj mene, so slednata niza naredbi se vkluchuva terminalskata podrshka
+# za nashiot jazik:
+# setfont iso05.f14
+# loadunimap iso05.uni
+# kbd_mode -u
+# loadkeys mk.map
+# so
+# echo -e '\033%G'
+# se ovozmozhuva prikaz na kirilichni simboli na terminalot, shto nekogash
+# znae da go razneubavi displayot (kaj programi shto koristat ncurses,
+# na primer) pa e zgodno da se iskluchi ispisot na kirilicata:
+# echo -e '\033%@'
+#
+# Mnogu od programite se zbunuvaat koga kje im se prati tolku mokjen :)
+# karakter kako kirilichniot, pa treba da se iskluchat soodvetnite
+# blokadi na 8-bitovi.
+#
+# Verojatno, tekst so komentari za nashite raboti mozhe da najdete na
+# http://eon.pmf.ukim.edu.mk/~danko/linux.mk/
+#
+# Pratete komentar so sugestii.
+#
+# korisna e dokumentacijata za kbd paketot (/usr/doc/kbd*)
+###############################################
+# (adapted a bit, aeb)
+#
+charset "iso-8859-5"
+alt_is_meta
+keymaps 0-10,12,14
+include "linux-with-modeshift-altgr.inc"
+strings as usual
+
+keycode 1 = Escape
+keycode 2 = one exclam one exclam
+keycode 3 = two at two at nul nul
+keycode 4 = three numbersign three numbersign Escape
+keycode 5 = four dollar four dollar Control_backslash
+keycode 6 = five percent five percent Control_bracketright
+keycode 7 = six asciicircum six asciicircum Control_asciicircum
+keycode 8 = seven ampersand seven ampersand Control_underscore
+keycode 9 = eight asterisk eight asterisk Delete
+keycode 10 = nine parenleft nine parenleft
+keycode 11 = zero parenright zero parenright
+keycode 12 = minus underscore minus underscore Control_underscore Control_underscore
+keycode 13 = equal plus equal plus
+keycode 14 = Delete Delete Delete Delete BackSpace
+keycode 15 = Tab
+keycode 16 = +q +Q U+0459 U+0409 Control_q Control_q Control_q Control_q
+keycode 17 = +w +W U+045a U+040a Control_w Control_w Control_w Control_w
+keycode 18 = +e +E U+0435 U+0415 Control_e Control_e Control_e Control_e
+keycode 19 = +r +R U+0440 U+0420 Control_r Control_r Control_r Control_r
+keycode 20 = +t +T U+0442 U+0422 Control_t Control_t Control_t Control_t
+keycode 21 = +y +Y U+0455 U+0405 Control_y Control_y Control_y Control_y
+keycode 22 = +u +U U+0443 U+0423 Control_u Control_u Control_u Control_u
+keycode 23 = +i +I U+0438 U+0418 Tab Tab Tab Tab
+keycode 24 = +o +O U+043e U+041e Control_o Control_o Control_o Control_o
+keycode 25 = +p +P U+043f U+041f Control_p Control_p Control_p Control_p
+keycode 26 = bracketleft braceleft U+0448 U+0428 Escape
+keycode 27 = bracketright braceright U+0453 U+0403 Control_bracketright
+keycode 28 = Return
+alt keycode 28 = Meta_Control_m
+keycode 29 = Control
+keycode 30 = +a +A U+0430 U+0410 Control_a Control_a Control_a Control_a
+keycode 31 = +s +S U+0441 U+0421 Control_s Control_s Control_s Control_s
+keycode 32 = +d +D U+0434 U+0414 Control_d Control_d Control_d Control_d
+keycode 33 = +f +F U+0444 U+0424 Control_f Control_f Control_f Control_f
+keycode 34 = +g +G U+0433 U+0413 Control_g Control_g Control_g Control_g
+keycode 35 = +h +H U+0445 U+0425 BackSpace BackSpace BackSpace BackSpace
+keycode 36 = +j +J U+0458 U+0408 Linefeed Linefeed Linefeed Linefeed
+keycode 37 = +k +K U+043a U+041a Control_k Control_k Control_k Control_k
+keycode 38 = +l +L U+043b U+041b Control_l Control_l Control_l Control_l
+keycode 39 = semicolon colon U+0447 U+0427
+keycode 40 = apostrophe quotedbl U+045c U+040c Control_g
+keycode 41 = grave asciitilde apostrophe quotedbl nul
+
+keycode 42 = Shift
+alt keycode 42 = AltGr_Lock
+altgr alt keycode 42 = AltGr_Lock
+
+keycode 43 = backslash bar U+0436 U+0416 Control_backslash
+keycode 44 = +z +Z U+0437 U+0417 Control_z Control_z Control_z Control_z
+keycode 45 = +x +X U+045f U+040f Control_x Control_x Control_x Control_x
+keycode 46 = +c +C U+0446 U+0426 Control_c Control_c Control_c Control_c
+keycode 47 = +v +V U+0432 U+0412 Control_v Control_v Control_v Control_v
+keycode 48 = +b +B U+0431 U+0411 Control_b Control_b Control_b Control_b
+keycode 49 = +n +N U+043d U+041d Control_n Control_n Control_n Control_n
+keycode 50 = +m +M U+043c U+041c Control_m Control_m Control_m Control_m
+keycode 51 = comma less comma semicolon
+keycode 52 = period greater period colon
+keycode 53 = slash question slash question Delete Delete
+keycode 54 = Shift
+keycode 55 = KP_Multiply
+keycode 56 = Alt
+keycode 57 = space
+control keycode 57 = nul
+keycode 58 = Caps_Lock
+
+keycode 86 = less greater bar
+
+altgr control alt keycode 111 = Boot
diff --git a/data/keymaps/i386/qwerty/ro_win.map b/data/keymaps/i386/qwerty/ro_win.map
new file mode 100644
index 0000000..f60d187
--- /dev/null
+++ b/data/keymaps/i386/qwerty/ro_win.map
@@ -0,0 +1,88 @@
+# ro_win.map - A new romanian keymap [i386-qwerty]
+# From bela@home.ro
+# From ro.map - Tue Mar 21 10:32:56 2000
+
+charset "iso-8859-2"
+keymaps 0-6,8-10,12
+alt_is_meta
+include "qwerty-layout"
+include "linux-with-alt-and-altgr"
+strings as usual
+
+keycode 1 = Escape
+keycode 2 = one exclam one exclam
+keycode 3 = two at at at nul nul
+keycode 4 = three numbersign
+ control keycode 4 = Escape
+keycode 5 = four dollar dollar dollar Control_backslash
+keycode 6 = five percent
+ control keycode 6 = Control_bracketright
+keycode 7 = six asciicircum
+ control keycode 7 = Control_asciicircum
+keycode 8 = seven ampersand braceleft braceleft Control_underscore
+keycode 9 = eight asterisk bracketleft bracketleft Delete
+keycode 10 = nine parenleft bracketright parenleft
+keycode 11 = zero parenright braceright parenright
+keycode 12 = minus underscore backslash backslash Control_underscore Control_underscore
+keycode 13 = equal plus
+keycode 14 = Delete Delete Delete
+keycode 15 = Tab Tab Tab
+keycode 26 = bracketleft braceleft
+ control keycode 26 = Escape
+keycode 27 = bracketright braceright asciitilde asciitilde Control_bracketright
+keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+keycode 29 = Control
+keycode 39 = semicolon colon
+keycode 40 = apostrophe quotedbl
+ control keycode 40 = Control_g
+keycode 41 = grave asciitilde
+ control keycode 41 = nul
+keycode 42 = Shift
+ alt keycode 42 = AltGr_Lock
+ altgr alt keycode 42 = AltGr_Lock # warning
+keycode 43 = backslash bar
+ control keycode 43 = Control_backslash
+keycode 51 = comma less comma
+keycode 52 = period greater period
+keycode 53 = slash question slash question
+ control keycode 53 = Delete
+keycode 54 = Shift
+keycode 56 = Alt
+keycode 57 = space space space
+ control keycode 57 = nul
+keycode 58 = Caps_Lock
+keycode 86 = less greater bar
+keycode 97 = Control
+
+shift alt keycode 100 = AltGr_Lock # altgr = 100
+
+#keycode 102 = Control_a # Home
+#keycode 107 = Control_e # End
+
+#keycode 126 = Decr_Console # Buton windows
+#keycode 127 = Incr_Console # Buton windows
+
+#
+# Caracterele româneºti sunt mapate astfel:
+# AltGr + [(26) = ã
+# AltGr + ](27) = î
+# AltGr + ;(39) = º
+# AltGr + '(40) = þ
+# AltGr + \(43) = â
+# alt-left + shift-left = AltGr_Lock
+
+altgr keycode 40 = +0xFE
+shift altgr keycode 40 = +0xDE
+
+altgr keycode 27 = +0xEE
+shift altgr keycode 27 = +0xCE
+
+altgr keycode 26 = +0xE3
+shift altgr keycode 26 = +0xC3
+
+altgr keycode 39 = +0xBA
+shift altgr keycode 39 = +0xAA
+
+altgr keycode 43 = +0xE2
+shift altgr keycode 43 = +0xC2
diff --git a/data/keymaps/i386/qwerty/us.map b/data/keymaps/i386/qwerty/us.map
index 967b72f..72e5cce 100644
--- a/data/keymaps/i386/qwerty/us.map
+++ b/data/keymaps/i386/qwerty/us.map
@@ -3,6 +3,8 @@
alt_is_meta
include "qwerty-layout"
include "linux-with-alt-and-altgr"
+include "compose.latin1"
+include "euro1.map"
strings as usual
keycode 1 = Escape
diff --git a/data/keymaps/i386/qwertz/de-latin1.map b/data/keymaps/i386/qwertz/de-latin1.map
index b9a3a67..8f401e9 100644
--- a/data/keymaps/i386/qwertz/de-latin1.map
+++ b/data/keymaps/i386/qwertz/de-latin1.map
@@ -1,15 +1,18 @@
# de-latin1.map: German keymap
# (Renamed from gr-latin1.map, since it is not a Greek map.)
# Some changes due to Olaf Flebbe (flebbe@pluto.tat.physik.uni-tuebingen.de)
-# More changes by Jochen Hein <jochen.hein@delphi.central.de>.
+# More changes by Jochen Hein <jochen@jochen.org>.
keymaps 0-2,4-6,8-10,12
alt_is_meta
include "qwertz-layout"
altgr keycode 16 = at
+control altgr keycode 16 = nul
altgr keycode 50 = mu
include "linux-with-alt-and-altgr"
plain keycode 83 = KP_Comma
+include "euro2.map"
+include "compose.latin1"
strings as usual
# Normal Shift AltGr Strg
diff --git a/data/keymaps/i386/qwertz/de.map b/data/keymaps/i386/qwertz/de.map
index 524fe06..52ecd5b 100644
--- a/data/keymaps/i386/qwertz/de.map
+++ b/data/keymaps/i386/qwertz/de.map
@@ -1,15 +1,18 @@
# de.map: German keymap
# (Renamed from gr.map, since it is not a Greek map.)
# Some changes due to Olaf Flebbe (flebbe@pluto.tat.physik.uni-tuebingen.de)
-# More changes by Jochen Hein <jochen.hein@delphi.central.de>.
+# More changes by Jochen Hein <jochen@jochen.org>.
keymaps 0-2,4-6,8-10,12
alt_is_meta
include "qwertz-layout"
altgr keycode 16 = at
+control altgr keycode 16 = nul
altgr keycode 50 = mu
include "linux-with-alt-and-altgr"
plain keycode 83 = KP_Comma
+include "compose.latin1"
+include "euro2.map"
strings as usual
# Normal Shift AltGr Strg
diff --git a/data/keymaps/i386/qwertz/de_CH-latin1.map b/data/keymaps/i386/qwertz/de_CH-latin1.map
new file mode 100644
index 0000000..8b012bc
--- /dev/null
+++ b/data/keymaps/i386/qwertz/de_CH-latin1.map
@@ -0,0 +1,16 @@
+# de_CH-latin1.map: Swiss German keymap
+# Due to Björn Jacke <bjacke@suse.de>
+
+include "fr_CH-latin1.map"
+
+keycode 26 = udiaeresis egrave bracketleft
+ control keycode 26 = Escape
+ alt keycode 26 = Meta_bracketleft
+keycode 39 = odiaeresis eacute
+ alt keycode 39 = Meta_semicolon
+keycode 40 = adiaeresis agrave braceleft
+ control keycode 40 = Control_g
+ alt keycode 40 = Meta_apostrophe
+
+# corresponding keys in Swiss French have German umlauts and
+# French accented characters exchanged
diff --git a/data/keymaps/include/compose.latin b/data/keymaps/include/compose.latin
index 9ea95aa..8af36f3 100644
--- a/data/keymaps/include/compose.latin
+++ b/data/keymaps/include/compose.latin
@@ -253,3 +253,8 @@
compose '~' 'o' to 'õ'
#compose '~' 'u' to 'û'
compose '~' 'u' to 'ý'
+#
+compose '|' 's' to '$'
+compose '|' 'S' to '$'
+compose 'S' 'S' to '§'
+#
diff --git a/data/keymaps/include/compose.latin1 b/data/keymaps/include/compose.latin1
index e58733b..b74a98d 100644
--- a/data/keymaps/include/compose.latin1
+++ b/data/keymaps/include/compose.latin1
@@ -101,6 +101,8 @@
compose '/' 'c' to '¢'
compose '-' 'c' to '¢'
compose '-' 'C' to '¢'
+compose '|' 'c' to '¢'
+compose '|' 'C' to '¢'
compose 'L' '=' to '£'
compose '-' 'L' to '£'
compose '-' 'l' to '£'
@@ -115,11 +117,15 @@
compose ':' '-' to '÷'
# ¤
compose 'Y' '=' to '¥'
+compose '=' 'Y' to '¥'
compose '-' 'Y' to '¥'
compose '-' 'l' to '¥'
# ¦§¨
compose '(' 'c' to '©'
compose '"' 'c' to '©'
+compose 'O' 'C' to '©'
+compose '(' 'C' to '©'
+compose 'C' ')' to '©'
compose '-' 'a' to 'ª'
compose '-' 'A' to 'ª'
compose '-' 'o' to 'º'
@@ -127,8 +133,12 @@
# ¬
compose '(' 'r' to '®'
compose '"' 'r' to '®'
+compose 'O' 'R' to '®'
+compose '(' 'R' to '®'
+compose 'R' ')' to '®'
# ¯°´
compose 'm' 'u' to 'µ'
+compose 'P' 'P' to '¶'
# ¶·
# conflict whith iso-8859-15
#compose ',' ',' to '¸'
@@ -141,6 +151,7 @@
compose 'e' '=' to '¤'
compose '-' 'e' to '¤'
compose '-' 'E' to '¤'
+compose '=' 'E' to '¤'
# S< s< Z< z<
compose 'v' 'S' to '¦'
compose '^' 'S' to '¦'
diff --git a/data/keymaps/mac/all/mac-be.map b/data/keymaps/mac/all/mac-be.map
new file mode 100644
index 0000000..65df5f1
--- /dev/null
+++ b/data/keymaps/mac/all/mac-be.map
@@ -0,0 +1,36 @@
+# mac-be.map olh@suse.de
+
+alt_is_meta
+include "mac-azerty-layout"
+include "mac-linux-keys-bare.inc"
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+# Normal Shift AltGr Strg
+keycode 18 = ampersand one
+keycode 19 = eacute two
+keycode 20 = quotedbl three
+keycode 21 = apostrophe four
+keycode 23 = parenleft five
+keycode 22 = section six paragraph
+keycode 26 = egrave seven
+keycode 28 = exclam eight
+keycode 25 = ccedilla nine
+keycode 29 = agrave zero
+keycode 27 = parenright degree
+keycode 24 = minus underscore
+keycode 33 = asciicircum diaeresis
+keycode 30 = dollar asterisk
+keycode 39 = ugrave percent
+keycode 50 = at numbersign
+
+keycode 42 = grave pound
+keycode 43 = semicolon period
+keycode 46 = comma question
+keycode 47 = colon slash
+keycode 44 = equal plus
+keycode 49 = space space
+keycode 10 = less greater
+
+keycode 45 = n N asciitilde
diff --git a/data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map b/data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map
new file mode 100644
index 0000000..0eb6439
--- /dev/null
+++ b/data/keymaps/mac/all/mac-de-latin1-nodeadkeys.map
@@ -0,0 +1,15 @@
+# mac-de-latin1-nodeadkeys.map: German keymap
+# Due to Olaf Flebbe (flebbe@pluto.tat.physik.uni-tuebingen.de)
+# Mac version from olh@suse.de
+
+include "mac-de-latin1.map"
+
+keycode 24 = apostrophe grave
+keycode 30 = plus asterisk asciitilde
+keycode 50 = asciicircum degree
+ alt keycode 45 = asciitilde
+
+# corresponding keys in mac-de-latin1.map:
+# keycode 24 = dead_acute dead_grave
+# keycode 30 = plus asterisk dead_tilde
+# keycode 50 = dead_circumflex degree
diff --git a/data/keymaps/mac/all/mac-de-latin1.map b/data/keymaps/mac/all/mac-de-latin1.map
new file mode 100644
index 0000000..50a45d6
--- /dev/null
+++ b/data/keymaps/mac/all/mac-de-latin1.map
@@ -0,0 +1,57 @@
+# mac-de-latin1.map: German keymap
+# (Renamed from gr-latin1.map, since it is not a Greek map.)
+# Some changes due to Olaf Flebbe (flebbe@pluto.tat.physik.uni-tuebingen.de)
+# More changes by Jochen Hein <jochen.hein@delphi.central.de>.
+
+
+alt_is_meta
+include "mac-qwerty-layout"
+ altgr keycode 12 = at
+ altgr keycode 46 = mu
+#include "linux-with-alt-and-altgr"
+include "mac-linux-keys-bare.inc"
+ plain keycode 65 = KP_Comma
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+# Normal Shift AltGr Strg
+# Normal Shift AltGr Shift+AltGr Ctrl Shift+Ctrl AltGr+Ctrl Shift+AltGr+Ctrl Alt Shift+Alt AltGr+Alt Shift+AltGr+Alt
+keycode 26 = seven slash braceleft a b c d e f g h i j k
+keycode 18 = one exclam
+ shift altgr keycode 18 = at
+keycode 19 = two quotedbl twosuperior nul
+keycode 20 = three section threesuperior Escape
+keycode 21 = four dollar
+keycode 23 = five percent
+keycode 22 = six ampersand
+keycode 28 = eight parenleft bracketleft
+keycode 25 = nine parenright bracketright
+ control altgr keycode 25 = Control_bracketright
+keycode 29 = zero equal braceright
+keycode 27 = ssharp question backslash
+ control altgr keycode 27 = Control_backslash
+keycode 24 = dead_acute dead_grave
+ alt keycode 24 = Meta_acute
+ shift alt keycode 24 = Meta_grave
+keycode 33 = +udiaeresis +Udiaeresis
+keycode 30 = plus asterisk dead_tilde
+keycode 41 = +odiaeresis +Odiaeresis
+keycode 39 = +adiaeresis +Adiaeresis
+keycode 10 = dead_circumflex degree Meta_asciicircum Control_asciicircum
+keycode 42 = numbersign apostrophe
+keycode 43 = comma semicolon
+keycode 47 = period colon
+keycode 44 = minus underscore Meta_minus
+ shift control keycode 44 = Control_underscore
+keycode 49 = space space Meta_space nul
+keycode 10 = less greater bar
+
+keycode 16 = z
+keycode 6 = y
+
+ alt keycode 12 = at
+ alt keycode 50 = bar
+# altgr keycode 26 = bar
+ alt keycode 30 = dead_tilde
+ alt keycode 45 = dead_tilde
diff --git a/data/keymaps/mac/all/mac-de_CH.map b/data/keymaps/mac/all/mac-de_CH.map
new file mode 100644
index 0000000..2b4c1af
--- /dev/null
+++ b/data/keymaps/mac/all/mac-de_CH.map
@@ -0,0 +1,45 @@
+! Swiss-German keymap for PowerBook G3 (Bronze Series)
+! augmented by keys on macally ikey keyboard
+
+! Shift 1
+! AltGr 2 command key
+! Ctrl 4
+! Alt 8 option key
+! ShiftL 16 not used
+! ShiftR 32 not used
+! CtrlL 64 not used
+! CtrlR 128 not used
+
+! plain,shift,command,control,alt,ctrl-alt
+# from http://www.claudio.ch/Etc/pb-sg.kmap
+# modified by olh@suse.de
+
+alt_is_meta
+include "mac-qwerty-layout"
+include "mac-linux-keys-bare.inc"
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+
+keycode 50 = section degree asciitilde nul Meta_asciitilde
+keycode 18 = one plus
+keycode 19 = two quotedbl at
+keycode 20 = three asterisk numbersign
+keycode 21 = four ccedilla backslash Control_backslash Meta_backslash Meta_Control_backslash
+keycode 22 = six ampersand bracketright Control_bracketright Meta_bracketright Meta_Control_bracketright
+keycode 23 = five percent bracketleft Escape bracketleft Meta_Escape
+keycode 24 = asciicircum grave Control_asciicircum Meta_asciicircum Meta_Control_asciicircum
+keycode 25 = nine parenright braceright Control_bracketright Meta_braceright Meta_Control_bracketright
+keycode 26 = seven slash bar Control_backslash Meta_bar Meta_Control_backslash
+keycode 27 = apostrophe question
+keycode 28 = eight parenleft braceleft Escape Meta_braceleft Meta_Escape
+keycode 29 = zero equal nul nul Meta_equal Meta_nul
+keycode 30 = dead_diaeresis exclam
+keycode 39 = adiaeresis agrave
+keycode 41 = odiaeresis eacute
+keycode 42 = dollar sterling
+keycode 43 = comma semicolon
+keycode 44 = minus underscore backslash Control_underscore Meta_minus Meta_Control_underscore
+keycode 47 = period colon
+keycode 10 = less greater
diff --git a/data/keymaps/mac/all/mac-dk-latin1.map b/data/keymaps/mac/all/mac-dk-latin1.map
new file mode 100644
index 0000000..75b2bc6
--- /dev/null
+++ b/data/keymaps/mac/all/mac-dk-latin1.map
@@ -0,0 +1,46 @@
+# mac-dk-latin1.map olh@suse.de
+
+alt_is_meta
+include "mac-qwerty-layout"
+ altgr keycode 12 = at
+ altgr keycode 46 = mu
+#include "linux-with-alt-and-altgr"
+include "mac-linux-keys-bare.inc"
+ plain keycode 65 = KP_Comma
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+keycode 50 = dollar section
+keycode 18 = one exclam
+keycode 19 = two quotedbl
+keycode 20 = three numbersign
+keycode 21 = four currency
+keycode 23 = five percent
+keycode 22 = six ampersand
+keycode 26 = seven slash nul backslash
+keycode 28 = eight parenleft bracketleft
+keycode 25 = nine parenright bracketright
+keycode 29 = zero equal
+keycode 27 = plus question
+keycode 24 = acute grave
+keycode 33 = aring Aring
+keycode 30 = diaeresis circumflex asciitilde
+keycode 41 = ae AE adiaeresis Adiaeresis
+keycode 39 = oslash Oslash odiaeresis Odiaeresis
+keycode 42 = numbersign apostrophe
+keycode 43 = comma semicolon
+keycode 47 = period colon
+keycode 44 = minus underscore Meta_minus
+ shift control keycode 44 = Control_underscore
+keycode 49 = space space Meta_space nul
+keycode 10 = less greater bar
+
+keycode 16 = z
+keycode 6 = y
+
+ alt keycode 12 = at
+ alt keycode 50 = bar
+# altgr keycode 26 = bar
+ alt keycode 30 = dead_tilde
+ alt keycode 45 = dead_tilde
diff --git a/data/keymaps/mac/all/mac-es.map b/data/keymaps/mac/all/mac-es.map
new file mode 100644
index 0000000..661b112
--- /dev/null
+++ b/data/keymaps/mac/all/mac-es.map
@@ -0,0 +1,33 @@
+# mac-es.map olh@suse.de
+
+include "mac-qwerty-layout.inc"
+include "mac-linux-keys-bare.inc"
+strings as usual
+compose as usual for "iso-8859-1"
+
+
+
+keycode 50 = bracketleft bracketright braceleft braceright
+keycode 18 = one exclamdown
+keycode 19 = two exclam
+keycode 20 = three numbersign sterling
+keycode 21 = four dollar dollar Control_backslash
+keycode 23 = five percent
+keycode 22 = six slash
+keycode 26 = seven ampersand bar
+keycode 28 = eight asterisk degree
+keycode 25 = nine parenleft sterling
+keycode 29 = zero parenright
+keycode 27 = minus underscore
+keycode 24 = equal plus
+
+keycode 30 = apostrophe degree
+keycode 33 = grave diaeresis bar
+keycode 41 = ntilde Ntilde asciitilde
+keycode 39 = semicolon colon
+keycode 42 = apostrophe quotedbl
+keycode 10 = less greater bracketleft braceleft
+keycode 43 = comma questiondown
+keycode 47 = period question
+keycode 44 = ccedilla Ccedilla
+keycode 65 = KP_Comma
diff --git a/data/keymaps/mac/all/mac-fi-latin1.map b/data/keymaps/mac/all/mac-fi-latin1.map
new file mode 100644
index 0000000..01d9462
--- /dev/null
+++ b/data/keymaps/mac/all/mac-fi-latin1.map
@@ -0,0 +1,68 @@
+# mac-fi-latin1.kmap
+# converted from mac-us-ext by bronx 070600
+# tested on MacAlly ext USB kbd
+# euro sign on number 4, keycode 21
+#
+# keycode 0 is the 'a', for some reason keycode 90 is
+# also defined as an 'a', I'm not sure why.
+#
+alt_is_meta
+include "mac-qwerty-layout"
+include "mac-linux-keys-bare.inc"
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+keycode 18 = one exclam
+ alt keycode 18 = Meta_one
+keycode 19 = two quotedbl quotedbl nul nul
+ alt keycode 19 = Meta_two
+keycode 20 = three numbersign
+ control keycode 20 = Escape
+ alt keycode 20 = Meta_three
+keycode 21 = four dollar currency Control_backslash
+ alt keycode 21 = Meta_four
+keycode 22 = six ampersand
+ control keycode 22 = Control_asciicircum
+ alt keycode 22 = Meta_six
+keycode 23 = five percent
+ control keycode 23 = Control_bracketright
+ alt keycode 23 = Meta_five
+keycode 24 = acute grave
+ alt keycode 24 = Meta_equal
+keycode 25 = nine parenright bracketright braceright
+ alt keycode 25 = braceright
+keycode 26 = seven slash bar
+ alt keycode 26 = backslash
+keycode 27 = plus question backslash Control_underscore Control_underscore Meta_minus
+keycode 28 = eight parenleft bracketleft
+ alt keycode 28 = braceleft
+keycode 29 = zero equal braceright
+ alt keycode 29 = Meta_zero
+keycode 30 = diaeresis asciicircum asciitilde Control_bracketright
+ alt keycode 30 = Meta_bracketright
+keycode 33 = aring Aring
+ control keycode 33 = Escape
+ alt keycode 33 = Meta_bracketleft
+keycode 39 = adiaeresis Adiaeresis
+ control keycode 39 = Control_g
+ alt keycode 39 = Meta_apostrophe
+keycode 41 = odiaeresis Odiaeresis
+ alt keycode 41 = Meta_semicolon
+keycode 42 = apostrophe asterisk at
+ control keycode 42 = Control_backslash
+ alt keycode 42 = Meta_backslash
+keycode 43 = comma semicolon
+ alt keycode 43 = Meta_comma
+keycode 44 = minus underscore
+ control keycode 44 = Delete
+ alt keycode 44 = Meta_minus
+keycode 47 = period colon
+ control keycode 47 = Compose
+ alt keycode 47 = Meta_period
+keycode 10 = less greater
+ control keycode 10 = nul
+ alt keycode 10 = Meta_grave
+keycode 51 = Delete Remove
+ alt keycode 51 = Meta_Delete
+keycode 65 = KP_Period
diff --git a/data/keymaps/mac/all/mac-fr.map b/data/keymaps/mac/all/mac-fr.map
new file mode 100644
index 0000000..c493d7e
--- /dev/null
+++ b/data/keymaps/mac/all/mac-fr.map
@@ -0,0 +1,123 @@
+# marc.shapiro@inria.fr 4-october-1998
+# French Macintosh keyboard
+# attempt to align to the standard Mac meaning of keys.
+# mostly intuitive!
+# option=AltGr; Apple/Command=Alt (==> meta)
+
+# TODO: CONTROL AND META COMBINATIONS
+
+charset "iso-8859-1"
+include "mac-azerty-layout.inc"
+include "mac-linux-keys-bare.inc"
+compose as usual for "iso-8859-1"
+strings as usual
+
+# 1st row
+keycode 50 = at numbersign
+ alt keycode 50 = Meta_at
+ control keycode 50 = nul
+ shift alt keycode 50 = Meta_numbersign
+
+keycode 18 = ampersand one
+ alt keycode 18 = Meta_ampersand
+ shift alt keycode 18 = Meta_one
+
+keycode 19 = eacute two
+ shift alt keycode 19 = Meta_two
+
+keycode 20 = quotedbl three
+ alt keycode 20 = Meta_quotedbl
+ shift alt keycode 20 = Meta_three
+
+keycode 21 = apostrophe four
+ alt keycode 21 = Meta_apostrophe
+ shift alt keycode 21 = Meta_four
+
+keycode 23 = parenleft five braceleft bracketleft
+ alt keycode 23 = Meta_parenleft
+ shift alt keycode 23 = Meta_five
+
+# **** insert meta, control
+keycode 22 = section six
+ shift alt keycode 22 = Meta_six
+
+keycode 26 = egrave seven guillemotleft guillemotright
+ shift alt keycode 26 = Meta_seven
+
+keycode 28 = exclam eight
+ alt keycode 28 = Meta_exclam
+ shift alt keycode 28 = Meta_eight
+
+keycode 25 = ccedilla nine
+ shift alt keycode 25 = Meta_nine
+
+keycode 29 = agrave zero
+ shift alt keycode 29 = Meta_zero
+
+keycode 27 = parenright degree braceright bracketright
+ alt keycode 27 = Meta_parenright
+
+keycode 24 = minus underscore
+ alt keycode 24 = Meta_minus
+ shift alt keycode 24 = Meta_underscore
+ shift control keycode 24 = Control_underscore
+
+# 2nd row
+
+
+keycode 33 = dead_circumflex dead_diaeresis
+ control keycode 33 = Control_asciicircum
+
+keycode 30 = dollar asterisk VoidSymbol yen
+ alt keycode 30 = Meta_dollar
+ shift alt keycode 30 = Meta_dollar
+
+
+# 3d row
+
+ altgr keycode 37 = notsign
+ shift altgr keycode 37 = bar
+# alt altgr keycode 37 = Meta_notsign # Doesn't work???
+ shift alt altgr keycode 37 = Meta_bar
+
+
+keycode 39 = ugrave percent
+ shift alt keycode 39 = Meta_percent
+
+keycode 42 = dead_grave sterling at numbersign
+ alt keycode 42 = Meta_grave
+# shift alt keycode 42 = Meta_sterling # doesn't work ?
+ altgr keycode 42 = Meta_at
+ shift altgr keycode 42 = Meta_numbersign
+
+# 4th row
+
+keycode 10 = less greater
+ alt keycode 10 = Meta_less
+ shift alt keycode 10 = Meta_greater
+
+
+keycode 45 = +n N dead_tilde
+ control keycode 45 = Control_n
+ shift control keycode 45 = Control_n
+ alt keycode 45 = Meta_n
+ shift alt keycode 45 = Meta_n
+
+keycode 46 = comma question
+ alt keycode 46 = Meta_comma
+ shift alt keycode 46 = Meta_question
+ shift control keycode 46 = Delete
+
+keycode 43 = semicolon period
+ alt keycode 43 = Meta_semicolon
+ shift alt keycode 43 = Meta_period
+
+keycode 47 = colon slash division backslash
+ alt keycode 47 = Meta_colon
+ shift alt keycode 47 = Meta_slash
+ shift altgr control keycode 47 = Control_backslash
+
+keycode 44 = equal plus
+ alt keycode 44 = Meta_equal
+ shift alt keycode 44 = Meta_plus
+
diff --git a/data/keymaps/mac/all/mac-fr_CH-latin1.map b/data/keymaps/mac/all/mac-fr_CH-latin1.map
new file mode 100644
index 0000000..cccc6c8
--- /dev/null
+++ b/data/keymaps/mac/all/mac-fr_CH-latin1.map
@@ -0,0 +1,48 @@
+! Swiss-french keymap for PowerBook G3 (Bronze Series)
+! augmented by keys on macally ikey keyboard
+
+! Shift 1
+! AltGr 2 command key
+! Ctrl 4
+! Alt 8 option key
+! ShiftL 16 not used
+! ShiftR 32 not used
+! CtrlL 64 not used
+! CtrlR 128 not used
+
+! plain,shift,command,control,alt,ctrl-alt
+# from http://www.claudio.ch/Etc/pb-sg.kmap
+# modified by olh@suse.de from mac-de_CH
+
+alt_is_meta
+include "mac-qwerty-layout"
+include "mac-linux-keys-bare.inc"
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+
+keycode 50 = section degree asciitilde nul Meta_asciitilde
+keycode 18 = one plus
+keycode 19 = two quotedbl at
+keycode 20 = three asterisk numbersign
+keycode 21 = four ccedilla backslash Control_backslash Meta_backslash Meta_Control_backslash
+keycode 22 = six ampersand bracketright Control_bracketright Meta_bracketright Meta_Control_bracketright
+keycode 23 = five percent bracketleft Escape bracketleft Meta_Escape
+keycode 24 = asciicircum grave Control_asciicircum Meta_asciicircum Meta_Control_asciicircum
+keycode 25 = nine parenright braceright Control_bracketright Meta_braceright Meta_Control_bracketright
+keycode 26 = seven slash bar Control_backslash Meta_bar Meta_Control_backslash
+keycode 27 = apostrophe question
+keycode 28 = eight parenleft braceleft Escape Meta_braceleft Meta_Escape
+keycode 29 = zero equal nul nul Meta_equal Meta_nul
+keycode 30 = dead_diaeresis exclam
+keycode 39 = agrave adiaeresis
+keycode 41 = eacute odiaeresis
+keycode 42 = dollar sterling
+keycode 43 = comma semicolon
+keycode 44 = minus underscore backslash Control_underscore Meta_minus Meta_Control_underscore
+keycode 47 = period colon
+keycode 10 = less greater
+keycode 33 = egrave +udiaeresis
+keycode 16 = z
+keycode 6 = y
diff --git a/data/keymaps/mac/all/mac-it.map b/data/keymaps/mac/all/mac-it.map
new file mode 100644
index 0000000..ebf447e
--- /dev/null
+++ b/data/keymaps/mac/all/mac-it.map
@@ -0,0 +1,48 @@
+# Apple Keyboard Italiana
+# Cristiano Bertossi bertossi@polimedia.it
+# it-cris.map
+# 18 August 1998
+# modified by olh@suse.de
+
+alt_is_meta
+include "mac-azerty-layout"
+include "mac-linux-keys-bare.inc"
+include "mac-euro.map"
+compose as usual for "iso-8859-1"
+strings as usual
+
+
+# Prima riga
+keycode 50 = at numbersign
+keycode 18 = ampersand one guillemotleft
+keycode 19 = quotedbl two
+keycode 20 = apostrophe three grave
+keycode 21 = parenleft four braceleft bracketleft
+keycode 23 = ccedilla five Ccedilla
+keycode 22 = egrave six
+keycode 26 = parenright seven braceright bracketright
+keycode 28 = sterling eight
+keycode 25 = agrave nine
+keycode 29 = eacute zero
+keycode 27 = minus underscore
+keycode 24 = equal plus
+keycode 51 = Delete Remove
+
+# Seconda riga
+keycode 33 = igrave asciicircum
+keycode 30 = dollar asterisk
+
+# Terza riga
+keycode 39 = ugrave percent
+keycode 42 = section degree at
+
+# Quarta riga
+keycode 10 = less greater
+keycode 8 = c C copyright
+keycode 45 = n
+ altgr keycode 45 = asciitilde
+keycode 46 = comma question questiondown
+keycode 43 = semicolon period
+keycode 47 = colon slash bar backslash
+keycode 44 = ograve exclam
+
diff --git a/data/keymaps/mac/all/mac-pt-latin1.map b/data/keymaps/mac/all/mac-pt-latin1.map
new file mode 100644
index 0000000..dd33e1f
--- /dev/null
+++ b/data/keymaps/mac/all/mac-pt-latin1.map
@@ -0,0 +1,29 @@
+# mac-pt-latin1.map Ricardo Cabral <bfe00991@mail.telepac.pt>
+
+include "mac-qwerty-layout.inc"
+include "mac-linux-keys-bare.inc"
+include "mac-de-latin1.map"
+
+keycode 16 = y
+keycode 6 = z
+keycode 10 = less greater
+keycode 18 = one exclam
+keycode 19 = two quotedbl at
+keycode 20 = three numbersign sterling
+keycode 21 = four dollar section
+keycode 23 = five percent
+keycode 22 = six ampersand
+keycode 26 = seven slash
+keycode 28 = eight parenleft braceleft
+keycode 25 = nine parenright braceright
+keycode 29 = zero equal
+keycode 27 = apostrophe question
+keycode 24 = plus asterisk
+keycode 30 = dead_acute dead_grave
+keycode 33 = masculine ordfeminine
+keycode 39 = asciitilde asciicircum
+keycode 41 = ccedilla Ccedilla
+keycode 42 = backslash bar
+keycode 43 = comma semicolon
+keycode 44 = minus underscore
+keycode 47 = period colon
diff --git a/data/keymaps/mac/all/mac-se.map b/data/keymaps/mac/all/mac-se.map
new file mode 100644
index 0000000..f29727b
--- /dev/null
+++ b/data/keymaps/mac/all/mac-se.map
@@ -0,0 +1,32 @@
+# mac-se.map olh@suse.de
+
+include "mac-qwerty-layout.inc"
+include "mac-linux-keys-bare.inc"
+strings as usual
+compose as usual for "iso-8859-1"
+
+
+
+keycode 50 = section degree
+keycode 18 = one exclam copyright
+keycode 19 = two quotedbl
+keycode 20 = three numbersign sterling
+keycode 21 = four dollar dollar Control_backslash
+keycode 23 = five percent
+keycode 22 = six ampersand
+keycode 26 = seven slash bar backslash
+keycode 28 = eight parenleft bracketleft
+keycode 25 = nine parenright bracketright
+keycode 29 = zero equal
+keycode 27 = minus question
+keycode 24 = plus grave
+keycode 30 = aring Aring
+keycode 33 = dead_diaeresis asciicircum asciitilde
+keycode 41 = odiaeresis Odiaeresis
+keycode 39 = adiaeresis Adiaeresis ae AE
+keycode 42 = apostrophe asterisk
+keycode 10 = less greater
+keycode 43 = comma semicolon
+keycode 44 = minus underscore
+keycode 47 = period colon
+keycode 65 = KP_Period
diff --git a/data/keymaps/mac/all/mac-template.map b/data/keymaps/mac/all/mac-template.map
new file mode 100644
index 0000000..7693f32
--- /dev/null
+++ b/data/keymaps/mac/all/mac-template.map
@@ -0,0 +1,20 @@
+alt_is_meta
+include "mac-qwerty-layout"
+include "mac-linux-keys-bare.inc"
+#include "mac-euro.map"
+strings as usual
+
+# only here to have a working keymap
+include "mac-us.map"
+
+# some examples
+# Shift+ Shift+
+# Shift+ Shift+ AltGr+ AltGr+ Shift+ AltGr+ AltGr+ Alt+
+# Normal Shift AltGr AltGr Ctrl Ctrl Ctrl Ctrl Alt Alt Alt Alt Ctrl
+keycode 18 = one exclam a b c d e f g h i j k
+
+keycode 16 = z
+keycode 6 = y
+
+ alt keycode 12 = at
+ alt keycode 50 = bar
diff --git a/data/keymaps/mac/all/mac-uk.map b/data/keymaps/mac/all/mac-uk.map
new file mode 100644
index 0000000..a2077c8
--- /dev/null
+++ b/data/keymaps/mac/all/mac-uk.map
@@ -0,0 +1,57 @@
+# mac-uk.map olh@suse.de
+include "mac-qwerty-layout.inc"
+include "mac-linux-keys-bare.inc"
+strings as usual
+compose as usual for "iso-8859-1"
+
+keycode 50 = grave asciitilde
+ control keycode 50 = nul
+ alt keycode 50 = Meta_grave
+keycode 18 = one exclam exclamdown
+ alt keycode 18 = Meta_one
+keycode 19 = two at
+keycode 20 = three sterling numbersign
+ control keycode 20 = Escape
+keycode 21 = four dollar dollar Control_backslash
+ alt keycode 21 = Meta_four
+keycode 22 = six asciicircum section
+ control keycode 22 = Control_asciicircum
+ alt keycode 22 = Meta_six
+keycode 23 = five percent macron
+ control keycode 23 = Control_bracketright
+ alt keycode 23 = Meta_five
+keycode 24 = equal plus
+ alt keycode 24 = Meta_equal
+keycode 25 = nine parenleft bracketright
+ alt keycode 25 = Meta_nine
+keycode 26 = seven ampersand braceleft Control_underscore
+ alt keycode 26 = Meta_seven
+keycode 27 = minus underscore backslash Control_underscore Control_underscore Meta_minus
+keycode 28 = eight asterisk bracketleft Delete
+ alt keycode 28 = Meta_eight
+keycode 29 = zero parenright braceright
+ alt keycode 29 = Meta_zero
+keycode 30 = bracketright braceright asciitilde Control_bracketright
+ alt keycode 30 = Meta_bracketright
+keycode 33 = bracketleft braceleft
+ control keycode 33 = Escape
+ alt keycode 33 = Meta_bracketleft
+keycode 39 = apostrophe quotedbl
+ control keycode 39 = Control_g
+ alt keycode 39 = Meta_apostrophe
+keycode 41 = semicolon colon
+ alt keycode 41 = Meta_semicolon
+keycode 42 = backslash bar
+ control keycode 42 = Control_backslash
+ alt keycode 42 = Meta_backslash
+keycode 43 = comma less
+ alt keycode 43 = Meta_comma
+keycode 44 = slash question
+ control keycode 44 = Delete
+ alt keycode 44 = Meta_slash
+keycode 47 = period greater
+ control keycode 47 = Compose
+ alt keycode 47 = Meta_period
+keycode 65 = KP_Period
+keycode 107 = Scroll_Lock Show_Memory Show_Registers Show_State
+ alt keycode 107 = Scroll_Lock
diff --git a/data/keymaps/mac/all/mac-us.map b/data/keymaps/mac/all/mac-us.map
new file mode 100644
index 0000000..8ca5457
--- /dev/null
+++ b/data/keymaps/mac/all/mac-us.map
@@ -0,0 +1,63 @@
+#keymaps 0-2,4-5,8,9,12
+include "mac-qwerty-layout.inc"
+include "mac-linux-keys-bare.inc"
+strings as usual
+compose as usual for "iso-8859-1"
+#keycode 2 = +d +D Hex_D Control_d Control_d Meta_d Meta_Control_d
+#keycode 3 = +f +F Hex_F Control_f Control_f Meta_f Meta_Control_f
+#keycode 8 = +c +C Hex_C Control_c Control_c Meta_c Meta_Control_c
+keycode 50 = grave asciitilde
+ control keycode 50 = nul
+ alt keycode 50 = Meta_grave
+#keycode 11 = +b +B Hex_B Control_b Control_b Meta_b Meta_Control_b
+#keycode 14 = +e +E Hex_E Control_e Control_e Meta_e Meta_Control_e
+keycode 18 = one exclam
+ alt keycode 18 = Meta_one
+keycode 19 = two at at nul nul Meta_two
+keycode 20 = three numbersign
+ control keycode 20 = Escape
+ alt keycode 20 = Meta_three
+keycode 21 = four dollar dollar Control_backslash
+ alt keycode 21 = Meta_four
+keycode 22 = six asciicircum
+ control keycode 22 = Control_asciicircum
+ alt keycode 22 = Meta_six
+keycode 23 = five percent
+ control keycode 23 = Control_bracketright
+ alt keycode 23 = Meta_five
+keycode 24 = equal plus
+ alt keycode 24 = Meta_equal
+keycode 25 = nine parenleft bracketright
+ alt keycode 25 = Meta_nine
+keycode 26 = seven ampersand braceleft Control_underscore
+ alt keycode 26 = Meta_seven
+keycode 27 = minus underscore backslash Control_underscore Control_underscore Meta_minus
+keycode 28 = eight asterisk bracketleft Delete
+ alt keycode 28 = Meta_eight
+keycode 29 = zero parenright braceright
+ alt keycode 29 = Meta_zero
+keycode 30 = bracketright braceright asciitilde Control_bracketright
+ alt keycode 30 = Meta_bracketright
+keycode 33 = bracketleft braceleft
+ control keycode 33 = Escape
+ alt keycode 33 = Meta_bracketleft
+keycode 39 = apostrophe quotedbl
+ control keycode 39 = Control_g
+ alt keycode 39 = Meta_apostrophe
+keycode 41 = semicolon colon
+ alt keycode 41 = Meta_semicolon
+keycode 42 = backslash bar
+ control keycode 42 = Control_backslash
+ alt keycode 42 = Meta_backslash
+keycode 43 = comma less
+ alt keycode 43 = Meta_comma
+keycode 44 = slash question
+ control keycode 44 = Delete
+ alt keycode 44 = Meta_slash
+keycode 47 = period greater
+ control keycode 47 = Compose
+ alt keycode 47 = Meta_period
+keycode 65 = KP_Period
+#keycode 90 = +a +A Hex_A Control_a Control_a Meta_a Meta_Control_a
+keycode 107 = Scroll_Lock Show_Memory Show_Registers Show_State
+ alt keycode 107 = Scroll_Lock
diff --git a/data/keymaps/mac/include/mac-azerty-layout.inc b/data/keymaps/mac/include/mac-azerty-layout.inc
new file mode 100644
index 0000000..c40b516
--- /dev/null
+++ b/data/keymaps/mac/include/mac-azerty-layout.inc
@@ -0,0 +1,30 @@
+# azerty-layout
+keycode 12 = a
+keycode 13 = z
+keycode 14 = e
+keycode 15 = r
+keycode 17 = t
+keycode 16 = y
+keycode 32 = u
+keycode 34 = i
+keycode 31 = o
+keycode 35 = p
+#
+keycode 0 = q
+keycode 1 = s
+keycode 2 = d
+keycode 3 = f
+keycode 5 = g
+keycode 4 = h
+keycode 38 = j
+keycode 40 = k
+keycode 37 = l
+keycode 41 = m
+#
+keycode 6 = w
+keycode 7 = x
+keycode 8 = c
+keycode 9 = v
+keycode 11 = b
+keycode 45 = n
+#
diff --git a/data/keymaps/mac/include/mac-euro.map b/data/keymaps/mac/include/mac-euro.map
new file mode 100644
index 0000000..cced200
--- /dev/null
+++ b/data/keymaps/mac/include/mac-euro.map
@@ -0,0 +1,6 @@
+# Euro and cent
+# [Say: "loadkeys euro" to get Euro and cent with Alt on the positions
+# where many keyboards have E and C.
+# To get it displayed, use a latin0 (i.e., latin9) font.]
+alt keycode 14 = currency
+alt keycode 8 = cent
diff --git a/data/keymaps/mac/include/mac-linux-keys-bare.inc b/data/keymaps/mac/include/mac-linux-keys-bare.inc
new file mode 100644
index 0000000..8a325a6
--- /dev/null
+++ b/data/keymaps/mac/include/mac-linux-keys-bare.inc
@@ -0,0 +1,182 @@
+# Linux-specific (and language-independent) keys
+#
+# This file describes function keys, console switching keys,
+# keypad, cursor keys, and SysRq, ScrollLock, Pause
+#
+# It does not use the AltGr modifier, so that the user can opt
+# to have both Alt keys produce the same effect.
+# As a consequence, the Hex_* keys are missing, as are
+# control altgr keycode 83 = Boot
+# control altgr keycode 111 = Boot
+#
+# One culture-specific item that will be overridden in many keymaps
+# is the KP_Period: many countries have a KP_Comma instead.
+#
+# One user-preference item will be the function of the Delete key.
+#
+# Old keyboards have 10 function keys, and keymaps have
+# sometimes used shift+F1 = F11, and sometimes shift+F1 = F13.
+# Here we assume an enhanced keyboard (with 12 function keys).
+#
+plain keycode 122 = F1
+plain keycode 120 = F2
+plain keycode 99 = F3
+plain keycode 118 = F4
+plain keycode 96 = F5
+plain keycode 97 = F6
+plain keycode 98 = F7
+plain keycode 100 = F8
+plain keycode 101 = F9
+plain keycode 109 = F10
+plain keycode 103 = F11
+plain keycode 111 = F12
+shift keycode 122 = F13
+shift keycode 120 = F14
+shift keycode 99 = F15
+shift keycode 118 = F16
+shift keycode 96 = F17
+shift keycode 97 = F18
+shift keycode 98 = F19
+shift keycode 100 = F20
+shift keycode 101 = F21
+shift keycode 109 = F22
+shift keycode 103 = F23
+shift keycode 111 = F24
+control keycode 122 = F25
+control keycode 120 = F26
+control keycode 99 = F27
+control keycode 118 = F28
+control keycode 96 = F29
+control keycode 97 = F30
+control keycode 98 = F31
+control keycode 100 = F32
+control keycode 101 = F33
+control keycode 109 = F34
+control keycode 103 = F35
+control keycode 111 = F36
+#
+# The canonical assignment for F37-F48 uses
+# control shift keycode 122 = F37
+# etc. If you want that, load linux-keys-extd.inc
+#
+# Both Alt+Fn and Control+Alt+Fn switch to Console n
+# (in order to please Linux / dosemu / X).
+# Here Consoles 1..12. For 13..24 load linux-keys-extd.inc
+#
+alt keycode 122 = Console_1
+alt keycode 120 = Console_2
+alt keycode 99 = Console_3
+alt keycode 118 = Console_4
+alt keycode 96 = Console_5
+alt keycode 97 = Console_6
+alt keycode 98 = Console_7
+alt keycode 100 = Console_8
+alt keycode 101 = Console_9
+alt keycode 109 = Console_10
+alt keycode 103 = Console_11
+alt keycode 111 = Console_12
+control alt keycode 122 = Console_1
+control alt keycode 120 = Console_2
+control alt keycode 99 = Console_3
+control alt keycode 118 = Console_4
+control alt keycode 96 = Console_5
+control alt keycode 97 = Console_6
+control alt keycode 98 = Console_7
+control alt keycode 100 = Console_8
+control alt keycode 101 = Console_9
+control alt keycode 109 = Console_10
+control alt keycode 103 = Console_11
+control alt keycode 111 = Console_12
+
+#
+# Keypad keys
+#
+keycode 71 = Num_Lock
+keycode 75 = KP_Divide
+keycode 67 = KP_Multiply
+keycode 78 = KP_Subtract
+keycode 69 = KP_Add
+keycode 76 = KP_Enter
+keycode 81 = equal
+#
+keycode 89 = KP_7
+keycode 91 = KP_8
+keycode 92 = KP_9
+keycode 86 = KP_4
+keycode 87 = KP_5
+keycode 88 = KP_6
+keycode 83 = KP_1
+keycode 84 = KP_2
+keycode 85 = KP_3
+keycode 82 = KP_0
+#
+keycode 65 = KP_Period # or KP_Comma
+control alt keycode 65 = Boot
+#
+alt keycode 89 = Ascii_7
+alt keycode 91 = Ascii_8
+alt keycode 92 = Ascii_9
+alt keycode 86 = Ascii_4
+alt keycode 87 = Ascii_5
+alt keycode 88 = Ascii_6
+alt keycode 83 = Ascii_1
+alt keycode 84 = Ascii_2
+alt keycode 85 = Ascii_3
+alt keycode 82 = Ascii_0
+#
+# The four cursor keys
+#
+keycode 62 = Up
+keycode 59 = Left
+keycode 60 = Right
+keycode 61 = Down
+alt keycode 62 = KeyboardSignal
+alt keycode 59 = Decr_Console
+alt keycode 60 = Incr_Console
+#
+# The six edit keys
+#
+keycode 114 = Insert
+keycode 115 = Home # Find
+keycode 116 = PageUp # Prior
+keycode 117 = Remove
+keycode 119 = End # Select
+keycode 121 = PageDown # Next
+shift keycode 116 = Scroll_Backward
+shift keycode 121 = Scroll_Forward
+control alt keycode 117 = Boot
+#
+# The three system keys
+#
+# what is that? olh@suse.de
+#keycode 84 = Last_Console # Alt+SysRq/PrintScrn
+#
+# what is that? olh@suse.de
+#keycode 99 = Control_backslash # SysRq/PrintScrn
+
+plain keycode 107 = Scroll_Lock
+shift keycode 107 = Show_Memory
+control keycode 107 = Show_State
+alt keycode 107 = Show_Registers
+
+control keycode 113 = Break # Ctrl+Break/Pause
+keycode 113 = Pause # Break/Pause
+
+# generic keys for all keyboards
+keycode 36 = Return
+ alt keycode 36 = Meta_Control_m
+keycode 48 = Tab
+ alt keycode 48 = Meta_Tab
+keycode 49 = space space space nul
+keycode 51 = Delete Remove
+ alt keycode 51 = Meta_Delete
+ shift alt keycode 51 = Meta_Delete
+ control keycode 51 = Remove
+keycode 53 = Escape
+ alt keycode 53 = Meta_Escape
+ shift alt keycode 53 = Meta_Escape
+keycode 54 = Control
+keycode 55 = Alt # Command/Apple key
+keycode 56 = Shift
+keycode 57 = Caps_Lock
+keycode 58 = AltGr # Alt/Option key
diff --git a/data/keymaps/mac/include/mac-qwerty-layout.inc b/data/keymaps/mac/include/mac-qwerty-layout.inc
new file mode 100644
index 0000000..9748047
--- /dev/null
+++ b/data/keymaps/mac/include/mac-qwerty-layout.inc
@@ -0,0 +1,30 @@
+# qwertz-layout
+keycode 12 = q
+keycode 13 = w
+keycode 14 = e
+keycode 15 = r
+keycode 17 = t
+keycode 6 = z
+keycode 32 = u
+keycode 34 = i
+keycode 31 = o
+keycode 35 = p
+#
+keycode 0 = a
+keycode 1 = s
+keycode 2 = d
+keycode 3 = f
+keycode 5 = g
+keycode 4 = h
+keycode 38 = j
+keycode 40 = k
+keycode 37 = l
+#
+keycode 16 = y
+keycode 7 = x
+keycode 8 = c
+keycode 9 = v
+keycode 11 = b
+keycode 45 = n
+keycode 46 = m
+#
diff --git a/data/keymaps/mac/mac-de-latin1-nodeadkeys.map b/data/keymaps/mac/mac-de-latin1-nodeadkeys.map
deleted file mode 100644
index a524f26..0000000
--- a/data/keymaps/mac/mac-de-latin1-nodeadkeys.map
+++ /dev/null
@@ -1,181 +0,0 @@
-# de-latin1-nodeadkeys-apple.map: German keymap for Apple keyboards
-# Broken in several respects.
-keymaps 0-2,4,6,8,12
-strings as usual
-
-keycode 53 = Escape Escape
- alt keycode 53 = Meta_Escape
-keycode 18 = one exclam
- alt keycode 18 = Meta_one
- shift altgr keycode 18 = at
-keycode 19 = two quotedbl twosuperior
- control keycode 19 = nul
- alt keycode 19 = Meta_two
-keycode 20 = three section threesuperior
- control keycode 20 = Escape
- alt keycode 20 = Meta_three
-keycode 21 = four dollar dollar
- control keycode 21 = Control_backslash
- alt keycode 21 = Meta_four
-keycode 23 = five percent bracketleft
- control keycode 23 = Control_bracketright
- alt keycode 23 = Meta_five
-keycode 22 = six ampersand bracketright
- control keycode 22 = Control_asciicircum
- alt keycode 22 = Meta_six
-keycode 26 = seven slash bar
- control keycode 26 = Control_underscore
- alt keycode 26 = Meta_seven
- shift altgr keycode 26 = backslash
-keycode 28 = eight parenleft braceleft
- control keycode 28 = Delete
- alt keycode 28 = Meta_eight
-keycode 25 = nine parenright braceright
- alt keycode 25 = Meta_nine
- control altgr keycode 25 = Control_bracketright
-keycode 29 = zero equal
- alt keycode 29 = Meta_zero
-keycode 27 = ssharp question nul
- control keycode 27 = Control_underscore
- alt keycode 27 = Meta_minus
- control altgr keycode 27 = Control_backslash
- alt altgr keycode 27 = Meta_backslash
-keycode 24 = apostrophe grave
- alt keycode 24 = Meta_equal
-keycode 51 = Delete Delete
- alt keycode 51 = Meta_Delete
-keycode 48 = Tab Tab
- alt keycode 48 = Meta_Tab
-keycode 12 = +q +Q nul
- control keycode 12 = Control_q
- alt keycode 12 = Meta_q
- altgr alt keycode 12 = Meta_at
-keycode 13 = w
-keycode 14 = e
-keycode 15 = r
-keycode 17 = t
-keycode 16 = z
-keycode 32 = u
-keycode 34 = i
-keycode 31 = o
-keycode 35 = p
-keycode 33 = +udiaeresis +Udiaeresis
- control keycode 33 = Escape
- alt keycode 33 = Meta_bracketleft
-keycode 30 = plus asterisk nul
- control keycode 30 = Control_bracketright
- alt keycode 30 = Meta_bracketright
-keycode 36 = Return
- alt keycode 36 = 0x080d
-keycode 54 = Control
-# broken: 0 cannot be assigned
-keycode 0 = a
-keycode 1 = s
-keycode 2 = d
-keycode 3 = f
-keycode 5 = g
-keycode 4 = h
-keycode 38 = j
-keycode 40 = k
-keycode 37 = l
-keycode 41 = +odiaeresis +Odiaeresis
- alt keycode 41 = Meta_semicolon
-keycode 39 = +adiaeresis +Adiaeresis
- control keycode 39 = Control_g
- alt keycode 39 = Meta_apostrophe
-keycode 10 = asciicircum degree
-keycode 50 = less greater
- control keycode 50 = Control_asciicircum
- alt keycode 50 = Meta_grave
-# control keycode 50 = nul
-keycode 56 = Shift
-keycode 42 = numbersign apostrophe
- control keycode 42 = Control_backslash
- alt keycode 42 = Meta_backslash
-keycode 6 = y
-keycode 7 = x
-keycode 8 = c
-keycode 9 = v
-keycode 11 = b
-keycode 45 = n
- altgr keycode 45 = asciitilde
-keycode 46 = +m
- altgr keycode 46 = mu
-keycode 43 = comma semicolon
- alt keycode 43 = Meta_comma
-keycode 47 = period colon
- alt keycode 47 = Meta_period
-keycode 44 = minus underscore
- control keycode 44 = Delete
- alt keycode 44 = Meta_minus
- shift control keycode 44 = Control_underscore
-# alt keycode 44 = Meta_slash
-keycode 56 = Shift
-keycode 67 = KP_Multiply
-keycode 55 = Alt
-keycode 49 = space space
- control keycode 49 = nul
- alt keycode 49 = Meta_space
-keycode 57 = Caps_Lock
-keycode 99 = F3 F13 Console_15
- control keycode 99 = F3
- alt keycode 99 = Console_3
- control alt keycode 99 = Console_3
-keycode 96 = F5 F15 Console_17
- control keycode 96 = F5
- alt keycode 96 = Console_5
- control alt keycode 96 = Console_5
-keycode 97 = F6 F16 Console_18
- control keycode 97 = F6
- alt keycode 97 = Console_6
- control alt keycode 97 = Console_6
-keycode 98 = F7 F17 Console_19
- control keycode 98 = F7
- alt keycode 98 = Console_7
- control alt keycode 98 = Console_7
-keycode 58 = F8 F18 Console_20
- control keycode 58 = F8
- alt keycode 58 = Console_8
- control alt keycode 58 = Console_8
-keycode 71 = Num_Lock
-keycode 89 = KP_7
- alt keycode 89 = Ascii_7
-keycode 91 = KP_8
- alt keycode 91 = Ascii_8
-keycode 92 = KP_9
- alt keycode 92 = Ascii_9
-keycode 78 = KP_Subtract
-keycode 86 = KP_4
- alt keycode 86 = Ascii_4
-keycode 87 = KP_5
- alt keycode 87 = Ascii_5
-keycode 88 = KP_6
- alt keycode 88 = Ascii_6
-keycode 69 = KP_Add
-keycode 83 = KP_1
- alt keycode 83 = Ascii_1
-keycode 84 = KP_2
- alt keycode 84 = Ascii_2
-keycode 85 = KP_3
- alt keycode 85 = Ascii_3
-keycode 82 = KP_0
- alt keycode 82 = Ascii_0
-keycode 65 = KP_Comma
- altgr control keycode 65 = Boot
- control alt keycode 65 = Boot
-keycode 62 = F11 F11 Console_23
- control keycode 62 = F11
- alt keycode 62 = Console_11
- control alt keycode 62 = Console_11
-keycode 76 = KP_Enter
-keycode 54 = Control
-keycode 75 = KP_Divide
-keycode 58 = AltGr
-keycode 62 = Up
-keycode 59 = Left
- alt keycode 59 = Decr_Console
-keycode 60 = Right
- alt keycode 60 = Incr_Console
-keycode 61 = Down
-control alt keycode 65 = Boot
-control alt keycode 117 = Boot
diff --git a/data/keymaps/mac/mac-de2-ext.map b/data/keymaps/mac/mac-de2-ext.map
deleted file mode 100644
index 19a6300..0000000
--- a/data/keymaps/mac/mac-de2-ext.map
+++ /dev/null
@@ -1,271 +0,0 @@
-#
-# Mac Extended II Tastatur deutsch
-# abgeleitet von mac-fr2-ext.map
-#
-# Mai 1999, Thomas Adams, tadams@fh-dortmund.de
-#
-# Sonderzeichen, die es auf der Tastatur nicht gibt, habe ich so angeordnet:
-#
-# @ : AltGr + q
-# | : AltGr + #
-# ~ : AltGr + +
-# \ : AltGr + ß
-# { : AltGr + 7
-# } : AltGr + 0
-# [ : AltGr + 8
-# ] : AltGr + 9
-#
-#
-# Ich habe viele der "Control_" und "Meta_" Einstellungen einfach so gelassen,
-# wie sie waren, einfach weil ich nichts so recht damit anfangen kann. :)
-# Wer mir in der Beziehung auf die Sprünge helfen möchte, bitte mailen.
-#
-keymaps 0-2,4-5,8,12
-strings as usual
-compose as usual for "iso-8859-1"
-keycode 1 = s
-keycode 2 = +d +D Hex_D Control_d Control_d Meta_d Meta_Control_d
-keycode 3 = +f +F Hex_F Control_f Control_f Meta_f Meta_Control_f
-keycode 4 = h
-keycode 5 = g
-keycode 6 = y
-keycode 7 = x
-keycode 8 = +c +C Hex_C Control_c Control_c Meta_c Meta_Control_c
-keycode 9 = v
-keycode 10 = dead_circumflex degree
-keycode 11 = +b +B Hex_B Control_b Control_b Meta_b Meta_Control_b
-keycode 12 = +q +Q at
-keycode 13 = w
-keycode 14 = +e +E Hex_E Control_e Control_e Meta_e Meta_Control_e
-keycode 15 = r
-keycode 16 = z
-keycode 17 = t
-keycode 18 = one exclam
- alt keycode 18 = Meta_one
-keycode 19 = two quotedbl nul nul nul Meta_two
-keycode 20 = three section
- control keycode 20 = Escape
- alt keycode 20 = Meta_three
-keycode 21 = four dollar nul Control_backslash
- alt keycode 21 = Meta_four
-keycode 22 = six ampersand
- control keycode 22 = Control_asciicircum
- alt keycode 22 = Meta_six
-keycode 23 = five percent
- control keycode 23 = Control_bracketright
- alt keycode 23 = Meta_five
-keycode 24 = dead_acute dead_grave
- alt keycode 24 = Meta_equal
-keycode 25 = nine parenright bracketright
- alt keycode 25 = Meta_nine
-keycode 26 = seven slash braceleft Control_underscore
- alt keycode 26 = Meta_seven
-keycode 27 = ssharp question backslash Control_underscore Control_underscore Meta_minus
-keycode 28 = eight parenleft bracketleft Delete
- alt keycode 28 = Meta_eight
-keycode 29 = zero equal braceright
- alt keycode 29 = Meta_zero
-keycode 30 = plus asterisk asciitilde Control_bracketright
- alt keycode 30 = Meta_bracketright
-keycode 31 = o
-keycode 32 = u
-keycode 33 = +udiaeresis +Udiaeresis
- control keycode 33 = Escape
- alt keycode 33 = Meta_bracketleft
-keycode 34 = i
-keycode 35 = p
-keycode 36 = Return
- alt keycode 36 = Meta_Control_m
-keycode 37 = l
-keycode 38 = j
-keycode 39 = +adiaeresis +Adiaeresis
- control keycode 39 = Control_g
- alt keycode 39 = Meta_apostrophe
-keycode 40 = k
-keycode 41 = +odiaeresis +Odiaeresis
- alt keycode 41 = Meta_semicolon
-keycode 42 = numbersign apostrophe bar
- control keycode 42 = Control_backslash
- alt keycode 42 = Meta_backslash
-keycode 43 = comma semicolon
- alt keycode 43 = Meta_comma
-keycode 44 = minus underscore
- control keycode 44 = Delete
- alt keycode 44 = Meta_slash
-keycode 45 = n
-keycode 46 = m
-keycode 47 = period colon
- control keycode 47 = Compose
- alt keycode 47 = backslash
-keycode 48 = Tab Tab
- alt keycode 48 = Meta_Tab
-keycode 49 = space space
- control keycode 49 = nul
- alt keycode 49 = Meta_space
-keycode 50 = less greater
- control keycode 50 = nul
- alt keycode 50 = Meta_grave
-keycode 51 = BackSpace BackSpace
- control keycode 51 = Delete
- alt keycode 51 = Meta_Delete
-keycode 52 =
-keycode 53 = Escape Escape
- alt keycode 53 = Meta_Escape
-keycode 54 = Control
-keycode 55 = Alt
-keycode 56 = Shift
-keycode 57 = Caps_Lock
-keycode 58 = AltGr
-keycode 59 = Left
- alt keycode 59 = Decr_Console
-keycode 60 = Right
- alt keycode 60 = Incr_Console
-keycode 61 = Down
-keycode 62 = Up
-keycode 63 =
-keycode 64 =
-keycode 65 = KP_Period
-keycode 66 =
-keycode 67 = KP_Multiply
-keycode 68 =
-keycode 69 = KP_Add
-keycode 70 =
-keycode 71 = Num_Lock
-keycode 72 =
-keycode 73 =
-keycode 74 =
-keycode 75 = KP_Divide
-keycode 76 = KP_Enter
-keycode 77 =
-keycode 78 = KP_Subtract
-keycode 79 =
-keycode 80 =
-keycode 81 = equal
-keycode 82 = KP_0
- altgr keycode 82 = Hex_0
- alt keycode 82 = Ascii_0
-keycode 83 = KP_1
- altgr keycode 83 = Hex_1
- alt keycode 83 = Ascii_1
-keycode 84 = KP_2
- altgr keycode 84 = Hex_2
- alt keycode 84 = Ascii_2
-keycode 85 = KP_3
- altgr keycode 85 = Hex_3
- alt keycode 85 = Ascii_3
-keycode 86 = KP_4
- altgr keycode 86 = Hex_4
- alt keycode 86 = Ascii_4
-keycode 87 = KP_5
- altgr keycode 87 = Hex_5
- alt keycode 87 = Ascii_5
-keycode 88 = KP_6
- altgr keycode 88 = Hex_6
- alt keycode 88 = Ascii_6
-keycode 89 = KP_7
- altgr keycode 89 = Hex_7
- alt keycode 89 = Ascii_7
-keycode 90 = +a +A Hex_A Control_a Control_a Meta_a Meta_Control_a
-keycode 91 = KP_8
- altgr keycode 91 = Hex_8
- alt keycode 91 = Ascii_8
-keycode 92 = KP_9
- altgr keycode 92 = Hex_9
- alt keycode 92 = Ascii_9
-keycode 93 =
-keycode 94 =
-keycode 95 =
-keycode 96 = F5
- shift keycode 96 = F15
- altgr keycode 96 = Console_17
- shift control keycode 96 = VoidSymbol
- alt keycode 96 = Console_5
- control alt keycode 96 = Console_5
-keycode 97 = F6
- shift keycode 97 = F16
- altgr keycode 97 = Console_18
- shift control keycode 97 = VoidSymbol
- alt keycode 97 = Console_6
- control alt keycode 97 = Console_6
-keycode 98 = F7
- shift keycode 98 = F17
- altgr keycode 98 = Console_19
- shift control keycode 98 = VoidSymbol
- alt keycode 98 = Console_7
- control alt keycode 98 = Console_7
-keycode 99 = F3
- shift keycode 99 = F13
- altgr keycode 99 = Console_15
- shift control keycode 99 = VoidSymbol
- alt keycode 99 = Console_3
- control alt keycode 99 = Console_3
-keycode 100 = F8
- shift keycode 100 = F18
- altgr keycode 100 = Console_20
- shift control keycode 100 = VoidSymbol
- alt keycode 100 = Console_8
- control alt keycode 100 = Console_8
-keycode 101 = F9
- shift keycode 101 = F19
- altgr keycode 101 = Console_21
- shift control keycode 101 = VoidSymbol
- alt keycode 101 = Console_9
- control alt keycode 101 = Console_9
-keycode 102 =
-keycode 103 = F11
- altgr keycode 103 = Console_23
- shift control keycode 103 = VoidSymbol
- alt keycode 103 = Console_11
- control alt keycode 103 = Console_11
-keycode 104 =
-keycode 105 = F13
-keycode 106 =
-keycode 107 = Scroll_Lock Show_Memory Show_Registers Show_State
- alt keycode 107 = Scroll_Lock
-keycode 108 =
-keycode 109 = F10
- shift keycode 109 = F20
- altgr keycode 109 = Console_22
- shift control keycode 109 = VoidSymbol
- alt keycode 109 = Console_10
- control alt keycode 109 = Console_10
-keycode 110 =
-keycode 111 = F12
- altgr keycode 111 = Console_24
- shift control keycode 111 = VoidSymbol
- alt keycode 111 = Console_12
- control alt keycode 111 = Console_12
-keycode 112 =
-keycode 113 = Pause
-keycode 114 = Insert
-keycode 115 = Find
-keycode 116 = Prior
- shift keycode 116 = Scroll_Backward
-keycode 117 = Remove
-keycode 118 = F4
- shift keycode 118 = F14
- altgr keycode 118 = Console_16
- shift control keycode 118 = VoidSymbol
- alt keycode 118 = Console_4
- control alt keycode 118 = Console_4
-keycode 119 = Select
-keycode 120 = F2
- shift keycode 120 = F12
- altgr keycode 120 = Console_14
- shift control keycode 120 = VoidSymbol
- alt keycode 120 = Console_2
- control alt keycode 120 = Console_2
-keycode 121 = Next
- shift keycode 121 = Scroll_Forward
-keycode 122 = F1
- shift keycode 122 = F11
- altgr keycode 122 = Console_13
- shift control keycode 122 = VoidSymbol
- alt keycode 122 = Console_1
- control alt keycode 122 = Console_1
-keycode 123 =
-keycode 124 =
-keycode 125 =
-keycode 126 =
-keycode 127 =
- shift control keycode 127 = Boot
diff --git a/data/keymaps/mac/mac-fr2-ext.map b/data/keymaps/mac/mac-fr2-ext.map
deleted file mode 100644
index a3c6b99..0000000
--- a/data/keymaps/mac/mac-fr2-ext.map
+++ /dev/null
@@ -1,250 +0,0 @@
-keymaps 0-2,4-5,8,12
-strings as usual
-compose as usual for "iso-8859-1"
-
-keycode 1 = s
-keycode 2 = +d +D Hex_D Control_d Control_d Meta_d Meta_Control_d
-keycode 3 = +f +F Hex_F Control_f Control_f Meta_f Meta_Control_f
-keycode 4 = h
-keycode 5 = g
-keycode 6 = w
-keycode 7 = x
-keycode 8 = +c +C Hex_C Control_c Control_c Meta_c Meta_Control_c
-keycode 9 = v
-keycode 10 =
-keycode 11 = +b +B Hex_B Control_b Control_b Meta_b Meta_Control_b
-keycode 12 = a
-keycode 13 = z
-keycode 14 = +e +E Hex_E Control_e Control_e Meta_e Meta_Control_e
-keycode 15 = r
-keycode 16 = y
-keycode 17 = t
-keycode 18 = ampersand one
- alt keycode 18 = Meta_one
-keycode 19 = e two at nul nul Meta_two
-keycode 20 = quotedbl three
- control keycode 20 = Escape
- alt keycode 20 = Meta_three
-keycode 21 = apostrophe four dollar Control_backslash
- alt keycode 21 = Meta_four
-keycode 22 = six six
- control keycode 22 = Control_asciicircum
- alt keycode 22 = Meta_six
-keycode 23 = parenleft five
- control keycode 23 = Control_bracketright
- alt keycode 23 = Meta_five
-keycode 24 = minus underscore
- alt keycode 24 = Meta_equal
-keycode 25 = nine nine bracketright
- alt keycode 25 = Meta_nine
-keycode 26 = e seven braceleft Control_underscore
- alt keycode 26 = Meta_seven
-keycode 27 = parenright asciitilde backslash Control_underscore Control_underscore Meta_minus
-keycode 28 = exclam eight bracketleft Delete
- alt keycode 28 = Meta_eight
-keycode 29 = a zero braceright
- alt keycode 29 = Meta_zero
-keycode 30 = dollar asterisk asciitilde Control_bracketright
- alt keycode 30 = Meta_bracketright
-keycode 31 = o
-keycode 32 = u
-keycode 33 = asciicircum bar
- control keycode 33 = Escape
- alt keycode 33 = Meta_bracketleft
-keycode 34 = i
-keycode 35 = p
-keycode 36 = Return
- alt keycode 36 = Meta_Control_m
-keycode 37 = l
-keycode 38 = j
-keycode 39 = u percent
- control keycode 39 = Control_g
- alt keycode 39 = Meta_apostrophe
-keycode 40 = k
-keycode 41 = m
- alt keycode 41 = Meta_semicolon
-keycode 42 = grave numbersign
- control keycode 42 = Control_backslash
- alt keycode 42 = Meta_backslash
-keycode 43 = semicolon period
- alt keycode 43 = Meta_comma
-keycode 44 = equal plus
- control keycode 44 = Delete
- alt keycode 44 = Meta_slash
-keycode 45 = n
-keycode 46 = comma question
-keycode 47 = colon slash
- control keycode 47 = Compose
- alt keycode 47 = backslash
-keycode 48 = Tab Tab
- alt keycode 48 = Meta_Tab
-keycode 49 = space space
- control keycode 49 = nul
- alt keycode 49 = Meta_space
-keycode 50 = less greater
- control keycode 50 = nul
- alt keycode 50 = Meta_grave
-keycode 51 = Delete Delete
- control keycode 51 = BackSpace
- alt keycode 51 = Meta_Delete
-keycode 52 =
-keycode 53 = Escape Escape
- alt keycode 53 = Meta_Escape
-keycode 54 = Control
-keycode 55 = Alt
-keycode 56 = Shift
-keycode 57 = Caps_Lock
-keycode 58 = AltGr
-keycode 59 = Left
- alt keycode 59 = Decr_Console
-keycode 60 = Right
- alt keycode 60 = Incr_Console
-keycode 61 = Down
-keycode 62 = Up
-keycode 63 =
-keycode 64 =
-keycode 65 = KP_Period
-keycode 66 =
-keycode 67 = KP_Multiply
-keycode 68 =
-keycode 69 = KP_Add
-keycode 70 =
-keycode 71 = Num_Lock
-keycode 72 =
-keycode 73 =
-keycode 74 =
-keycode 75 = KP_Divide
-keycode 76 = KP_Enter
-keycode 77 =
-keycode 78 = KP_Subtract
-keycode 79 =
-keycode 80 =
-keycode 81 =
-keycode 82 = KP_0
- altgr keycode 82 = Hex_0
- alt keycode 82 = Ascii_0
-keycode 83 = KP_1
- altgr keycode 83 = Hex_1
- alt keycode 83 = Ascii_1
-keycode 84 = KP_2
- altgr keycode 84 = Hex_2
- alt keycode 84 = Ascii_2
-keycode 85 = KP_3
- altgr keycode 85 = Hex_3
- alt keycode 85 = Ascii_3
-keycode 86 = KP_4
- altgr keycode 86 = Hex_4
- alt keycode 86 = Ascii_4
-keycode 87 = KP_5
- altgr keycode 87 = Hex_5
- alt keycode 87 = Ascii_5
-keycode 88 = KP_6
- altgr keycode 88 = Hex_6
- alt keycode 88 = Ascii_6
-keycode 89 = KP_7
- altgr keycode 89 = Hex_7
- alt keycode 89 = Ascii_7
-keycode 90 = +q +Q Hex_A Control_a Control_a Meta_a Meta_Control_a
-keycode 91 = KP_8
- altgr keycode 91 = Hex_8
- alt keycode 91 = Ascii_8
-keycode 92 = KP_9
- altgr keycode 92 = Hex_9
- alt keycode 92 = Ascii_9
-keycode 93 =
-keycode 94 =
-keycode 95 =
-keycode 96 = F5
- shift keycode 96 = F15
- altgr keycode 96 = Console_17
- shift control keycode 96 = VoidSymbol
- alt keycode 96 = Console_5
- control alt keycode 96 = Console_5
-keycode 97 = F6
- shift keycode 97 = F16
- altgr keycode 97 = Console_18
- shift control keycode 97 = VoidSymbol
- alt keycode 97 = Console_6
- control alt keycode 97 = Console_6
-keycode 98 = F7
- shift keycode 98 = F17
- altgr keycode 98 = Console_19
- shift control keycode 98 = VoidSymbol
- alt keycode 98 = Console_7
- control alt keycode 98 = Console_7
-keycode 99 = F3
- shift keycode 99 = F13
- altgr keycode 99 = Console_15
- shift control keycode 99 = VoidSymbol
- alt keycode 99 = Console_3
- control alt keycode 99 = Console_3
-keycode 100 = F8
- shift keycode 100 = F18
- altgr keycode 100 = Console_20
- shift control keycode 100 = VoidSymbol
- alt keycode 100 = Console_8
- control alt keycode 100 = Console_8
-keycode 101 = F9
- shift keycode 101 = F19
- altgr keycode 101 = Console_21
- shift control keycode 101 = VoidSymbol
- alt keycode 101 = Console_9
- control alt keycode 101 = Console_9
-keycode 102 =
-keycode 103 = F11
- altgr keycode 103 = Console_23
- shift control keycode 103 = VoidSymbol
- alt keycode 103 = Console_11
- control alt keycode 103 = Console_11
-keycode 104 =
-keycode 105 = F13
-keycode 106 =
-keycode 107 = Scroll_Lock Show_Memory Show_Registers Show_State
- alt keycode 107 = Scroll_Lock
-keycode 108 =
-keycode 109 = F10
- shift keycode 109 = F20
- altgr keycode 109 = Console_22
- shift control keycode 109 = VoidSymbol
- alt keycode 109 = Console_10
- control alt keycode 109 = Console_10
-keycode 110 =
-keycode 111 = F12
- altgr keycode 111 = Console_24
- shift control keycode 111 = VoidSymbol
- alt keycode 111 = Console_12
- control alt keycode 111 = Console_12
-keycode 112 =
-keycode 113 = Pause
-keycode 114 = Insert
-keycode 115 = Find
-keycode 116 = Prior
- shift keycode 116 = Scroll_Backward
-keycode 117 = Remove
-keycode 118 = F4
- shift keycode 118 = F14
- altgr keycode 118 = Console_16
- shift control keycode 118 = VoidSymbol
- alt keycode 118 = Console_4
- control alt keycode 118 = Console_4
-keycode 119 = Select
-keycode 120 = F2
- shift keycode 120 = F12
- altgr keycode 120 = Console_14
- shift control keycode 120 = VoidSymbol
- alt keycode 120 = Console_2
- control alt keycode 120 = Console_2
-keycode 121 = Next
- shift keycode 121 = Scroll_Forward
-keycode 122 = F1
- shift keycode 122 = F11
- altgr keycode 122 = Console_13
- shift control keycode 122 = VoidSymbol
- alt keycode 122 = Console_1
- control alt keycode 122 = Console_1
-keycode 123 =
-keycode 124 =
-keycode 125 =
-keycode 126 =
-keycode 127 =
- shift control keycode 127 = Boot
diff --git a/data/keymaps/mac/mac-us-ext.map b/data/keymaps/mac/mac-us-ext.map
deleted file mode 100644
index 3edf411..0000000
--- a/data/keymaps/mac/mac-us-ext.map
+++ /dev/null
@@ -1,249 +0,0 @@
-keymaps 0-2,4-5,8,12
-strings as usual
-compose as usual for "iso-8859-1"
-keycode 1 = s
-keycode 2 = +d +D Hex_D Control_d Control_d Meta_d Meta_Control_d
-keycode 3 = +f +F Hex_F Control_f Control_f Meta_f Meta_Control_f
-keycode 4 = h
-keycode 5 = g
-keycode 6 = z
-keycode 7 = x
-keycode 8 = +c +C Hex_C Control_c Control_c Meta_c Meta_Control_c
-keycode 9 = v
-keycode 10 =
-keycode 11 = +b +B Hex_B Control_b Control_b Meta_b Meta_Control_b
-keycode 12 = q
-keycode 13 = w
-keycode 14 = +e +E Hex_E Control_e Control_e Meta_e Meta_Control_e
-keycode 15 = r
-keycode 16 = y
-keycode 17 = t
-keycode 18 = one exclam
- alt keycode 18 = Meta_one
-keycode 19 = two at at nul nul Meta_two
-keycode 20 = three numbersign
- control keycode 20 = Escape
- alt keycode 20 = Meta_three
-keycode 21 = four dollar dollar Control_backslash
- alt keycode 21 = Meta_four
-keycode 22 = six asciicircum
- control keycode 22 = Control_asciicircum
- alt keycode 22 = Meta_six
-keycode 23 = five percent
- control keycode 23 = Control_bracketright
- alt keycode 23 = Meta_five
-keycode 24 = equal plus
- alt keycode 24 = Meta_equal
-keycode 25 = nine parenleft bracketright
- alt keycode 25 = Meta_nine
-keycode 26 = seven ampersand braceleft Control_underscore
- alt keycode 26 = Meta_seven
-keycode 27 = minus underscore backslash Control_underscore Control_underscore Meta_minus
-keycode 28 = eight asterisk bracketleft Delete
- alt keycode 28 = Meta_eight
-keycode 29 = zero parenright braceright
- alt keycode 29 = Meta_zero
-keycode 30 = bracketright braceright asciitilde Control_bracketright
- alt keycode 30 = Meta_bracketright
-keycode 31 = o
-keycode 32 = u
-keycode 33 = bracketleft braceleft
- control keycode 33 = Escape
- alt keycode 33 = Meta_bracketleft
-keycode 34 = i
-keycode 35 = p
-keycode 36 = Return
- alt keycode 36 = Meta_Control_m
-keycode 37 = l
-keycode 38 = j
-keycode 39 = apostrophe quotedbl
- control keycode 39 = Control_g
- alt keycode 39 = Meta_apostrophe
-keycode 40 = k
-keycode 41 = semicolon colon
- alt keycode 41 = Meta_semicolon
-keycode 42 = backslash bar
- control keycode 42 = Control_backslash
- alt keycode 42 = Meta_backslash
-keycode 43 = comma less
- alt keycode 43 = Meta_comma
-keycode 44 = slash question
- control keycode 44 = Delete
- alt keycode 44 = Meta_slash
-keycode 45 = n
-keycode 46 = m
-keycode 47 = period greater
- control keycode 47 = Compose
- alt keycode 47 = Meta_period
-keycode 48 = Tab Tab
- alt keycode 48 = Meta_Tab
-keycode 49 = space space
- control keycode 49 = nul
- alt keycode 49 = Meta_space
-keycode 50 = grave asciitilde
- control keycode 50 = nul
- alt keycode 50 = Meta_grave
-keycode 51 = Delete Delete
- control keycode 51 = BackSpace
- alt keycode 51 = Meta_Delete
-keycode 52 =
-keycode 53 = Escape Escape
- alt keycode 53 = Meta_Escape
-keycode 54 = Control
-keycode 55 = Alt
-keycode 56 = Shift
-keycode 57 = Caps_Lock
-keycode 58 = AltGr
-keycode 59 = Left
- alt keycode 59 = Decr_Console
-keycode 60 = Right
- alt keycode 60 = Incr_Console
-keycode 61 = Down
-keycode 62 = Up
-keycode 63 =
-keycode 64 =
-keycode 65 = KP_Period
-keycode 66 =
-keycode 67 = KP_Multiply
-keycode 68 =
-keycode 69 = KP_Add
-keycode 70 =
-keycode 71 = Num_Lock
-keycode 72 =
-keycode 73 =
-keycode 74 =
-keycode 75 = KP_Divide
-keycode 76 = KP_Enter
-keycode 77 =
-keycode 78 = KP_Subtract
-keycode 79 =
-keycode 80 =
-keycode 81 =
-keycode 82 = KP_0
- altgr keycode 82 = Hex_0
- alt keycode 82 = Ascii_0
-keycode 83 = KP_1
- altgr keycode 83 = Hex_1
- alt keycode 83 = Ascii_1
-keycode 84 = KP_2
- altgr keycode 84 = Hex_2
- alt keycode 84 = Ascii_2
-keycode 85 = KP_3
- altgr keycode 85 = Hex_3
- alt keycode 85 = Ascii_3
-keycode 86 = KP_4
- altgr keycode 86 = Hex_4
- alt keycode 86 = Ascii_4
-keycode 87 = KP_5
- altgr keycode 87 = Hex_5
- alt keycode 87 = Ascii_5
-keycode 88 = KP_6
- altgr keycode 88 = Hex_6
- alt keycode 88 = Ascii_6
-keycode 89 = KP_7
- altgr keycode 89 = Hex_7
- alt keycode 89 = Ascii_7
-keycode 90 = +a +A Hex_A Control_a Control_a Meta_a Meta_Control_a
-keycode 91 = KP_8
- altgr keycode 91 = Hex_8
- alt keycode 91 = Ascii_8
-keycode 92 = KP_9
- altgr keycode 92 = Hex_9
- alt keycode 92 = Ascii_9
-keycode 93 =
-keycode 94 =
-keycode 95 =
-keycode 96 = F5
- shift keycode 96 = F15
- altgr keycode 96 = Console_17
- shift control keycode 96 = VoidSymbol
- alt keycode 96 = Console_5
- control alt keycode 96 = Console_5
-keycode 97 = F6
- shift keycode 97 = F16
- altgr keycode 97 = Console_18
- shift control keycode 97 = VoidSymbol
- alt keycode 97 = Console_6
- control alt keycode 97 = Console_6
-keycode 98 = F7
- shift keycode 98 = F17
- altgr keycode 98 = Console_19
- shift control keycode 98 = VoidSymbol
- alt keycode 98 = Console_7
- control alt keycode 98 = Console_7
-keycode 99 = F3
- shift keycode 99 = F13
- altgr keycode 99 = Console_15
- shift control keycode 99 = VoidSymbol
- alt keycode 99 = Console_3
- control alt keycode 99 = Console_3
-keycode 100 = F8
- shift keycode 100 = F18
- altgr keycode 100 = Console_20
- shift control keycode 100 = VoidSymbol
- alt keycode 100 = Console_8
- control alt keycode 100 = Console_8
-keycode 101 = F9
- shift keycode 101 = F19
- altgr keycode 101 = Console_21
- shift control keycode 101 = VoidSymbol
- alt keycode 101 = Console_9
- control alt keycode 101 = Console_9
-keycode 102 =
-keycode 103 = F11
- altgr keycode 103 = Console_23
- shift control keycode 103 = VoidSymbol
- alt keycode 103 = Console_11
- control alt keycode 103 = Console_11
-keycode 104 =
-keycode 105 = F13
-keycode 106 =
-keycode 107 = Scroll_Lock Show_Memory Show_Registers Show_State
- alt keycode 107 = Scroll_Lock
-keycode 108 =
-keycode 109 = F10
- shift keycode 109 = F20
- altgr keycode 109 = Console_22
- shift control keycode 109 = VoidSymbol
- alt keycode 109 = Console_10
- control alt keycode 109 = Console_10
-keycode 110 =
-keycode 111 = F12
- altgr keycode 111 = Console_24
- shift control keycode 111 = VoidSymbol
- alt keycode 111 = Console_12
- control alt keycode 111 = Console_12
-keycode 112 =
-keycode 113 = Pause
-keycode 114 = Insert
-keycode 115 = Find
-keycode 116 = Prior
- shift keycode 116 = Scroll_Backward
-keycode 117 = Remove
-keycode 118 = F4
- shift keycode 118 = F14
- altgr keycode 118 = Console_16
- shift control keycode 118 = VoidSymbol
- alt keycode 118 = Console_4
- control alt keycode 118 = Console_4
-keycode 119 = Select
-keycode 120 = F2
- shift keycode 120 = F12
- altgr keycode 120 = Console_14
- shift control keycode 120 = VoidSymbol
- alt keycode 120 = Console_2
- control alt keycode 120 = Console_2
-keycode 121 = Next
- shift keycode 121 = Scroll_Forward
-keycode 122 = F1
- shift keycode 122 = F11
- altgr keycode 122 = Console_13
- shift control keycode 122 = VoidSymbol
- alt keycode 122 = Console_1
- control alt keycode 122 = Console_1
-keycode 123 =
-keycode 124 =
-keycode 125 =
-keycode 126 =
-keycode 127 =
- shift control keycode 127 = Boot
diff --git a/data/keymaps/mac/mac-us-std.map b/data/keymaps/mac/mac-us-std.map
deleted file mode 100644
index 1edbb61..0000000
--- a/data/keymaps/mac/mac-us-std.map
+++ /dev/null
@@ -1,259 +0,0 @@
-keymaps 0-2,4-5,8,12
-strings as usual
-compose as usual for "iso-8859-1"
-keycode 1 = s
-keycode 2 = +d +D Hex_D Control_d Control_d Meta_d Meta_Control_d
-keycode 3 = +f +F Hex_F Control_f Control_f Meta_f Meta_Control_f
-keycode 4 = h
-keycode 5 = g
-keycode 6 = z
-keycode 7 = x
-keycode 8 = +c +C Hex_C Control_c Control_c Meta_c Meta_Control_c
-keycode 9 = v
-keycode 10 =
-keycode 11 = +b +B Hex_B Control_b Control_b Meta_b Meta_Control_b
-keycode 12 = q
-keycode 13 = w
-keycode 14 = +e +E Hex_E Control_e Control_e Meta_e Meta_Control_e
-keycode 15 = r
-keycode 16 = y
-keycode 17 = t
-keycode 18 = one exclam
- alt keycode 18 = Meta_one
- control alt keycode 18 = Console_1
-keycode 19 = two at at nul nul Meta_two
- control alt keycode 19 = Console_2
-keycode 20 = three numbersign
- control keycode 20 = Escape
- alt keycode 20 = Meta_three
- control alt keycode 20 = Console_3
-keycode 21 = four dollar dollar Control_backslash
- alt keycode 21 = Meta_four
- control alt keycode 21 = Console_4
-keycode 22 = six asciicircum
- control keycode 22 = Control_asciicircum
- alt keycode 22 = Meta_six
- control alt keycode 22 = Console_6
-keycode 23 = five percent
- control keycode 23 = Control_bracketright
- alt keycode 23 = Meta_five
- control alt keycode 23 = Console_5
-keycode 24 = equal plus
- alt keycode 24 = Meta_equal
-keycode 25 = nine parenleft bracketright
- alt keycode 25 = Meta_nine
- control alt keycode 25 = Console_9
-keycode 26 = seven ampersand braceleft Control_underscore
- alt keycode 26 = Meta_seven
- control alt keycode 26 = Console_7
-keycode 27 = minus underscore backslash Control_underscore Control_underscore Meta_minus
-keycode 28 = eight asterisk bracketleft Delete
- alt keycode 28 = Meta_eight
- control alt keycode 28 = Console_8
-keycode 29 = zero parenright braceright
- alt keycode 29 = Meta_zero
- control alt keycode 29 = Console_10
-keycode 30 = bracketright braceright asciitilde Control_bracketright
- alt keycode 30 = Meta_bracketright
-keycode 31 = o
-keycode 32 = u
-keycode 33 = bracketleft braceleft
- control keycode 33 = Escape
- alt keycode 33 = Meta_bracketleft
-keycode 34 = i
-keycode 35 = p
-keycode 36 = Return
- alt keycode 36 = Meta_Control_m
-keycode 37 = l
-keycode 38 = j
-keycode 39 = apostrophe quotedbl
- control keycode 39 = Control_g
- alt keycode 39 = Meta_apostrophe
-keycode 40 = k
-keycode 41 = semicolon colon
- alt keycode 41 = Meta_semicolon
-keycode 42 = backslash bar
- control keycode 42 = Control_backslash
- alt keycode 42 = Meta_backslash
-keycode 43 = comma less
- alt keycode 43 = Meta_comma
-keycode 44 = slash question
- control keycode 44 = Delete
- alt keycode 44 = Meta_slash
-keycode 45 = n
-keycode 46 = m
-keycode 47 = period greater
- control keycode 47 = Compose
- alt keycode 47 = Meta_period
-keycode 48 = Tab Tab
- alt keycode 48 = Meta_Tab
-keycode 49 = space space
- control keycode 49 = nul
- alt keycode 49 = Meta_space
-keycode 50 = grave asciitilde
- control keycode 50 = nul
- alt keycode 50 = Meta_grave
-keycode 51 = Delete Delete
- control keycode 51 = BackSpace
- alt keycode 51 = Meta_Delete
-keycode 52 =
-keycode 53 = Escape Escape
- alt keycode 53 = Meta_Escape
-keycode 54 = Control
-keycode 55 = Alt
-keycode 56 = Shift
-keycode 57 = Caps_Lock
-keycode 58 = AltGr
-keycode 59 = Left
- alt keycode 59 = Decr_Console
-keycode 60 = Right
- alt keycode 60 = Incr_Console
-keycode 61 = Down
-keycode 62 = Up
-keycode 63 =
-keycode 64 =
-keycode 65 = KP_Period
-keycode 66 =
-keycode 67 = KP_Multiply
-keycode 68 =
-keycode 69 = KP_Add
-keycode 70 =
-keycode 71 = Num_Lock
-keycode 72 =
-keycode 73 =
-keycode 74 =
-keycode 75 = KP_Divide
-keycode 76 = KP_Enter
-keycode 77 =
-keycode 78 = KP_Subtract
-keycode 79 =
-keycode 80 =
-keycode 81 =
-keycode 82 = KP_0
- altgr keycode 82 = Hex_0
- alt keycode 82 = Ascii_0
-keycode 83 = KP_1
- altgr keycode 83 = Hex_1
- alt keycode 83 = Ascii_1
-keycode 84 = KP_2
- altgr keycode 84 = Hex_2
- alt keycode 84 = Ascii_2
-keycode 85 = KP_3
- altgr keycode 85 = Hex_3
- alt keycode 85 = Ascii_3
-keycode 86 = KP_4
- altgr keycode 86 = Hex_4
- alt keycode 86 = Ascii_4
-keycode 87 = KP_5
- altgr keycode 87 = Hex_5
- alt keycode 87 = Ascii_5
-keycode 88 = KP_6
- altgr keycode 88 = Hex_6
- alt keycode 88 = Ascii_6
-keycode 89 = KP_7
- altgr keycode 89 = Hex_7
- alt keycode 89 = Ascii_7
-keycode 90 = +a +A Hex_A Control_a Control_a Meta_a Meta_Control_a
-keycode 91 = KP_8
- altgr keycode 91 = Hex_8
- alt keycode 91 = Ascii_8
-keycode 92 = KP_9
- altgr keycode 92 = Hex_9
- alt keycode 92 = Ascii_9
-keycode 93 =
-keycode 94 =
-keycode 95 =
-keycode 96 = F5
- shift keycode 96 = F15
- altgr keycode 96 = Console_17
- shift control keycode 96 = VoidSymbol
- alt keycode 96 = Console_5
- control alt keycode 96 = Console_5
-keycode 97 = F6
- shift keycode 97 = F16
- altgr keycode 97 = Console_18
- shift control keycode 97 = VoidSymbol
- alt keycode 97 = Console_6
- control alt keycode 97 = Console_6
-keycode 98 = F7
- shift keycode 98 = F17
- altgr keycode 98 = Console_19
- shift control keycode 98 = VoidSymbol
- alt keycode 98 = Console_7
- control alt keycode 98 = Console_7
-keycode 99 = F3
- shift keycode 99 = F13
- altgr keycode 99 = Console_15
- shift control keycode 99 = VoidSymbol
- alt keycode 99 = Console_3
- control alt keycode 99 = Console_3
-keycode 100 = F8
- shift keycode 100 = F18
- altgr keycode 100 = Console_20
- shift control keycode 100 = VoidSymbol
- alt keycode 100 = Console_8
- control alt keycode 100 = Console_8
-keycode 101 = F9
- shift keycode 101 = F19
- altgr keycode 101 = Console_21
- shift control keycode 101 = VoidSymbol
- alt keycode 101 = Console_9
- control alt keycode 101 = Console_9
-keycode 102 =
-keycode 103 = F11
- altgr keycode 103 = Console_23
- shift control keycode 103 = VoidSymbol
- alt keycode 103 = Console_11
- control alt keycode 103 = Console_11
-keycode 104 =
-keycode 105 = F13
-keycode 106 =
-keycode 107 = Scroll_Lock Show_Memory Show_Registers Show_State
- alt keycode 107 = Scroll_Lock
-keycode 108 =
-keycode 109 = F10
- shift keycode 109 = F20
- altgr keycode 109 = Console_22
- shift control keycode 109 = VoidSymbol
- alt keycode 109 = Console_10
- control alt keycode 109 = Console_10
-keycode 110 =
-keycode 111 = F12
- altgr keycode 111 = Console_24
- shift control keycode 111 = VoidSymbol
- alt keycode 111 = Console_12
- control alt keycode 111 = Console_12
-keycode 112 =
-keycode 113 = Pause
-keycode 114 = Insert
-keycode 115 = Find
-keycode 116 = Prior
- shift keycode 116 = Scroll_Backward
-keycode 117 = Remove
-keycode 118 = F4
- shift keycode 118 = F14
- altgr keycode 118 = Console_16
- shift control keycode 118 = VoidSymbol
- alt keycode 118 = Console_4
- control alt keycode 118 = Console_4
-keycode 119 = Select
-keycode 120 = F2
- shift keycode 120 = F12
- altgr keycode 120 = Console_14
- shift control keycode 120 = VoidSymbol
- alt keycode 120 = Console_2
- control alt keycode 120 = Console_2
-keycode 121 = Next
- shift keycode 121 = Scroll_Forward
-keycode 122 = F1
- shift keycode 122 = F11
- altgr keycode 122 = Console_13
- shift control keycode 122 = VoidSymbol
- alt keycode 122 = Console_1
- control alt keycode 122 = Console_1
-keycode 123 =
-keycode 124 =
-keycode 125 =
-keycode 126 =
-keycode 127 =
- shift control keycode 127 = Boot
diff --git a/data/unimaps/cp1250.uni b/data/unimaps/cp1250.uni
new file mode 100644
index 0000000..dafea57
--- /dev/null
+++ b/data/unimaps/cp1250.uni
@@ -0,0 +1,135 @@
+# CP1250 (Microsoft EE = Eastern European)
+# 000-127: ASCII
+# 128-191: misc
+# 192-255: ISO 8859-2
+#
+0x00-0x7f idem
+#
+0x80 U+20ac # EURO SIGN
+0x81 U+0000 # UNDEFINED
+0x82 U+201a # SINGLE LOW-9 QUOTATION MARK
+0x83 U+0000 # UNDEFINED
+0x84 U+201e # DOUBLE LOW-9 QUOTATION MARK
+0x85 U+2026 # HORIZONTAL ELLIPSIS
+0x86 U+2020 # DAGGER
+0x87 U+2021 # DOUBLE DAGGER
+0x88 U+0000 # UNDEFINED
+0x89 U+2030 # PER MILLE SIGN
+0x8a U+0160 # LATIN CAPITAL LETTER S WITH CARON
+0x8b U+2039 # SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+0x8c U+015a # LATIN CAPITAL LETTER S WITH ACUTE
+0x8d U+0164 # LATIN CAPITAL LETTER T WITH CARON
+0x8e U+017d # LATIN CAPITAL LETTER Z WITH CARON
+0x8f U+0179 # LATIN CAPITAL LETTER Z WITH ACUTE
+0x90 U+0000 # UNDEFINED
+0x91 U+2018 # LEFT SINGLE QUOTATION MARK
+0x92 U+2019 # RIGHT SINGLE QUOTATION MARK
+0x93 U+201c # LEFT DOUBLE QUOTATION MARK
+0x94 U+201d # RIGHT DOUBLE QUOTATION MARK
+0x95 U+2022 # BULLET
+0x96 U+2013 # EN DASH
+0x97 U+2014 # EM DASH
+0x98 U+0000 # UNDEFINED
+0x99 U+2122 # TRADE MARK SIGN
+0x9a U+0161 # LATIN SMALL LETTER S WITH CARON
+0x9b U+203a # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+0x9c U+015b # LATIN SMALL LETTER S WITH ACUTE
+0x9d U+0165 # LATIN SMALL LETTER T WITH CARON
+0x9e U+017e # LATIN SMALL LETTER Z WITH CARON
+0x9f U+017a # LATIN SMALL LETTER Z WITH ACUTE
+0xa0 U+00a0 # NO-BREAK SPACE
+0xa1 U+02c7 # CARON
+0xa2 U+02d8 # BREVE
+0xa3 U+0141 # LATIN CAPITAL LETTER L WITH STROKE
+0xa4 U+00a4 # CURRENCY SIGN
+0xa5 U+0104 # LATIN CAPITAL LETTER A WITH OGONEK
+0xa6 U+00a6 # BROKEN BAR
+0xa7 U+00a7 # SECTION SIGN
+0xa8 U+00a8 # DIAERESIS
+0xa9 U+00a9 # COPYRIGHT SIGN
+0xaa U+015e # LATIN CAPITAL LETTER S WITH CEDILLA
+0xab U+00ab # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xac U+00ac # NOT SIGN
+0xad U+00ad # SOFT HYPHEN
+0xae U+00ae # REGISTERED SIGN
+0xaf U+017b # LATIN CAPITAL LETTER Z WITH DOT ABOVE
+0xb0 U+00b0 # DEGREE SIGN
+0xb1 U+00b1 # PLUS-MINUS SIGN
+0xb2 U+02db # OGONEK
+0xb3 U+0142 # LATIN SMALL LETTER L WITH STROKE
+0xb4 U+00b4 # ACUTE ACCENT
+0xb5 U+00b5 # MICRO SIGN
+0xb6 U+00b6 # PILCROW SIGN
+0xb7 U+00b7 # MIDDLE DOT
+0xb8 U+00b8 # CEDILLA
+0xb9 U+0105 # LATIN SMALL LETTER A WITH OGONEK
+0xba U+015f # LATIN SMALL LETTER S WITH CEDILLA
+0xbb U+00bb # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xbc U+013d # LATIN CAPITAL LETTER L WITH CARON
+0xbd U+02dd # DOUBLE ACUTE ACCENT
+0xbe U+013e # LATIN SMALL LETTER L WITH CARON
+0xbf U+017c # LATIN SMALL LETTER Z WITH DOT ABOVE
+0xc0 U+0154 # LATIN CAPITAL LETTER R WITH ACUTE
+0xc1 U+00c1 # LATIN CAPITAL LETTER A WITH ACUTE
+0xc2 U+00c2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0xc3 U+0102 # LATIN CAPITAL LETTER A WITH BREVE
+0xc4 U+00c4 # LATIN CAPITAL LETTER A WITH DIAERESIS
+0xc5 U+0139 # LATIN CAPITAL LETTER L WITH ACUTE
+0xc6 U+0106 # LATIN CAPITAL LETTER C WITH ACUTE
+0xc7 U+00c7 # LATIN CAPITAL LETTER C WITH CEDILLA
+0xc8 U+010c # LATIN CAPITAL LETTER C WITH CARON
+0xc9 U+00c9 # LATIN CAPITAL LETTER E WITH ACUTE
+0xca U+0118 # LATIN CAPITAL LETTER E WITH OGONEK
+0xcb U+00cb # LATIN CAPITAL LETTER E WITH DIAERESIS
+0xcc U+011a # LATIN CAPITAL LETTER E WITH CARON
+0xcd U+00cd # LATIN CAPITAL LETTER I WITH ACUTE
+0xce U+00ce # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0xcf U+010e # LATIN CAPITAL LETTER D WITH CARON
+0xd0 U+0110 # LATIN CAPITAL LETTER D WITH STROKE
+0xd1 U+0143 # LATIN CAPITAL LETTER N WITH ACUTE
+0xd2 U+0147 # LATIN CAPITAL LETTER N WITH CARON
+0xd3 U+00d3 # LATIN CAPITAL LETTER O WITH ACUTE
+0xd4 U+00d4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0xd5 U+0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+0xd6 U+00d6 # LATIN CAPITAL LETTER O WITH DIAERESIS
+0xd7 U+00d7 # MULTIPLICATION SIGN
+0xd8 U+0158 # LATIN CAPITAL LETTER R WITH CARON
+0xd9 U+016e # LATIN CAPITAL LETTER U WITH RING ABOVE
+0xda U+00da # LATIN CAPITAL LETTER U WITH ACUTE
+0xdb U+0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+0xdc U+00dc # LATIN CAPITAL LETTER U WITH DIAERESIS
+0xdd U+00dd # LATIN CAPITAL LETTER Y WITH ACUTE
+0xde U+0162 # LATIN CAPITAL LETTER T WITH CEDILLA
+0xdf U+00df # LATIN SMALL LETTER SHARP S
+0xe0 U+0155 # LATIN SMALL LETTER R WITH ACUTE
+0xe1 U+00e1 # LATIN SMALL LETTER A WITH ACUTE
+0xe2 U+00e2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
+0xe3 U+0103 # LATIN SMALL LETTER A WITH BREVE
+0xe4 U+00e4 # LATIN SMALL LETTER A WITH DIAERESIS
+0xe5 U+013a # LATIN SMALL LETTER L WITH ACUTE
+0xe6 U+0107 # LATIN SMALL LETTER C WITH ACUTE
+0xe7 U+00e7 # LATIN SMALL LETTER C WITH CEDILLA
+0xe8 U+010d # LATIN SMALL LETTER C WITH CARON
+0xe9 U+00e9 # LATIN SMALL LETTER E WITH ACUTE
+0xea U+0119 # LATIN SMALL LETTER E WITH OGONEK
+0xeb U+00eb # LATIN SMALL LETTER E WITH DIAERESIS
+0xec U+011b # LATIN SMALL LETTER E WITH CARON
+0xed U+00ed # LATIN SMALL LETTER I WITH ACUTE
+0xee U+00ee # LATIN SMALL LETTER I WITH CIRCUMFLEX
+0xef U+010f # LATIN SMALL LETTER D WITH CARON
+0xf0 U+0111 # LATIN SMALL LETTER D WITH STROKE
+0xf1 U+0144 # LATIN SMALL LETTER N WITH ACUTE
+0xf2 U+0148 # LATIN SMALL LETTER N WITH CARON
+0xf3 U+00f3 # LATIN SMALL LETTER O WITH ACUTE
+0xf4 U+00f4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
+0xf5 U+0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE
+0xf6 U+00f6 # LATIN SMALL LETTER O WITH DIAERESIS
+0xf7 U+00f7 # DIVISION SIGN
+0xf8 U+0159 # LATIN SMALL LETTER R WITH CARON
+0xf9 U+016f # LATIN SMALL LETTER U WITH RING ABOVE
+0xfa U+00fa # LATIN SMALL LETTER U WITH ACUTE
+0xfb U+0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE
+0xfc U+00fc # LATIN SMALL LETTER U WITH DIAERESIS
+0xfd U+00fd # LATIN SMALL LETTER Y WITH ACUTE
+0xfe U+0163 # LATIN SMALL LETTER T WITH CEDILLA
+0xff U+02d9 # DOT ABOVE
diff --git a/doc/A20/A20.html b/doc/A20/A20.html
new file mode 100644
index 0000000..ca4d09e
--- /dev/null
+++ b/doc/A20/A20.html
@@ -0,0 +1,272 @@
+<html>
+<head>
+<title>A20 - a pain from the past</title>
+</head>
+<body>
+<h1>A20 - a pain from the past</h1>
+
+Everybody hates the CapsLock key, but keyboard manufacturers continue
+producing keyboards with CapsLock - it could be that someone wants it.
+<p>
+With A20 it is similar but worse. Really nobody wants it, but it
+continues to haunt us.
+<p>
+<h2>History</h2>
+The 8088 in the original PC had only 20 address lines, good for 1 MB.
+The maximum address FFFF:FFFF addresses 0x10ffef, and this would silently
+wrap to 0x0ffef.
+When the 286 (with 24 address lines) was introduced, it had a real mode
+that was intended to be 100% compatible with the 8088. However, it failed
+to do this address truncation (a bug), and people found that there existed
+programs that actually depended on this truncation.
+Trying to achieve perfect compatibility, IBM invented a switch
+to enable/disable the 0x100000 address bit.
+Since the 8042 keyboard controller happened to have a spare pin,
+that was used to control the AND gate that disables this address bit.
+The signal is called A20, and if it is zero, bit 20 of all addresses
+is cleared.
+
+<h2>Present</h2>
+Why do we have to worry about this nonsense?
+Because by default the A20 address line is disabled at boot time,
+so the operating system has to find out how to enable it, and that
+may be nontrivial since the details depend on the chipset used.
+
+<h2>Classical A20 control, via the keyboard controller</h2>
+The output port of the keyboard controller has a number of functions.
+<br>
+Bit 0 is used to reset the CPU (go to real mode) - a reset happens
+when bit 0 is 0.
+<br>
+Bit 1 is used to control A20 - it is enabled when bit 1 is 1,
+disabled when bit 1 is 0.
+<br>
+One sets the output port of the keyboard controller by first writing
+0xd1 to port 0x64, and the the desired value of the output port
+to port 0x60. One usually sees the values 0xdd and 0xdf used to
+disable/enable A20. Thus:
+<pre>
+ call empty_8042
+ mov al,#0xd1 ! command write
+ out #0x64,al
+ call empty_8042
+ mov al,#0xdf ! A20 on
+ out #0x60,al
+ call empty_8042
+</pre>
+where <tt>empty_8042</tt> has to wait for the kbd to finish
+handling input, say
+<pre>
+empty_8042:
+ call delay
+ in al,#0x64
+ test al,#2
+ jnz empty_8042
+ ret
+</pre>
+
+<h3>Variation</h3>
+The HP Vectra accepts a shortcut, where writing
+0xdd or 0xdf to port 0x64 will disable/enable A20.
+<pre>
+! For the HP Vectra
+ call empty_8042
+ jnz err
+ mov al,#0xdf
+ out #0x64,al
+ call empty_8042
+ jnz err
+ mov al,#0xdf ! Do it again
+ out #0x64,al
+ call empty_8042
+ jnz err
+! Success
+</pre>
+(HIMEM.SYS in DOS 5.0 incorrectly identifies some computers as HP Vectra -
+this may cause a hang at boot. Fixed in DOS5.0a.)
+
+<h2>A20 control via System Control Port A</h2>
+Some operating systems use the switching off and on of A20 as part
+of the standard procedure to switch between real (16-bit) and protected
+mode. Since the keyboard microcontroller is slow, it was desirable to
+avoid it, and a Fast Gate A20 Option was introduced, where I/O port
+0x92 (System Control Port A) is used to handle A20, circumventing
+the keyboard controller.
+<p>
+Thus, MCA, EISA and other systems can also control A20 via port 0x92.
+This port has a number of functions, and the details depend on
+the manufacturer. Bits 0,1,3,6,7 seem to have the same meaning
+everywhere this port is implemented.
+<br>
+Bit 0 (w): writing 1 to this bit causes a
+fast reset (used to switch back to real mode; for MCA this took 13.4 ms).
+<br>
+Bit 1 (rw): 0: disable A20, 1: enable A20.
+<br>
+Bit 3 (rw?): 0/1: power-on password bytes (stored in CMOS bytes 0x38-0x3f
+or 0x36-0x3f) accessible/inaccessible. This bit can be written to only
+when it is 0.
+<br>
+Bits 6-7 (rw): 00: hard disk activity LED off,
+01,10,11: hard disk activity LED on.
+<br>
+Bits 2,4,5 are unused or have varying meanings.
+(On MCA bit 4 (r): 1: watchdog timeout occurred.)
+<p>
+<h3>Using 0x92 may be necessary</h3>
+Sometimes (especially on embedded systems) no keyboard controller
+is present, and it may be necessary to use 0x92.
+Often however, the chip will catch accesses to ports 0x64 and 0x60
+and simulate the expected behaviour, also when no keyboard controller
+is present. Sometimes, this snooping behaviour must be enabled first.
+
+<h3>Using 0x92 may be dangerous</h3>
+Gianluca Anzolin <g.anzolin@inwind.it> reports:
+I have a TRIDENT 9660 video card integrated on the mainboard.
+Linux boots well, but after LILO has loaded the kernel, the screen
+becomes black and remains black ever after. Removing
+<pre>
+ inb $0x92, %al #
+ orb $02, %al # "fast A20" version
+ outb %al, $0x92 # some chips have only this
+</pre>
+from <tt>setup.S</tt> solved this. Apparently on his machine
+writing to some of these bits is dangerous and does something
+to the on-board video card (disable it?).
+<p>
+Petr Vandrovec <vandrove@vc.cvut.cz> suggests to do the write
+only when it is really necessary:
+<pre>
+ inb $0x92, %al #
++ testb $02, %al
++ jnz no92
+ orb $02, %al # "fast A20" version
+ outb %al, $0x92 # some chips have only this
++no92:
+</pre>
+Since bit 0 sometimes is write-only, and writing a one there
+causes a reset, it must be a good idea to add the line
+<pre>
+ andb $0xfe, %al
+</pre>
+before the <tt>outb</tt>.
+
+<h3>FreeBSD</h3>
+FreeBSD does
+<pre>
+/*
+ * Gate A20 for high memory
+ */
+void
+gateA20(void)
+{
+#ifdef IBM_L40
+ outb(0x92, 0x2);
+#else IBM_L40
+ while (inb(K_STATUS) & K_IBUF_FUL);
+ while (inb(K_STATUS) & K_OBUF_FUL)
+ (void)inb(K_RDWR);
+
+ outb(K_CMD, KC_CMD_WOUT);
+ while (inb(K_STATUS) & K_IBUF_FUL);
+ outb(K_RDWR, KB_A20);
+ while (inb(K_STATUS) & K_IBUF_FUL);
+#endif IBM_L40
+}
+</pre>
+that is, uses 0x92 only for a IBM_L40 (whatever that may be).
+<p>
+
+<h3>Minix and HIMEM.ASM</h3>
+<a href="xfix-286mode2">Here</a> is a patch fragment for minix.
+It contains the interesting part
+<pre>
+! movb al, #0xff ! Pulse output port
+! outb 0x64
+! call kb_wait ! Wait for the A20 line to settle down
+</pre>
+from some old HIMEM.ASM source (that one still can find on the net).
+I have seen no other places where command 0xff is described as
+doing something useful.
+
+<h2>Access of 0xee</h2>
+On some systems reading ioport 0xee enables A20, and writing it
+disables A20. (Or, sometimes, this action only occurs when ioport
+0xee is enabled.) And similar things hold for ioport 0xef and
+reset (a write causes a reset).
+<p>
+The i386SL/i486SL documents say
+<pre>
+The following ports are visible only when enabled,
+Any writes to these ports cause the action named.
+Name of Register Address Default Value Where placed Size
+FAST CPU RESET EFh N/A 82360SL 8
+FAST A20 GATE EEh N/A 82360SL 8
+</pre>
+<p>
+The AMD Elan SC400 docs
+(<a href="http://www.amd.com/products/epd/processors/4.32bitcont/13.lan4xxfam/22.lansc400/a21032/21032.pdf">21032.pdf</a>) say:
+<i>
+Register EEh can be used to cause the same type of masking of the CPU
+A20 signal that was historically performed by an external SCP (System
+Control Processor) in a PC/AT Compatible system, but much faster. This
+control defaults to not forcing the propagation of A20:
+Dummy Read = Returns FFh, and forces the A20 signal to propagate.
+Dummy Write = Deasserts the forcing of the propagation of the A20 signal
+via this particular control, data value written is N/A.
+For software compatibility and other reasons, there are several sources
+of GateA20 control. These controls are effectively ORed together with
+the output of the OR gate driving the Enhanced Am486 microprocessor
+A20M pin. Therefore, A20 will propagate if ANY of the independent sources
+are forcing A20 to propagate.</i>
+<p>
+
+<h2>Other ports</h2>
+It is rumoured that systems exist that use bit 2 of ioport 0x65
+or bit 0 of ioport 0x1f8 for A20 control (0: disabled, 1: enabled).
+Don't know what systems that might be.
+The AT&T 6300+ needs a write of 0x90 to port 0x3f20 to enable
+(and a write of 0x0 to disable) A20.
+
+<h2>Disabling A20</h2>
+It may be necessary to do both the keyboard controller write and
+the 0x92 write (and the 0xee write) to disable A20.
+
+<h2>A20 and reset</h2>
+If (in protected mode) A20 is disabled, the odd megabytes are inaccessible.
+After a reset, execution begins at top-of-memory:
+0xfffff0 on the 286 and 0xfffffff0 on 386 and later.
+With disabled A20 this becomes 0xeffff0 or 0xffeffff0
+and the machine will probably crash, having no memory mapped there.
+
+<h2>A20 and cache</h2>
+One tests A20 by writing something to an address with bit 0x100000 set,
+and seeing whether the corresponding location in low memory changes.
+However, this plan may be thwarted by the cache that remembers the
+old value and doesn't know about A20.
+<p>
+<a href="http://qdn.qnx.com/support/docs/neutrino_qrp/building/startup.html">
+Neutrino</a> describes the following function <tt>x86_enable_a20()</tt>:
+<i>
+Enable address line A20, which is often disabled on many PCs on reset.
+It first checks if address line A20 is enabled and if so returns 0.
+Otherwise, it sets bit 0x02 in port 0x92, which is used by many systems
+as a fast A20 enable. It again checks to see if A20 is enabled and if so
+returns 0. Otherwise, it uses the keyboard microcontroller to enable A20
+as defined by the old PC/AT standard. It again checks to see if A20 is
+enabled and if so returns 0. Otherwise, it returns -1.
+If cpu is a 486 or greater, it issues a <tt>wbinvd</tt> opcode
+to invalidate the cache when doing a read/write test of memory to see
+if A20 is enabled.
+In the rare case where setting bit 0x02 in port 0x92 may affect
+other hardware, you can skip this by setting <tt>only_keyboard</tt> to 1.
+In this case, it will attempt to use only the keyboard microcontroller.
+</i>
+<p>
+hpa comments: <i>As far as I know the only machines which have the cache
+problem are i386 boxen, but the i386 doesn't have WBINVD. The i486
+has a pin on the CPU for A20, which takes effect inside the L1 cache,
+and so it shouldn't have any A20 cache issues.</i>
+
+</body>
+</html>
diff --git a/doc/A20/xfix-286mode2 b/doc/A20/xfix-286mode2
new file mode 100644
index 0000000..3e5e762
--- /dev/null
+++ b/doc/A20/xfix-286mode2
@@ -0,0 +1,143 @@
+
+The following is edited from several messages from Kees Bot dated May 4
+and 5, 1998.
+
+From: Kees J Bot <kjb=731391@CS.VU.NL>
+Subject: Re: 286 protected mode patch
+
+Below is a patch to klib88.s for the changes I made after I got hold of
+HIMEM.ASM, a somewhat old source of HIMEM.SYS. The A20 en/disable code
+is a bit better for the AT, and I also added code to en/disable the A20
+line for a PC with an MCA bus, i.e. most PS/2's.
+
+So if any of you is running 16-bit Minix on a machine with an MCA bus
+then this may be for you to get rid of processor=86.
+
+The PS/2 side of the patch is the great unknown, since I don't have a
+PS/2 to test it on. Who knows, maybe someone will tell us if it works
+this time.
+
+Apply the patch like this:
+ cd /usr/src/kernel
+ patch klib88.s klib88.dif
+ cd ../tools
+ make hdboot
+ shutdown -x 'unset processor;boot'
+
+[Please note that this is experimental, there is another patch in this
+directory that attempts to solve the same problems. Neither may be
+correct for every machine. -- asw 12.06.98]
+_._. .._ _ ._ ._.. ___ _. __. _ .... . _.. ___ _ _ . _.. ._.. .. _. .
+*** /save/std/2.0.0/src/kernel/klib88.s Wed Jul 10 20:17:12 1996
+--- klib88.s Mon May 04 12:20:59 1998
+***************
+*** 72,75 ****
+--- 72,76 ----
+ .extern _vid_mask
+ .extern _level0_func
++ .extern _ps_mca
+
+ .text
+***************
+*** 201,205 ****
+ ltr ax ! set TSS register
+
+! movb ah, #0xDF
+ jmp gate_A20 ! enable the A20 address line
+
+--- 202,206 ----
+ ltr ax ! set TSS register
+
+! movb ah, #0x02
+ jmp gate_A20 ! enable the A20 address line
+
+***************
+*** 214,224 ****
+ jae p2r386
+ p2r286:
+! mov _gdt+ES_286_OFFSET+DESC_BASE, #0x0400
+ movb _gdt+ES_286_OFFSET+DESC_BASE_MIDDLE, #0x00
+ mov ax, #ES_286_SELECTOR
+ mov es, ax ! BIOS data segment
+! eseg mov 0x0067, #real ! set return from shutdown address
+ cseg mov ax, kernel_cs
+! eseg mov 0x0069, ax
+ movb al, #0x8F
+ outb 0x70 ! select CMOS byte 0x0F (disable NMI)
+--- 215,225 ----
+ jae p2r386
+ p2r286:
+! mov _gdt+ES_286_OFFSET+DESC_BASE, #0x0000
+ movb _gdt+ES_286_OFFSET+DESC_BASE_MIDDLE, #0x00
+ mov ax, #ES_286_SELECTOR
+ mov es, ax ! BIOS data segment
+! eseg mov 0x0467, #real ! set return from shutdown address
+ cseg mov ax, kernel_cs
+! eseg mov 0x0469, ax
+ movb al, #0x8F
+ outb 0x70 ! select CMOS byte 0x0F (disable NMI)
+***************
+*** 254,273 ****
+ mov sp, save_sp ! restore stack
+
+! movb ah, #0xDD
+ !jmp gate_A20 ! disable the A20 address line
+
+! ! Enable (ah = 0xDF) or disable (ah = 0xDD) the A20 address line.
+ gate_A20:
+ call kb_wait
+ movb al, #0xD1 ! Tell keyboard that a command is coming
+ outb 0x64
+ call kb_wait
+! movb al, ah ! Enable or disable code
+ outb 0x60
+ call kb_wait
+! mov ax, #25 ! 25 microsec delay for slow keyboard chip
+! 0: out 0xED ! Write to an unused port (1us)
+! dec ax
+! jne 0b
+ ret
+ kb_wait:
+--- 255,276 ----
+ mov sp, save_sp ! restore stack
+
+! xorb ah, ah
+ !jmp gate_A20 ! disable the A20 address line
+
+! ! Enable (ah = 0x02) or disable (ah = 0x00) the A20 address line.
+ gate_A20:
++ cmp _ps_mca, #0 ! PS/2 bus?
++ jnz gate_PS_A20
+ call kb_wait
+ movb al, #0xD1 ! Tell keyboard that a command is coming
+ outb 0x64
+ call kb_wait
+! movb al, #0xDD ! 0xDD = A20 disable code if ah = 0x00
+! orb al, ah ! 0xDF = A20 enable code if ah = 0x02
+ outb 0x60
+ call kb_wait
+! movb al, #0xFF ! Pulse output port
+! outb 0x64
+! call kb_wait ! Wait for the A20 line to settle down
+ ret
+ kb_wait:
+***************
+*** 275,278 ****
+--- 278,293 ----
+ testb al, #0x02 ! Keyboard input buffer full?
+ jnz kb_wait ! If so, wait
++ ret
++
++ gate_PS_A20: ! The PS/2 can twiddle A20 using port A
++ inb 0x92 ! Read port A
++ andb al, #0xFD
++ orb al, ah ! Set A20 bit to the required state
++ outb 0x92 ! Write port A
++ jmp .+2 ! Small delay
++ A20ok: inb 0x92 ! Check port A
++ andb al, #0x02
++ cmpb al, ah ! A20 line settled down to the new state?
++ jne A20ok ! If not then wait
+ ret
+
+
diff --git a/doc/kbd.FAQ-15.html b/doc/kbd.FAQ-15.html
index 17d182b..8fa17b8 100644
--- a/doc/kbd.FAQ-15.html
+++ b/doc/kbd.FAQ-15.html
@@ -141,22 +141,7 @@
These act on the next key pressed. So, where one earlier needed
the 3-symbol sequence Shift_Lock a Shift_Lock to type `A', one
can now use the 2-symbol sequence SShift_Lock a.
-Versions of the kbd package older than 0.93 do not yet include code
-for these sticky modifiers, and have to invoke them
-using their hexadecimal codes. For example,
-<BLOCKQUOTE><CODE>
-<PRE>
- % loadkeys
- keymaps 0-15
- keycode 54 = 0x0c00
- keycode 97 = 0x0c02
- keycode 100 = 0x0c03
- %
-</PRE>
-</CODE></BLOCKQUOTE>
-
-will make the right Shift, Ctrl, Alt sticky versions of the left ones.
-From 0.93 on you can say
+You can say
<BLOCKQUOTE><CODE>
<PRE>
% loadkeys
@@ -168,7 +153,7 @@
</PRE>
</CODE></BLOCKQUOTE>
-to obtain the same result.
+to make the right Shift, Ctrl, Alt sticky versions of the left ones.
This will allow you to type Ctrl-Alt-Del in three keystrokes with one hand.
<P>The keymaps line in these examples should cover all keymaps you have in use.
You find what keymaps you have in use by
@@ -178,6 +163,34 @@
</PRE>
</CODE></BLOCKQUOTE>
<P>
+<P>
+<H2><A NAME="ss15.2">15.2 Sticky keys under <CODE>X</CODE></A>
+</H2>
+
+<P>The following text was contributed by Piotr Mitros.
+<P>XFree86 supports an accessibility option which allows disabled users
+to type single-handed. With sticky keys enabled, the user can hit a
+modifier key (ctrl, alt, shift) followed by another key, rather than
+having to hold the modifier key while hitting the letter.
+<P>To enable sticky keys, first make sure the xkb extension is enabled
+(this is done during initial <CODE>X</CODE> server configuration and is usually
+enabled by default). Next, run the <CODE>X</CODE> server with the <CODE>+accessx</CODE>
+option. If you use <CODE>startx</CODE>, either run <CODE>startx -- +accessx</CODE> or
+add <CODE>+accessx</CODE> to the serverargs line in the <CODE>startx</CODE> script.
+If you use <CODE>xdm</CODE>, add <CODE>+accessx</CODE> to the appropriate server line
+in <CODE>/etc/X11/xdm/Xservers</CODE>.
+<P>It is also possible to enable <CODE>X</CODE> accessibility with some end-user
+utilities with a running <CODE>X</CODE> server.
+<P>Once <CODE>X</CODE> accessibility is enabled, press the shift key five times in a
+row to enable sticky keys. To disable sticky keys, either press the
+shift key five times again, or press a key while holding a modifier
+key.
+<P>XFree86 also supports Slow Keys, Repeat Keys, Bounce Keys and an
+audible bell. <CODE>xkbcomp</CODE> can be used to generate a <CODE>.xkm</CODE> file
+to enable these. The appropriate <CODE>xkbcomp</CODE> commands are listed in
+<CODE>/usr/X11R6/lib/X11/xkb/compat/accessx</CODE>.
+Unfortunately, the exact process is still undocumented.
+<P>
<HR>
<A HREF="kbd.FAQ-16.html">Next</A>
<A HREF="kbd.FAQ-14.html">Previous</A>
diff --git a/doc/kbd.FAQ-2.html b/doc/kbd.FAQ-2.html
index af1b74e..7ef0679 100644
--- a/doc/kbd.FAQ-2.html
+++ b/doc/kbd.FAQ-2.html
@@ -18,9 +18,10 @@
<!--
keyboard!theory of operation
-->
-<P>You press a key, and the keyboard controller sends scancodes to the
-kernel keyboard driver. Some keyboards can be programmed, but usually
-the scancodes corresponding to your keys are fixed.
+<P>You press a key, and the keyboard controller sends
+<A HREF="http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html">scancodes</A>
+to the kernel keyboard driver. Some keyboards can be programmed,
+but usually the scancodes corresponding to your keys are fixed.
The kernel keyboard driver just transmits whatever it receives
to the application program when it is in <EM>scancode mode</EM>,
like when <CODE>X</CODE> is running. Otherwise, it parses the stream of scancodes
diff --git a/doc/kbd.FAQ-8.html b/doc/kbd.FAQ-8.html
index dd7d79b..94e6145 100644
--- a/doc/kbd.FAQ-8.html
+++ b/doc/kbd.FAQ-8.html
@@ -211,6 +211,14 @@
differently placed on English, French and German keyboards, are
not used for actions. (But if your finger slips and you hit L
instead of K - bye bye to your system.)
+<P>In Linux 2.3.13 the possibility to enable/disable SysRq was added.
+<BLOCKQUOTE><CODE>
+<PRE>
+ echo 0 > /proc/sys/kernel/sysrq
+</PRE>
+</CODE></BLOCKQUOTE>
+
+will disable it (if the kernel was compiled with CONFIG_MAGIC_SYSRQ).
<P>
<HR>
<A HREF="kbd.FAQ-9.html">Next</A>
diff --git a/doc/kbd.FAQ.html b/doc/kbd.FAQ.html
index ae65ee1..19dafb2 100644
--- a/doc/kbd.FAQ.html
+++ b/doc/kbd.FAQ.html
@@ -14,7 +14,7 @@
<HR>
<H1>The Linux keyboard and console HOWTO</H1>
-<H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v2.9, 990114
+<H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v2.10, 000208
<P><HR>
<EM>This note contains some information about the Linux keyboard
and console, and the use of non-ASCII characters.
@@ -109,6 +109,7 @@
<UL>
<LI><A HREF="kbd.FAQ-15.html#ss15.1">15.1 `I can use only one finger to type with'</A>
+<LI><A HREF="kbd.FAQ-15.html#ss15.2">15.2 Sticky keys under <CODE>X</CODE></A>
</UL>
<P>
<H2><A NAME="toc16">16.</A> <A HREF="kbd.FAQ-16.html">Changing the video mode</A></H2>
diff --git a/doc/kbd.FAQ.sgml b/doc/kbd.FAQ.sgml
index 8aecfb9..388d0ba 100644
--- a/doc/kbd.FAQ.sgml
+++ b/doc/kbd.FAQ.sgml
@@ -4,7 +4,7 @@
<title>The Linux keyboard and console HOWTO
<author>Andries Brouwer, <tt/aeb@cwi.nl/
-<date>v2.9, 990114
+<date>v2.10, 000208
<abstract>This note contains some information about the Linux keyboard
and console, and the use of non-ASCII characters.
@@ -84,9 +84,11 @@
<sect>Keyboard generalities<p>
<nidx>keyboard!theory of operation</nidx>
-You press a key, and the keyboard controller sends scancodes to the
-kernel keyboard driver. Some keyboards can be programmed, but usually
-the scancodes corresponding to your keys are fixed.
+You press a key, and the keyboard controller sends
+<htmlurl name="scancodes"
+ url="http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html">
+to the kernel keyboard driver. Some keyboards can be programmed,
+but usually the scancodes corresponding to your keys are fixed.
The kernel keyboard driver just transmits whatever it receives
to the application program when it is in <em>scancode mode</em>,
like when <tt/X/ is running. Otherwise, it parses the stream of scancodes
@@ -1004,6 +1006,12 @@
differently placed on English, French and German keyboards, are
not used for actions. (But if your finger slips and you hit L
instead of K - bye bye to your system.)
+<p>
+In Linux 2.3.13 the possibility to enable/disable SysRq was added.
+<tscreen><verb>
+ echo 0 > /proc/sys/kernel/sysrq
+</verb></tscreen>
+will disable it (if the kernel was compiled with CONFIG_MAGIC_SYSRQ).
<sect>How to get out of raw mode<p>
<nidx>raw mode, exiting</nidx>
@@ -1508,19 +1516,7 @@
These act on the next key pressed. So, where one earlier needed
the 3-symbol sequence Shift_Lock a Shift_Lock to type `A', one
can now use the 2-symbol sequence SShift_Lock a.
-Versions of the kbd package older than 0.93 do not yet include code
-for these sticky modifiers, and have to invoke them
-using their hexadecimal codes. For example,
-<tscreen><verb>
- % loadkeys
- keymaps 0-15
- keycode 54 = 0x0c00
- keycode 97 = 0x0c02
- keycode 100 = 0x0c03
- %
-</verb></tscreen>
-will make the right Shift, Ctrl, Alt sticky versions of the left ones.
-From 0.93 on you can say
+You can say
<tscreen><verb>
% loadkeys
keymaps 0-15
@@ -1529,7 +1525,7 @@
keycode 100 = SAlt
%
</verb></tscreen>
-to obtain the same result.
+to make the right Shift, Ctrl, Alt sticky versions of the left ones.
This will allow you to type Ctrl-Alt-Del in three keystrokes with one hand.
The keymaps line in these examples should cover all keymaps you have in use.
@@ -1538,6 +1534,37 @@
% dumpkeys | head -1
</verb></tscreen>
+
+<sect1>Sticky keys under <tt/X/<p>
+The following text was contributed by Piotr Mitros.
+
+XFree86 supports an accessibility option which allows disabled users
+to type single-handed. With sticky keys enabled, the user can hit a
+modifier key (ctrl, alt, shift) followed by another key, rather than
+having to hold the modifier key while hitting the letter.
+
+To enable sticky keys, first make sure the xkb extension is enabled
+(this is done during initial <tt/X/ server configuration and is usually
+enabled by default). Next, run the <tt/X/ server with the <tt/+accessx/
+option. If you use <tt/startx/, either run <tt/startx -- +accessx/ or
+add <tt/+accessx/ to the serverargs line in the <tt/startx/ script.
+If you use <tt/xdm/, add <tt/+accessx/ to the appropriate server line
+in <tt>/etc/X11/xdm/Xservers</tt>.
+
+It is also possible to enable <tt/X/ accessibility with some end-user
+utilities with a running <tt/X/ server.
+
+Once <tt/X/ accessibility is enabled, press the shift key five times in a
+row to enable sticky keys. To disable sticky keys, either press the
+shift key five times again, or press a key while holding a modifier
+key.
+
+XFree86 also supports Slow Keys, Repeat Keys, Bounce Keys and an
+audible bell. <tt/xkbcomp/ can be used to generate a <tt/.xkm/ file
+to enable these. The appropriate <tt/xkbcomp/ commands are listed in
+<tt>/usr/X11R6/lib/X11/xkb/compat/accessx</tt>.
+Unfortunately, the exact process is still undocumented.
+
<sect>Changing the video mode<p>
<nidx>console!changing video modes</nidx>
<nidx>video modes, changing</nidx>
diff --git a/doc/scancodes/scancodes-1.html b/doc/scancodes/scancodes-1.html
index 6b4781d..0d31b1f 100644
--- a/doc/scancodes/scancodes-1.html
+++ b/doc/scancodes/scancodes-1.html
@@ -16,9 +16,10 @@
<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
+(
+<A HREF="scancodes-3.html#kscancodes">Different codes</A> are used by the keyboard
+firmware internally, and there also exist several
+<A HREF="scancodes-3.html#kscancodes">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>
@@ -38,6 +39,8 @@
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.
+(And one gets the expected sequences upon release. But see
+<A HREF="scancodes-2.html#mtek">below</A>.)
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.
@@ -45,21 +48,30 @@
<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>00</B> (Keyboard error - see <B>ff</B>)
<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>fa</B> (Acknowledge from kbd)
<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><B>ff</B> (Keyboard error)<BR>
+Three common causes for keyboard error are:
+(i) several keys pressed simultaneously,
+(ii) keyboard buffer overflow,
+(iii) parity error on the serial line used by keyboard
+and keyboard controller for communication.
+The error reported is <B>ff</B> in
+<A HREF="scancodes-3.html#kscancodes">scancode mode</A> 1,
+and <B>00</B> in scancode modes 2 and 3.
+If translation is on, both <B>00</B> and <B>ff</B>
+are translated as <B>ff</B>.
<P>
<H2><A NAME="ss1.3">1.3 Escape scancodes</A>
</H2>
@@ -193,7 +205,7 @@
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.
+(left or right) Shift is down. They do not react to NumLock.
<P>
<H2><A NAME="ss1.7">1.7 Turbo Mode</A>
</H2>
@@ -207,29 +219,30 @@
<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 <jin@singmail.com> complains that on his Toshiba 4010CDS
+<P>Thio Yu Jin <<CODE>jin@singmail.com</CODE>> 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><A NAME="ss1.8">1.8 Power Saving</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>
+<A HREF="http://www.microsoft.com/HWDEV/specs/PMref/PMinput.htm">Microsoft</A> recommends: "i8042-based keyboards should deploy the
+following scan codes for power management buttons, i.e., POWER and SLEEP
+buttons:
+<P>
+<CENTER><TABLE BORDER><TR><TD>
+<BR>
+</TD><TD> Set-1 make/break </TD><TD> Set-2 make/break </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+Power </TD><TD> <B>e0</B> <B>5e</B> / <B>e0</B> <B>de</B> </TD><TD><B>e0</B> <B>37</B> / <B>e0</B> <B>f0</B> <B>37</B> </TD></TR><TR><TD>
+Sleep </TD><TD> <B>e0</B> <B>5f</B> / <B>e0</B> <B>df</B> </TD><TD><B>e0</B> <B>3f</B> / <B>e0</B> <B>f0</B> <B>3f</B> </TD></TR><TR><TD>
+Wake </TD><TD> <B>e0</B> <B>63</B> / <B>e0</B> <B>e3</B> </TD><TD><B>e0</B> <B>5e</B> / <B>e0</B> <B>f0</B> <B>5e</B> </TD></TR><TR><TD>
+
+</TD></TR></TABLE></CENTER>
+<P>The Power, Sleep, and Wake event scan codes are the i8042 equivalents
+to the System Power Down, System Sleep, and System Wake Up HID usages".
<P>
<HR>
<A HREF="scancodes-2.html">Next</A>
diff --git a/doc/scancodes/scancodes-2.html b/doc/scancodes/scancodes-2.html
index 79280df..460f44a 100644
--- a/doc/scancodes/scancodes-2.html
+++ b/doc/scancodes/scancodes-2.html
@@ -16,11 +16,37 @@
<P>
<P>
-<H2><A NAME="ss2.1">2.1 Focus KeyPro FK-9000 keyboard</A>
+<H2><A NAME="ss2.1">2.1 Cherry G80-0777</A>
</H2>
-<P>Raul D. Miller <rockwell@nova.umd.edu>
-and <hagmanti@cps.msu.edu> report:
+<P>According to
+<A HREF="http://titan.informatik.uni-bonn.de/~frinke/FreeKEYB/kbdinfo.html">FreeKEYB/kbdinfo.html</A>
+this keyboard has five additional keys with scancodes
+<B>55</B> (F11), <B>56</B> (F12),
+<B>57</B> (F13), <B>58</B> (F14), <B>59</B> (F15).
+<P>
+<H2><A NAME="ss2.2">2.2 Amstrad/Schneider PC1512</A>
+</H2>
+
+<P>This keyboard has a Del key on the keypad, and both Del-> and Del<- keys
+above the Enter key. The Del-> key has scancode <B>70</B>.
+There is an additional Enter key with scancode <B>74</B>.
+It is possible to connect a mouse and/or joystick to the keyboard,
+and then these devices also yield scancodes:
+<B>77</B> (joystick button 1), <B>78</B> (joystick button 2),
+<B>79</B> (joystick right), <B>7a</B> (joystick left),
+<B>7b</B> (joystick up), <B>7c</B> (joystick down),
+<B>7d</B> (mouse right), <B>7e</B> (mouse left).
+The Amstrad keyboard is entirely incompatible with XT and AT keyboards,
+and can be used only on an Amstrad; conversely, no other keyboard will
+work on an older Amstrad.
+<P>
+<H2><A NAME="ss2.3">2.3 Focus KeyPro FK-9000 keyboard</A>
+</H2>
+
+<P>Raul D. Miller <<CODE>rockwell@nova.umd.edu</CODE>>
+and Timothy C. Hagman <<CODE>hagmanti@cps.msu.edu</CODE>>
+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>
@@ -73,13 +99,16 @@
when released, just like a normal key.</I>
<P>
<P>
-<H2><A NAME="ss2.2">2.2 BTC keyboard</A>
+<H2><A NAME="ss2.4">2.4 BTC keyboard</A>
</H2>
<P>This keyboard has one additional key, with escaped scancode
-<B>e0</B> <B>6f</B> (Macro).
+<B>e0</B> <B>6f</B> (Macro). (Funny enough it does this
+in all modes, each of the three scancode sets, translated or not.
+In particular, this Macro key is the only key that generates
+two bytes in scancode mode 3.)
<P>
-<H2><A NAME="ss2.3">2.3 LK450 keyboard</A>
+<H2><A NAME="ss2.5">2.5 LK450 keyboard</A>
</H2>
<P>This keyboard has six additional keys, with escaped scancodes
@@ -90,32 +119,39 @@
<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><A NAME="ss2.6">2.6 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><A NAME="ss2.7">2.7 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><A NAME="ss2.8">2.8 A Japanese 86/106 keyboard</A>
</H2>
-<P>Barry Yip <g609296@cc.win.or.jp> reports:
+<P>Barry Yip <<CODE>g609296@cc.win.or.jp</CODE>> 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><A NAME="ss2.9">2.9 Trust Ergonomic keyboard</A>
</H2>
-<P>Arnaldo Moura <lumbago@vnet.ibm.com> reports:
+<P>Frank v Waveren <<CODE>fvw@var.cx</CODE>> reports:
+The Trust Ergo Track keyboard has one additional key (`application key'), with
+escaped scancode <B>e0</B> <B>68</B>. The keycap is a triangle pointing left.
+<P>
+<H2><A NAME="ss2.10">2.10 Brazilian keyboard</A>
+</H2>
+
+<P>Arnaldo Moura <<CODE>lumbago@vnet.ibm.com</CODE>> 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
@@ -128,10 +164,10 @@
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><A NAME="ss2.11">2.11 RC930 keyboard</A>
</H2>
-<P>Torben Fjerdingstad <tfj@olivia.ping.dk> reports:
+<P>Torben Fjerdingstad <<CODE>tfj@olivia.ping.dk</CODE>> 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),
@@ -142,10 +178,10 @@
problem with fast typists, writing over 400 chars/minute.
Writing 'af<space>', 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><A NAME="prefix_80"></A> <A NAME="ss2.12">2.12 Tandberg Data keyboard</A>
</H2>
-<P>Kjetil Torgrim Homme <kjetilho@ifi.uio.no> reports:
+<P>Kjetil Torgrim Homme <<CODE>kjetilho@ifi.uio.no</CODE>> 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>,
@@ -158,22 +194,66 @@
<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>Harald Arnesen <<CODE>gurre@start.no</CODE>> gives the keycaps
+for these for the Tandberg TDV5020 keyboard.
+All use prefix <B>80</B> on both press and release.
+<P>Thirteen keys have (Norwegian) text:
+<B>11</B> HJELP (help), <B>14</B> STRYK (cut),
+<B>16</B> KOPI (copy), <B>17</B> FLYTT (move),
+<B>19</B> JUST (justify), <B>21</B> MERK (mark),
+<B>22</B> ANGRE (undo), <B>23</B> SKRIV (print),
+<B>25</B> SLUTT (exit), <B>26</B> FELT (field),
+<B>2f</B> AVSN (paragraph), <B>30</B> SETN (sentence),
+and <B>32</B> ORD (word).
+<P>Seven keys have symbols: <B>12</B> /\/\/\ (insert soft hyphen),
+<B>13</B> [Crossed down-arrow] (move down five lines),
+<B>18</B> >> << (justify left/right),
+<B>1e</B> <> >< (justify full/center),
+<B>1f</B> |<- (backtab),
+<B>20</B> ->| (tab), and
+<B>56</B> [Back/down arrow] (start new paragraph).
+<P>Other keycaps also occur. Those given above were meant
+for use with the Notis WP word processor.
<P>
-<H2><A NAME="ss2.10">2.10 A keyboard</A>
+<H2><A NAME="ss2.13">2.13 A Chinese 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>Bruno Haible <<CODE>haible@ilog.fr</CODE>> reports:
+The keyboard has three keys <B>e0</B> <B>5e</B> (Power),
+<B>e0</B> <B>5f</B> (Sleep), <B>e0</B> <B>63</B> (WakeUp)
+in the following positions:
<P>
-<H2><A NAME="ss2.11">2.11 Microsoft Natural keyboard</A>
+<P>
+<CENTER><TABLE BORDER><TR><TD>
+<BR>
+</TD><TD> F10 F11 F12 </TD><TD> Power </TD><TD> Sleep </TD><TD> WakeUp </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+..</TD><TD> Backspace </TD><TD> PrtScr </TD><TD> ScrLck </TD><TD> Pause </TD></TR><TR><TD>
+..</TD><TD> Return </TD><TD> Ins </TD><TD> Home </TD><TD> PgUp </TD></TR><TR><TD>
+..</TD><TD> Return </TD><TD> Del </TD><TD> End </TD><TD> PgDn </TD></TR><TR><TD>
+
+</TD></TR></TABLE></CENTER>
+<P>
+<H2><A NAME="ss2.14">2.14 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).
+The kscancodes (see
+<A HREF="scancodes-3.html#kscancodes">below</A>)
+are <B>e0</B> <B>1f</B>, <B>e0</B> <B>27</B> and
+<B>e0</B> <B>2f</B>, respectively.
+The USB key codes are usage page 0x07, usage index 227, 231, 101
+(decimal), respectively.
+Microsoft
+<A HREF="http://www.microsoft.com/hwdev/download/desinit/scancode.zip">describes</A>
+the intended use in detail. Both Windows keys are intended to be
+used as modifier keys, like both shift and control and alt keys.
+The Menu key may be modified by shift etc.
<P>
-<H2><A NAME="ss2.12">2.12 Microsoft Internet keyboard</A>
+<H2><A NAME="ss2.15">2.15 Microsoft Internet keyboard</A>
</H2>
<P>In addition to the three extra keys on the Microsoft Natural keyboard,
@@ -188,36 +268,239 @@
<B>e0</B> <B>6a</B> (Back),
<B>e0</B> <B>6b</B> (My Computer),
<B>e0</B> <B>6c</B> (Mail).
+The kscancodes (see
+<A HREF="scancodes-3.html#kscancodes">below</A>) are
+<B>e0</B> <B>2b</B>, <B>e0</B> <B>3a</B>,
+<B>e0</B> <B>3f</B>, <B>e0</B> <B>10</B>,
+<B>e0</B> <B>18</B>, <B>e0</B> <B>28</B>,
+<B>e0</B> <B>30</B>, <B>e0</B> <B>38</B>,
+<B>e0</B> <B>40</B>, <B>e0</B> <B>48</B>,
+respectively.
<P>
-<H2><A NAME="ss2.13">2.13 Logitech Internet keyboard</A>
+<H2><A NAME="ss2.16">2.16 Microsoft Natural keyboard pro</A>
</H2>
-<P>Jonathan DeBoer <deboer@ugrad.cs.ualberta.ca>
-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>Marco Melgazzi <<CODE>marco@techie.com</CODE>> reports:
+The Microsoft Natural keyboard pro has 19 additional keys,
+with escaped scancodes
+<B>e0</B> <B>6a</B> (Back),
+<B>e0</B> <B>69</B> (Forward),
+<B>e0</B> <B>68</B> (Stop),
+<B>e0</B> <B>67</B> (Refresh),
+<B>e0</B> <B>65</B> (Search),
+<B>e0</B> <B>66</B> (Favorites),
+<B>e0</B> <B>32</B> (Web/Home),
+<B>e0</B> <B>6c</B> (Mail),
+<B>e0</B> <B>20</B> (Mute),
+<B>e0</B> <B>2e</B> (Volume -),
+<B>e0</B> <B>30</B> (Volume +),
+<B>e0</B> <B>22</B> (Play/Pause),
+<B>e0</B> <B>24</B> (Stop),
+<B>e0</B> <B>10</B> (Prev Track),
+<B>e0</B> <B>19</B> (Next Track),
+<B>e0</B> <B>6d</B> (Media),
+<B>e0</B> <B>6b</B> (My Computer),
+<B>e0</B> <B>21</B> (Calculator),
+<B>e0</B> <B>5f</B> (Sleep).
+(That is, we have the ten extra keys of the Microsoft Internet keyboard,
+with the same scancodes, and also Refresh, Mute, Volume -, Volume +,
+Play/Pause, Stop, Prev Track, Next Track, Media.)
<P>
-<H2><A NAME="e0_as_key"></A> <A NAME="ss2.14">2.14 A keyboard using e0 as ordinary scancode</A>
+<H2><A NAME="ss2.17">2.17 Logitech Internet keyboard</A>
</H2>
-<P>Benjamin Carter <bcarter@ultra5.cs.umr.edu> reports:
+<P>Jonathan DeBoer <<CODE>deboer@ugrad.cs.ualberta.ca</CODE>> reports:
+This keyboard has 18 unusual keys.
+<P><B>e0</B> <B>7a</B> (WWW),
+<B>e0</B> <B>32</B> (History),
+<B>e0</B> <B>21</B> (Open URL),
+<B>e0</B> <B>23</B> (Home),
+<B>38</B> <B>2a</B> <B>0f</B> <B>8f</B> (key press)
+<B>8f</B> <B>b8</B> <B>aa</B> (key release) (Send To Back) -
+this sequence simulates Alt+Shift+Tab, but contains two Tab releases,
+<B>e0</B> <B>17</B> (Print),
+<B>e0</B> <B>10</B> (Back),
+<B>e0</B> <B>22</B> (Forward),
+<B>e0</B> <B>24</B> (Stop),
+<B>e0</B> <B>19</B> (Refresh),
+<B>e0</B> <B>1e</B> (Search),
+<B>e0</B> <B>12</B> (Find),
+<B>e0</B> <B>26</B> (Add Favourite),
+<B>e0</B> <B>18</B> (Open Favourites),
+<B>e0</B> <B>20</B> (Hot Links),
+<B>e0</B> <B>30</B> (Scroll Up),
+<B>e0</B> <B>2e</B> (Scroll Down),
+<B>e0</B> <B>25</B> (Logitech).
+<P>
+<P>Ryan Lortie <<CODE>desertangel@globalserve.net</CODE>> writes:
+The "Logitech" key is used as a modifier.
+In windows, Logitech-Keypad+ increases volume, Logitech-Keypad- decreases.
+There is a conjoined dual-button key for "scroll".
+You press the top part to scroll up, the bottom to scroll down.
+<P>
+<H2><A NAME="ss2.18">2.18 Compaq Armada laptop keyboard</A>
+</H2>
+
+<P>Christian Gennerat <<CODE>christian.gennerat@vz.cit.alcatel.fr</CODE>> writes:
+There are 4 extra keys on the Compaq Armada laptops.
+The four keys are located over the Esc-F1..F12, and are labelled *1-*4.
+Scancodes: <B>65</B>, <B>67</B>, <B>69</B>, <B>6b</B>.
+<P>
+<H2><A NAME="ss2.19">2.19 Rapid Access keyboard</A>
+</H2>
+
+<P>Dennis Bjorklund <<CODE>dennisb@cs.chalmers.se</CODE>> writes:
+<P>I have a Rapid Access keyboard with some (14) extra buttons and
+two more leds then a normal pc keyboard. To activate the extra buttons
+one has to send the sequence <B>ea</B> <B>71</B>
+to the keyboard. Once that is done the extra keys generate normal
+e0xx sequences. To turn off the extra keys you send <B>ea</B> <B>70</B>.
+<P>There are 14 keys:
+<P><B>e0</B> <B>25</B> (Suspend),
+<B>e0</B> <B>26</B> (Help),
+<B>e0</B> <B>32</B> (Prg 1),
+<B>e0</B> <B>17</B> (Prg 2),
+<B>e0</B> <B>30</B> (Prg 3),
+<B>e0</B> <B>2e</B> (Prg 4),
+<B>e0</B> <B>19</B> (Play CD),
+<B>e0</B> <B>24</B> (CD Stop),
+<B>e0</B> <B>22</B> (CD Pause),
+<B>e0</B> <B>1e</B> (Vol -),
+<B>e0</B> <B>29</B> (Vol +),
+<B>e0</B> <B>23</B> (Prev song),
+<B>e0</B> <B>21</B> (Next song),
+<B>e0</B> <B>12</B> (Mute).
+<P>
+<P>The Suspend and Mute buttons have extra leds on them.
+These are controlled by the sequence <B>eb</B> <B>00</B> <B>xx</B>
+where the <B>xx</B> controls the leds. Bit 2 controls the Suspend led and
+bit 5 controls the Mute led.
+<P>
+<H2><A NAME="ss2.20">2.20 Rapid Access II keyboard</A>
+</H2>
+
+<P>John Elliott <<CODE>jce@seasip.demon.co.uk</CODE>> writes:
+<P>I have an IBM Rapid Access II keyboard (UK layout), which seems to
+generate codes that are similar - but not identical - to the Rapid Access
+keycodes listed above.
+<P>Keys:
+<P><B>e0</B> <B>25</B> (Green, "Internet"),
+<B>e0</B> <B>26</B> (Blue, "Internet shopping"),
+<B>e0</B> <B>32</B> (Yellow, "IBM Web support"),
+<B>e0</B> <B>17</B> (Purple),
+<B>e0</B> <B>30</B> (Red),
+<B>e0</B> <B>2e</B> (Cyan, "Help"),
+<B>e0</B> <B>5f</B> (White, "Standby" - has a LED),
+<B>e0</B> <B>20</B> (CD stop),
+<B>e0</B> <B>22</B> (CD play),
+<B>e0</B> <B>24</B> (CD back),
+<B>e0</B> <B>12</B> (CD fwd),
+<B>e0</B> <B>21</B> (Volume D),
+<B>e0</B> <B>23</B> (Volume U),
+<B>e0</B> <B>1e</B> (Mute - no LED).
+<P>
+<P>There are also "back" and "forward" keys (one could think of them as
+"page left" and "page right" :-) ). They generate ALT+left and ALT+right
+respectively: <B>38</B> <B>e0</B> <B>4b</B> and
+<B>38</B> <B>e0</B> <B>4d</B>.
+<P>
+<P>
+<H2><A NAME="ss2.21">2.21 Chicony KBP-8993 keyboard</A>
+</H2>
+
+<P>Matthijs Melchior <<CODE>mmelchio@xs4all.nl</CODE>> reports:
+<P>The Chicony KBP-8993 keyboard is similar. It has 14 additional
+keys, enabled by sending <B>ea</B> <B>71</B> and disabled
+by sending <B>ea</B> <B>70</B>.
+<P>These keys generate the following scan codes:
+<P><B>e0</B> <B>25</B> (Moon),
+<B>e0</B> <B>32</B> (WWW),
+<B>e0</B> <B>30</B> (DOS),
+<B>e0</B> <B>17</B> (MyDoc),
+<B>e0</B> <B>26</B> (Menu),
+<B>e0</B> <B>1e</B> (zzZ),
+<B>e0</B> <B>2e</B> (Close),
+<B>e0</B> <B>24</B> (Stop),
+<B>e0</B> <B>23</B> (Back),
+<B>e0</B> <B>22</B> (Play),
+<B>e0</B> <B>21</B> (Forward),
+<B>e0</B> <B>20</B> (Mute),
+<B>e0</B> <B>12</B> (VolDown),
+<B>e0</B> <B>19</B> (VolUp).
+<P>The two extra leds, above the Moon key, and next to the zzZ key
+are manipulated by sending: <B>eb</B> <B>00</B> <B>0x</B>,
+where bit 0 is the Moon led and bit 1 is the zzZ led.
+<P>
+<H2><A NAME="ss2.22">2.22 Logitech Cordless Desktop Pro keyboard</A>
+</H2>
+
+<P>Nick Rusnov <<CODE>nick@grawk.net</CODE>> reports:
+<P>The special buttons on a Logitech Cordless Desktop Pro keyboard
+produce the following scancodes:
+<P><B>e0</B> <B>5f</B> (Moon (sleep)),
+<B>e0</B> <B>32</B> (Homepage),
+<B>e0</B> <B>6c</B> (Mail),
+<B>e0</B> <B>65</B> (Search),
+<B>e0</B> <B>66</B> (runningguuy),
+<B>e0</B> <B>20</B> (Mute),
+<B>e0</B> <B>2e</B> (VolDown),
+<B>e0</B> <B>30</B> (VolUp),
+<B>e0</B> <B>22</B> (Play/Pause),
+<B>e0</B> <B>24</B> (Stop),
+<B>e0</B> <B>10</B> (Rewind),
+<B>e0</B> <B>19</B> (ff),
+<B>e0</B> <B>21</B> (Logitech).
+<P>
+<H2><A NAME="ss2.23">2.23 Keyboards for HP Kayak and Vectra</A>
+</H2>
+
+<P>Fons Rademakers <<CODE>Fons.Rademakers@cern.ch</CODE>> writes:
+<P><I>The electronics for this keyboard was first developed by HP's
+Home Products Division (HPD).
+They now make improved versions, which I don't know much about.
+We (HP Corporate PC Divisions, in Grenoble) reused the electronics,
+and changed the serigraphy printed on the keys.</I>
+<P>
+<CENTER><TABLE BORDER><TR><TD>
+<BR>
+</TD><TD>Msg</TD><TD>TTl</TD><TD>WWW</TD><TD> ? </TD><TD>Lck</TD><TD> </TD><TD></TD><TD>Msg</TD><TD>Phn</TD><TD>WWW</TD><TD>xxx</TD><TD>Slp</TD><TD> </TD><TD></TD><TD>133</TD><TD>134</TD><TD>135</TD><TD>136</TD><TD>137</TD><TD> </TD></TR><TR><TD>
+</TD><TD>Phn</TD><TD>S3 </TD><TD>S4 </TD><TD>S5 </TD><TD> i </TD><TD> </TD><TD></TD><TD><<</TD><TD>>||</TD><TD>[] </TD><TD>>> </TD><TD>HP </TD><TD> </TD><TD></TD><TD>138</TD><TD>139</TD><TD>140</TD><TD>141</TD><TD>142</TD><TD> </TD></TR><TR><TD>
+</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>Mut</TD><TD> </TD><TD></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>Mut</TD><TD> </TD><TD></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>143</TD><TD> </TD></TR><TR><TD>
+</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>Vl+</TD><TD> </TD><TD></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>Vl+</TD><TD> </TD><TD></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>144</TD><TD> </TD></TR><TR><TD>
+</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>VL-</TD><TD> </TD><TD></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>VL-</TD><TD> </TD><TD></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD>145</TD><TD> </TD></TR><TR><TD>
+
+<CAPTION>Grenoble keyboard ------- Old HPD keyboard -------- key numbers</CAPTION>
+</TD></TR></TABLE></CENTER>
+<P>
+<P>
+<CENTER><TABLE BORDER><TR><TD>
+<BR>
+</TD><TD> Key# </TD><TD> Scancode </TD><TD> Gren. Name </TD><TD> HPD name </TD><TD> ASCII </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+</TD><TD> 133 </TD><TD> <B>e0 1e</B> </TD><TD> Message/SC1 </TD><TD> Message </TD><TD> a </TD></TR><TR><TD>
+</TD><TD> 134 </TD><TD> <B>e0 12</B> </TD><TD> Top Tools </TD><TD> Phone </TD><TD> e </TD></TR><TR><TD>
+</TD><TD> 135 </TD><TD> <B>e0 32</B> </TD><TD> Web Browser </TD><TD> Internet </TD><TD> m </TD></TR><TR><TD>
+</TD><TD> 136 </TD><TD> <B>e0 17</B> </TD><TD> Reminder </TD><TD> Shortcut </TD><TD> i </TD></TR><TR><TD>
+</TD><TD> 137 </TD><TD> <B>e0 25</B> </TD><TD> Lock </TD><TD> Suspend </TD><TD> k </TD></TR><TR><TD>
+</TD><TD> 138 </TD><TD> <B>e0 23</B> </TD><TD> Phone/SC2 </TD><TD> << </TD><TD> h </TD></TR><TR><TD>
+</TD><TD> 139 </TD><TD> <B>e0 22</B> </TD><TD> ShortCut 3 </TD><TD> >|| </TD><TD> g </TD></TR><TR><TD>
+</TD><TD> 140 </TD><TD> <B>e0 24</B> </TD><TD> ShortCut 4 </TD><TD> [] </TD><TD> j </TD></TR><TR><TD>
+</TD><TD> 141 </TD><TD> <B>e0 21</B> </TD><TD> ShortCut 5 </TD><TD> >> </TD><TD> f </TD></TR><TR><TD>
+</TD><TD> 142 </TD><TD> <B>e0 26</B> </TD><TD> Information </TD><TD> Information </TD><TD> l </TD></TR><TR><TD>
+</TD><TD> 143 </TD><TD> <B>e0 20</B> </TD><TD> Mute </TD><TD> Mute </TD><TD> d </TD></TR><TR><TD>
+</TD><TD> 144 </TD><TD> <B>e0 30</B> </TD><TD> Volume + </TD><TD> Volume + </TD><TD> b </TD></TR><TR><TD>
+</TD><TD> 145 </TD><TD> <B>e0 2e</B> </TD><TD> Volume - </TD><TD> Volume - </TD><TD> c </TD></TR><TR><TD>
+
+</TD></TR></TABLE></CENTER>
+<P><I>Note the scancodes above are those read by x86 software in port 0x60.
+This is also called Scancode Set 1.
+Break codes are the same, with bit 7 of the second scancode set.
+Example:</I> <B>e0 9e</B> <I>for the Message key.</I>
+<P>
+<H2><A NAME="e0_as_key"></A> <A NAME="ss2.24">2.24 A keyboard using e0 as ordinary scancode</A>
+</H2>
+
+<P>Benjamin Carter <<CODE>bcarter@ultra5.cs.umr.edu</CODE>> 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
@@ -296,15 +579,15 @@
<B>7e</B> (Keypad ,).
<P>
<P>There are more keyboards that do not use <B>e0</B> as escape code.
-For example, Paul Schulz <pauls@caemrad.com.au>
+For example, Paul Schulz <<CODE>pauls@caemrad.com.au</CODE>>
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><A NAME="ss2.25">2.25 IBM ThinkPad</A>
</H2>
-<P>George Staikos <staikos@0wned.org> writes:
+<P>George Staikos <<CODE>staikos@0wned.org</CODE>> writes:
<P><I>I have an IBM ThinkPad i1460. It has the IBM EasyLaunch<tm> keys.
These are four multicoloured keys up at the top of the keyboard
for "Home Page", "Search", "Shop", "Mail". They dont' seem to create
@@ -313,14 +596,38 @@
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><A NAME="ss2.26">2.26 A keyboard</A>
+</H2>
+
+<P>Jon Masters <<CODE>jonathan@easypenguin.co.uk</CODE>> writes:
+<P><I>My new 121 key keyboard has 105 keys + 16 multimedia keys
+(including cool stuff like a volume jog dial that sends one scancode
+when turned one way and anther when turned the opposite way).</I>
+<P><B>e0</B> <B>5e</B> (Power Off),
+<B>e0</B> <B>5f</B> (Sleep),
+<B>e0</B> <B>63</B> (Resume),
+<B>e0</B> <B>2e</B> (Help),
+<B>e0</B> <B>20</B> (My Favourite),
+<B>e0</B> <B>30</B> (Browser),
+<B>e0</B> <B>32</B> (WWW Search),
+<B>e0</B> <B>26</B> (Shortcut),
+<B>e0</B> <B>25</B> (Volume Down),
+<B>e0</B> <B>1e</B> (Volume Up),
+<B>e0</B> <B>12</B> (Mute),
+<B>e0</B> <B>22</B> (Previous),
+<B>e0</B> <B>10</B> (Stop),
+<B>e0</B> <B>24</B> (Next),
+<B>e0</B> <B>21</B> (Eject),
+<B>e0</B> <B>19</B> (Play).
+<P>
+<H2><A NAME="ss2.27">2.27 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 <fray@kernel.crashing.org> wrote:
+<P>Mark Hatle <<CODE>fray@kernel.crashing.org</CODE>> 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
@@ -341,6 +648,21 @@
<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>
+<H2><A NAME="ss2.28">2.28 A keyboard treating PrtSc/SysRq like Pause/Break</A>
+</H2>
+
+<P>
+<A NAME="mtek"></A>
+Mike A. Harris <<CODE>mharris@meteng.on.ca</CODE>>
+reports a keyboard (an "Mtek" keyboard, model "K208")
+where PrtSc/SysRq behaves like Pause/Break and also sends both make
+and break sequences when pressed and nothing when released.
+It does not repeat.
+(Thus, he gets <B>e0</B> <B>2a</B> <B>e0</B> <B>37</B>
+<B>e0</B> <B>b7</B> <B>e0</B> <B>aa</B> for PrtSc press,
+and <B>54</B> <B>d4</B> for SysRq (i.e., Alt+PrtSc).)
+<P>
+<P>
<HR>
<A HREF="scancodes-3.html">Next</A>
<A HREF="scancodes-1.html">Previous</A>
diff --git a/doc/scancodes/scancodes-3.html b/doc/scancodes/scancodes-3.html
index 7adc63e..b4082eb 100644
--- a/doc/scancodes/scancodes-3.html
+++ b/doc/scancodes/scancodes-3.html
@@ -2,24 +2,162 @@
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>Keyboard scancodes: Reporting</TITLE>
+ <TITLE>Keyboard scancodes: Keyboard-internal scancodes</TITLE>
+ <LINK HREF="scancodes-4.html" REL=next>
<LINK HREF="scancodes-2.html" REL=previous>
<LINK HREF="scancodes.html#toc3" REL=contents>
</HEAD>
<BODY>
-Next
+<A HREF="scancodes-4.html">Next</A>
<A HREF="scancodes-2.html">Previous</A>
<A HREF="scancodes.html#toc3">Contents</A>
<HR>
-<H2><A NAME="s3">3. Reporting</A></H2>
+<H2><A NAME="kscancodes"></A> <A NAME="s3">3. Keyboard-internal scancodes</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>
+<H2><A NAME="ss3.1">3.1 Three scancode sets</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>Set 1 contains the values that the XT keyboard (with only one set
+of scancodes) produced, with extensions for new keys. Someone
+decided that another numbering was more logical and invented
+scancode Set 2. However, it was realized that new scancodes
+would break old programs, so the keyboard output was fed to a
+8042 microprocessor on the motherboard that could translate Set 2
+back into Set 1. Indeed a smart construction. This is the default today.
+Finally there is the PS/2 version, Set 3, used by nobody.
+<P>Sets 2 and 3 are designed to be translated by the 8042.
+Set 1 should not be translated.
+<P>Not all keyboards support all scancode sets. For example, my MyCom
+laptop only supports scancode Set 2, and its keyboard does not react
+at all when in mode 1 or 3.
+<P>
+<H2><A NAME="ss3.2">3.2 Make and Break codes</A>
+</H2>
+
+<P>The key press / key release is coded as follows:
+For Set 1, if the make code of a key is <I>c</I>, the break code
+will be <I>c</I>+0x80. If the make code is <B>e0</B> <I>c</I>,
+the break code will be <B>e0</B> <I>c</I>+0x80.
+The Pause key has make code <B>e1</B> <B>1d</B> <B>45</B>
+<B>e1</B> <B>9d</B> <B>c5</B> and does not generate a break code.
+For Set 2, if the make code of a key is <I>c</I>, the break code
+will be <B>f0</B> <I>c</I>. If the make code is <B>e0</B> <I>c</I>,
+the break code will be <B>e0</B> <B>f0</B> <I>c</I>.
+The Pause key has make code <B>e1</B> <B>14</B> <B>77</B>
+<B>e1</B> <B>f0</B> <B>14</B> <B>f0</B> <B>77</B>.
+For Set 3, by default most keys do not generate a break code - only CapsLock,
+LShift, RShift, LCtrl and LAlt do.
+(On Microsoft keyboards, also LWin, RWin, Menu, Back, Forward, Stop,
+Mail, Search, Favorites, Web/Home, MyComputer, Calculator, Sleep do.
+On a BTC keyboard, also the Macro key does.)
+However, in Scancode Mode 3 it is possible to enable or disable key repeat
+and the production of break codes either on a key-by-key basis
+or for all keys at once.
+And just like for Set 2, key release is indicated by a <B>f0</B> prefix
+in those cases where it is indicated.
+There is nothing special with the Pause key in scancode mode 3.
+<P>
+<H2><A NAME="ss3.3">3.3 Translation</A>
+</H2>
+
+<P>The 8042 microprocessor translates the incoming byte stream produced
+by the keyboard, and turns an <B>f0</B> prefix into an OR with
+<B>80</B> for the next byte.
+<A NAME="contagious"></A>
+(Some implementations do this for the next byte that does not have
+this bit set already. A consequence is that in Set 3 the keys with Set-3
+value 0x80 or more are broken in a peculiar way: hitting such a key and
+then some other key turns the make code for this last key into a break code.
+For example the Sleep key on a Microsoft Internet keyboard generates
+<B>54</B> / <B>d4</B> for press/release. But pressing and
+releasing first Menu and then Sleep produces
+<B>8d</B> <B>8d</B> <B>d4</B> <B>d4</B> as translation of
+<B>8d</B> <B>f0</B> <B>8d</B> <B>54</B> <B>f0</B> <B>54</B>.
+Other implementations are OK.)
+<P>Unless told not to translate, the keyboard controller translates
+kscancodes into scancodes using the following table (in hex):
+<P>
+<P>
+<CENTER><TABLE BORDER><TR><TD>
+<BR>
+</TD><TD> 00 </TD><TD> 01 </TD><TD> 02 </TD><TD> 03 </TD><TD> 04 </TD><TD> 05 </TD><TD> 06 </TD><TD> 07 </TD><TD> 08 </TD><TD> 09 </TD><TD> 0a </TD><TD> 0b </TD><TD> 0c </TD><TD> 0d </TD><TD> 0e </TD><TD> 0f </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+00 </TD><TD> ff </TD><TD> 43 </TD><TD> 41 </TD><TD> 3f </TD><TD> 3d </TD><TD> 3b </TD><TD> 3c </TD><TD> 58 </TD><TD> 64 </TD><TD> 44 </TD><TD> 42 </TD><TD> 40 </TD><TD> 3e </TD><TD> 0f </TD><TD> 29 </TD><TD> 59 </TD></TR><TR><TD>
+10 </TD><TD> 65 </TD><TD> 38 </TD><TD> 2a </TD><TD> 70 </TD><TD> 1d </TD><TD> 10 </TD><TD> 02 </TD><TD> 5a </TD><TD> 66 </TD><TD> 71 </TD><TD> 2c </TD><TD> 1f </TD><TD> 1e </TD><TD> 11 </TD><TD> 03 </TD><TD> 5b </TD></TR><TR><TD>
+20 </TD><TD> 67 </TD><TD> 2e </TD><TD> 2d </TD><TD> 20 </TD><TD> 12 </TD><TD> 05 </TD><TD> 04 </TD><TD> 5c </TD><TD> 68 </TD><TD> 39 </TD><TD> 2f </TD><TD> 21 </TD><TD> 14 </TD><TD> 13 </TD><TD> 06 </TD><TD> 5d </TD></TR><TR><TD>
+30 </TD><TD> 69 </TD><TD> 31 </TD><TD> 30 </TD><TD> 23 </TD><TD> 22 </TD><TD> 15 </TD><TD> 07 </TD><TD> 5e </TD><TD> 6a </TD><TD> 72 </TD><TD> 32 </TD><TD> 24 </TD><TD> 16 </TD><TD> 08 </TD><TD> 09 </TD><TD> 5f </TD></TR><TR><TD>
+40 </TD><TD> 6b </TD><TD> 33 </TD><TD> 25 </TD><TD> 17 </TD><TD> 18 </TD><TD> 0b </TD><TD> 0a </TD><TD> 60 </TD><TD> 6c </TD><TD> 34 </TD><TD> 35 </TD><TD> 26 </TD><TD> 27 </TD><TD> 19 </TD><TD> 0c </TD><TD> 61 </TD></TR><TR><TD>
+50 </TD><TD> 6d </TD><TD> 73 </TD><TD> 28 </TD><TD> 74 </TD><TD> 1a </TD><TD> 0d </TD><TD> 62 </TD><TD> 6e </TD><TD> 3a </TD><TD> 36 </TD><TD> 1c </TD><TD> 1b </TD><TD> 75 </TD><TD> 2b </TD><TD> 63 </TD><TD> 76 </TD></TR><TR><TD>
+60 </TD><TD> 55 </TD><TD> 56 </TD><TD> 77 </TD><TD> 78 </TD><TD> 79 </TD><TD> 7a </TD><TD> 0e </TD><TD> 7b </TD><TD> 7c </TD><TD> 4f </TD><TD> 7d </TD><TD> 4b </TD><TD> 47 </TD><TD> 7e </TD><TD> 7f </TD><TD> 6f </TD></TR><TR><TD>
+70 </TD><TD> 52 </TD><TD> 53 </TD><TD> 50 </TD><TD> 4c </TD><TD> 4d </TD><TD> 48 </TD><TD> 01 </TD><TD> 45 </TD><TD> 57 </TD><TD> 4e </TD><TD> 51 </TD><TD> 4a </TD><TD> 37 </TD><TD> 49 </TD><TD> 46 </TD><TD> 54 </TD></TR><TR><TD>
+80 </TD><TD> 80?</TD><TD> 81 </TD><TD> 82 </TD><TD> 41 </TD><TD> 54 </TD><TD> 85 </TD><TD> 86 </TD><TD> 87 </TD><TD> 88 </TD><TD> 89 </TD><TD> 8a </TD><TD> 8b </TD><TD> 8c </TD><TD> 8d </TD><TD> 8e </TD><TD> 8f </TD></TR><TR><TD>
+90 </TD><TD> 90 </TD><TD> 91 </TD><TD> 92 </TD><TD> 93 </TD><TD> 94 </TD><TD> 95 </TD><TD> 96 </TD><TD> 97 </TD><TD> 98 </TD><TD> 99 </TD><TD> 9a </TD><TD> 9b </TD><TD> 9c </TD><TD> 9d </TD><TD> 9e </TD><TD> 9f </TD></TR><TR><TD>
+a0 </TD><TD> a0 </TD><TD> a1 </TD><TD> a2 </TD><TD> a3 </TD><TD> a4 </TD><TD> a5 </TD><TD> a6 </TD><TD> a7 </TD><TD> a8 </TD><TD> a9 </TD><TD> aa </TD><TD> ab </TD><TD> ac </TD><TD> ad </TD><TD> ae </TD><TD> af </TD></TR><TR><TD>
+b0 </TD><TD> b0 </TD><TD> b1 </TD><TD> b2 </TD><TD> b3 </TD><TD> b4 </TD><TD> b5 </TD><TD> b6 </TD><TD> b7 </TD><TD> b8 </TD><TD> b9 </TD><TD> ba </TD><TD> bb </TD><TD> bc </TD><TD> bd </TD><TD> be </TD><TD> bf </TD></TR><TR><TD>
+c0 </TD><TD> c0 </TD><TD> c1 </TD><TD> c2 </TD><TD> c3 </TD><TD> c4 </TD><TD> c5 </TD><TD> c6 </TD><TD> c7 </TD><TD> c8 </TD><TD> c9 </TD><TD> ca </TD><TD> cb </TD><TD> cc </TD><TD> cd </TD><TD> ce </TD><TD> cf </TD></TR><TR><TD>
+d0 </TD><TD> d0 </TD><TD> d1 </TD><TD> d2 </TD><TD> d3 </TD><TD> d4 </TD><TD> d5?</TD><TD> d6?</TD><TD> d7 </TD><TD> d8 </TD><TD> d9?</TD><TD> da?</TD><TD> db </TD><TD> dc </TD><TD> dd </TD><TD> de?</TD><TD> df </TD></TR><TR><TD>
+e0 </TD><TD> e0 </TD><TD> e1 </TD><TD> e2?</TD><TD> e3?</TD><TD> e4?</TD><TD> e5 </TD><TD> e6 </TD><TD> e7?</TD><TD> e8 </TD><TD> e9 </TD><TD> ea </TD><TD> eb </TD><TD> ec </TD><TD> ed?</TD><TD> ee?</TD><TD> ef?</TD></TR><TR><TD>
+f0 </TD><TD> - </TD><TD> f1?</TD><TD> f2?</TD><TD> f3?</TD><TD> f4?</TD><TD> f5?</TD><TD> f6?</TD><TD> f7?</TD><TD> f8?</TD><TD> f9?</TD><TD> fa?</TD><TD> fb?</TD><TD> fc?</TD><TD> fd?</TD><TD> fe?</TD><TD> ff </TD></TR><TR><TD>
+
+</TD></TR></TABLE></CENTER>
+<P>A reference for the first half of this table is the book by Gary J Konzak
+<I>PC 8042 Controller</I>, ISBN 0-929392-21-3.
+(Report by <CODE>vojtech@suse.cz</CODE>.)
+<P>A way to check this table is: (i) put the keyboard in untranslated modes 1, 2, 3
+and look at the
+<A HREF="table.h">resulting values</A>, and
+(ii) put the keyboard in translated scancode modes 1, 2, 3. Now compare
+the values. The entries with question marks were not checked in this way.
+<P>Note that the range <B>01</B>-<B>7f</B> of this table is 1-1.
+In the second half of the table, translated and untranslated values
+are equal in all known cases, with the two exceptions <B>83</B> and <B>84</B>.
+<P>One asks the controller to transmit untranslated scancodes by writing
+a keyboard controller command with bit 5 set and bit 6 cleared.
+E.g., use the command byte <B>45</B> to get translated codes,
+and <B>24</B> to get untranslated codes that do not cause interrupts.
+<P>
+<H2><A NAME="ss3.4">3.4 Use</A>
+</H2>
+
+<P>Can these other scancode sets be used? Probably not.
+<P>(i) My MyCom laptop does not support scancode sets 1 and 3 at all.
+<P>(ii) Some laptops have special key combinations that bring one
+into a setup or configuration utility. It is impossible to do
+anything useful, or to get out of it again, when the scancode mode
+is not translated Set 2.
+<P>(iii) Many keyboards have bugs in scancode sets 1 and/or 3 but
+are fine in scancode Set 2.
+Vojtech Pavlik reports that his BTC keyboard has the same codes
+for the '1' and '2' keys in Set3, both having the code for '1').
+On my BTC keyboard the key up value for Esc and 1 are both <B>ff</B>
+in scancode Set 1.
+<P>(iv) A big advantage of Set 3 is that each key generates a unique code
+so that one does not need to parse sequences. However, the BTC keyboard
+mentioned above generates <B>e0</B> <B>6f</B> for its Macro key
+also in scancode mode 3.
+<P>(v) Some keyboard controllers cannot handle Set 3 values that are
+larger than 0x7f, and give
+<A HREF="#contagious">peculiar results</A>
+for some keys on the Microsoft Internet keyboard in translated
+scancode mode 3.
+<P>(vi) The USB legacy support only supports translated Set 2.
+<P>(vii) The
+<A HREF="http://www.microsoft.com/hwdev/download/desinit/scancode.zip">Microsoft Keyboard Scan Code Specification</A> writes:
+<I>In the very early days of Windows NT, an attempt was made
+to use the much more orthogonal Scan Code Set 3, but due to bugs
+in the implementation of this Scan Code Set on numerous OEM
+keyboards, the idea was abandoned.</I>
+And also <I>Scan Code Set 3 is not used or required for operation
+of Microsoft operating systems.</I>
+<P>
<P>
<HR>
-Next
+<A HREF="scancodes-4.html">Next</A>
<A HREF="scancodes-2.html">Previous</A>
<A HREF="scancodes.html#toc3">Contents</A>
</BODY>
diff --git a/doc/scancodes/scancodes-4.html b/doc/scancodes/scancodes-4.html
new file mode 100644
index 0000000..0c0140a
--- /dev/null
+++ b/doc/scancodes/scancodes-4.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
+ <TITLE>Keyboard scancodes: USB</TITLE>
+ <LINK HREF="scancodes-5.html" REL=next>
+ <LINK HREF="scancodes-3.html" REL=previous>
+ <LINK HREF="scancodes.html#toc4" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="scancodes-5.html">Next</A>
+<A HREF="scancodes-3.html">Previous</A>
+<A HREF="scancodes.html#toc4">Contents</A>
+<HR>
+<H2><A NAME="s4">4. USB</A></H2>
+
+<P>The USB specification prescribes 16-bit keycodes for keyboard positions,
+identified with key captions for the usual US layout.
+Below the values are given in decimal. 0-3 are protocol values,
+namely NoEvent, ErrorRollOver, POSTFail, ErrorUndefined, respectively.
+The values 224-231 are for modifier keys.
+<P>
+<P>
+<CENTER><TABLE BORDER><TR><TD>
+<BR>
+</TD><TD> 1 </TD><TD> 2 </TD><TD> 3 </TD><TD> 4 </TD><TD> 5 </TD><TD> 6 </TD><TD> 7 </TD><TD> 8 </TD><TD> 9 </TD><TD> 10 </TD><TD> 11 </TD></TR><TR><TD>
+- </TD><TD> err </TD><TD> err </TD><TD> err </TD><TD> A </TD><TD> B </TD><TD> C </TD><TD> D </TD><TD> E </TD><TD> F </TD><TD> G </TD><TD> H </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+12 </TD><TD> 13 </TD><TD> 14 </TD><TD> 15 </TD><TD> 16 </TD><TD> 17 </TD><TD> 18 </TD><TD> 19 </TD><TD> 20 </TD><TD> 21 </TD><TD> 22 </TD><TD> 23 </TD></TR><TR><TD>
+I </TD><TD> J </TD><TD> K </TD><TD> L </TD><TD> M </TD><TD> N </TD><TD> O </TD><TD> P </TD><TD> Q </TD><TD> R </TD><TD> S </TD><TD> T </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+24 </TD><TD> 25 </TD><TD> 26 </TD><TD> 27 </TD><TD> 28 </TD><TD> 29 </TD><TD> 30 </TD><TD> 31 </TD><TD> 32 </TD><TD> 33 </TD><TD> 34 </TD><TD> 35 </TD></TR><TR><TD>
+U </TD><TD> V </TD><TD> W </TD><TD> X </TD><TD> Y </TD><TD> Z </TD><TD> 1 </TD><TD> 2 </TD><TD> 3 </TD><TD> 4 </TD><TD> 5 </TD><TD> 6 </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+36 </TD><TD> 37 </TD><TD> 38 </TD><TD> 39 </TD><TD> 40 </TD><TD> 41 </TD><TD> 42 </TD><TD> 43 </TD><TD> 44 </TD><TD> 45 </TD><TD> 46 </TD><TD> 47 </TD></TR><TR><TD>
+7 </TD><TD> 8 </TD><TD> 9 </TD><TD> 0 </TD><TD> Enter </TD><TD> Esc </TD><TD> BSp </TD><TD> Tab </TD><TD> Space </TD><TD> - / _ </TD><TD> = / + </TD><TD> [ / { </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+48 </TD><TD> 49 </TD><TD> 50 </TD><TD> 51 </TD><TD> 52 </TD><TD> 53 </TD><TD>54 </TD><TD> 55 </TD><TD> 56 </TD><TD> 57 </TD><TD> 58 </TD><TD> 59 </TD></TR><TR><TD>
+] / } </TD><TD> \ / | </TD><TD> ... </TD><TD> ; / : </TD><TD> ' / " </TD><TD> ` / ~ </TD><TD>, / < </TD><TD> . / > </TD><TD> / / ? </TD><TD> Caps Lock </TD><TD> F1 </TD><TD> F2 </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+60 </TD><TD> 61 </TD><TD> 62 </TD><TD> 63 </TD><TD> 64 </TD><TD> 65 </TD><TD> 66 </TD><TD> 67 </TD><TD> 68 </TD><TD> 69 </TD><TD> 70 </TD><TD> 71 </TD></TR><TR><TD>
+F3 </TD><TD> F4 </TD><TD> F5 </TD><TD> F6 </TD><TD> F7 </TD><TD> F8 </TD><TD> F9 </TD><TD> F10 </TD><TD> F11 </TD><TD> F12 </TD><TD> PrtScr </TD><TD> Scroll Lock </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+72 </TD><TD> 73 </TD><TD> 74 </TD><TD> 75 </TD><TD> 76 </TD><TD> 77 </TD><TD>78 </TD><TD> 79 </TD><TD> 80 </TD><TD> 81 </TD><TD> 82 </TD><TD> 83 </TD></TR><TR><TD>
+Pause </TD><TD> Insert </TD><TD> Home </TD><TD> PgUp </TD><TD> Delete </TD><TD> End </TD><TD>PgDn </TD><TD> Right </TD><TD> Left </TD><TD> Down </TD><TD> Up </TD><TD> Num Lock </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+84 </TD><TD> 85 </TD><TD> 86 </TD><TD> 87 </TD><TD> 88 </TD><TD> 89 </TD><TD>90 </TD><TD> 91 </TD><TD> 92 </TD><TD> 93 </TD><TD> 94 </TD><TD> 95 </TD></TR><TR><TD>
+KP / </TD><TD> KP * </TD><TD> KP - </TD><TD> KP + </TD><TD> KP Enter </TD><TD> KP 1 / End </TD><TD>KP 2 / Down </TD><TD> KP 3 / PgDn </TD><TD> KP 4 / Left </TD><TD> KP 5 </TD><TD> KP 6 / Right </TD><TD> KP 7 / Home </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+96 </TD><TD> 97 </TD><TD> 98 </TD><TD> 99 </TD><TD> 100 </TD><TD> 101 </TD><TD>102 </TD><TD> 103 </TD><TD> 104 </TD><TD> 105 </TD><TD> 106 </TD><TD> 107 </TD></TR><TR><TD>
+KP 8 / Up </TD><TD> KP 9 / PgUp </TD><TD> KP 0 / Ins </TD><TD> KP . / Del </TD><TD> ... </TD><TD> Applic </TD><TD>Power </TD><TD> KP = </TD><TD> F13 </TD><TD> F14 </TD><TD> F15 </TD><TD> F16 </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+108 </TD><TD> 109 </TD><TD> 110 </TD><TD> 111 </TD><TD> 112 </TD><TD> 113 </TD><TD> 114 </TD><TD> 115 </TD><TD> 116 </TD><TD> 117 </TD><TD> 118 </TD><TD> 119 </TD></TR><TR><TD>
+F17 </TD><TD> F18 </TD><TD> F19 </TD><TD> F20 </TD><TD> F21 </TD><TD> F22 </TD><TD> F23 </TD><TD> F24 </TD><TD> Execute </TD><TD> Help </TD><TD> Menu </TD><TD> Select </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+120 </TD><TD> 121 </TD><TD> 122 </TD><TD> 123 </TD><TD> 124 </TD><TD> 125 </TD><TD>126 </TD><TD> 127 </TD><TD> 128 </TD><TD> 129 </TD><TD> 130 </TD><TD> 131 </TD></TR><TR><TD>
+Stop </TD><TD> Again </TD><TD> Undo </TD><TD> Cut </TD><TD> Copy </TD><TD> Paste </TD><TD>Find </TD><TD> Mute </TD><TD> Volume Up </TD><TD> Volume Down </TD><TD> Locking Caps Lock </TD><TD> Locking Num Lock </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+132 </TD><TD> 133 </TD><TD> 134 </TD><TD> 135 </TD><TD> 136 </TD><TD> 137 </TD><TD>138 </TD><TD> 139 </TD><TD> 140 </TD><TD> 141 </TD><TD> 142 </TD><TD> 143 </TD></TR><TR><TD>
+Locking Scroll Lock </TD><TD> KP , </TD><TD> KP = </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD><TD>Internat </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD><TD> Internat </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+144 </TD><TD> 145 </TD><TD> 146 </TD><TD> 147 </TD><TD> 148 </TD><TD> 149 </TD><TD> 150 </TD><TD> 151 </TD><TD> 152 </TD><TD> 153 </TD><TD> 154 </TD><TD> 155 </TD></TR><TR><TD>
+LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> LANG </TD><TD> Alt Erase </TD><TD> SysRq </TD><TD> Cancel </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+156 </TD><TD> 157 </TD><TD> 158 </TD><TD> 159 </TD><TD> 160 </TD><TD> 161 </TD><TD> 162 </TD><TD> 163 </TD><TD> 164 </TD><TD>165</TD><TD>166</TD><TD>167 </TD></TR><TR><TD>
+Clear </TD><TD> Prior </TD><TD> Return </TD><TD> Separ </TD><TD> Out </TD><TD> Oper </TD><TD> Clear / Again </TD><TD> CrSel / Props </TD><TD> ExSel </TD><TD> </TD><TD> </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+</TD></TR><TR><TD>
+224 </TD><TD> 225 </TD><TD> 226 </TD><TD> 227 </TD><TD> 228 </TD><TD> 229 </TD><TD> 230 </TD><TD> 231 </TD></TR><TR><TD>
+LCtrl </TD><TD> LShift </TD><TD> LAlt </TD><TD> LGUI </TD><TD> RCtrl </TD><TD> RShift </TD><TD> RAlt </TD><TD> RGUI </TD></TR><TR><TD>
+</TD></TR><TR><TD>
+
+</TD></TR></TABLE></CENTER>
+<P>
+<HR>
+<A HREF="scancodes-5.html">Next</A>
+<A HREF="scancodes-3.html">Previous</A>
+<A HREF="scancodes.html#toc4">Contents</A>
+</BODY>
+</HTML>
diff --git a/doc/scancodes/scancodes-5.html b/doc/scancodes/scancodes-5.html
new file mode 100644
index 0000000..80616fd
--- /dev/null
+++ b/doc/scancodes/scancodes-5.html
@@ -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-4.html" REL=previous>
+ <LINK HREF="scancodes.html#toc5" REL=contents>
+</HEAD>
+<BODY>
+Next
+<A HREF="scancodes-4.html">Previous</A>
+<A HREF="scancodes.html#toc5">Contents</A>
+<HR>
+<H2><A NAME="s5">5. 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-4.html">Previous</A>
+<A HREF="scancodes.html#toc5">Contents</A>
+</BODY>
+</HTML>
diff --git a/doc/scancodes/scancodes.h b/doc/scancodes/scancodes.h
new file mode 100644
index 0000000..6c97daa
--- /dev/null
+++ b/doc/scancodes/scancodes.h
@@ -0,0 +1,400 @@
+/*
+ * scancodes.h Version 0.1
+ *
+ * Copyright (C) 1999 Vojtech Pavlik
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
+ */
+
+
+struct scancode_list {
+ unsigned char xt;
+ unsigned char at2;
+ unsigned char at3;
+ unsigned char sun;
+ unsigned char usb;
+ unsigned char adb;
+ unsigned char code;
+};
+
+/*
+ * The base set common to all keyboards - the XT keyboard.
+ */
+
+static struct scancode_list scancodes[] = {
+
+ {0x01, 0x76, 0x08, 0x1d, 0x29, 0x35, 1}, /* Esc */
+ {0x02, 0x16, 0x16, 0x1e, 0x1e, 0x12, 2}, /* 1 ! */
+ {0x03, 0x1e, 0x1e, 0x1f, 0x1f, 0x13, 3}, /* 2 @ */
+ {0x04, 0x26, 0x26, 0x20, 0x20, 0x14, 4}, /* 3 # */
+ {0x05, 0x25, 0x25, 0x21, 0x21, 0x15, 5}, /* 4 $ */
+ {0x06, 0x2e, 0x2e, 0x22, 0x22, 0x17, 6}, /* 5 % */
+ {0x07, 0x36, 0x36, 0x23, 0x23, 0x16, 7}, /* 6 ^ */
+ {0x08, 0x3d, 0x3d, 0x24, 0x24, 0x1a, 8}, /* 7 & */
+ {0x09, 0x3e, 0x3e, 0x25, 0x25, 0x1c, 9}, /* 8 * */
+ {0x0a, 0x46, 0x46, 0x26, 0x26, 0x19, 10}, /* 9 ( */
+ {0x0b, 0x45, 0x45, 0x27, 0x27, 0x1d, 11}, /* 0 ) */
+ {0x0c, 0x4e, 0x4e, 0x28, 0x2d, 0x1b, 12}, /* - _ */
+ {0x0d, 0x55, 0x55, 0x29, 0x2e, 0x18, 13}, /* = + */
+ {0x0e, 0x66, 0x66, 0x2b, 0x2a, 0x33, 14}, /* Backspace */
+ {0x0f, 0x0d, 0x0d, 0x35, 0x2b, 0x30, 15}, /* Tab */
+ {0x10, 0x15, 0x15, 0x36, 0x14, 0x0c, 16}, /* Q */
+ {0x11, 0x1d, 0x1d, 0x37, 0x1a, 0x0d, 17}, /* W */
+ {0x12, 0x24, 0x24, 0x38, 0x08, 0x0e, 18}, /* E */
+ {0x13, 0x2d, 0x2d, 0x39, 0x15, 0x0f, 19}, /* R */
+ {0x14, 0x2c, 0x2c, 0x3a, 0x17, 0x11, 20}, /* T */
+ {0x15, 0x35, 0x35, 0x3b, 0x1c, 0x10, 21}, /* Y */
+ {0x16, 0x3c, 0x3c, 0x3c, 0x18, 0x20, 22}, /* U */
+ {0x17, 0x43, 0x43, 0x3d, 0x0c, 0x22, 23}, /* I */
+ {0x18, 0x44, 0x44, 0x3e, 0x12, 0x1f, 24}, /* O */
+ {0x19, 0x4d, 0x4d, 0x3f, 0x13, 0x23, 25}, /* P */
+ {0x1a, 0x54, 0x54, 0x40, 0x2f, 0x21, 26}, /* [ { */
+ {0x1b, 0x5b, 0x5b, 0x41, 0x30, 0x1e, 27}, /* ] } */
+ {0x1c, 0x5a, 0x5a, 0x59, 0x28, 0x24, 28}, /* Enter */
+ {0x1d, 0x14, 0x11, 0x4c, 0xe0, 0x36, 29}, /* Left Control */
+ {0x1e, 0x1c, 0x1c, 0x4d, 0x04, 0x00, 30}, /* A */
+ {0x1f, 0x1b, 0x1b, 0x4e, 0x16, 0x01, 31}, /* S */
+ {0x20, 0x23, 0x23, 0x4f, 0x07, 0x02, 32}, /* D */
+ {0x21, 0x2b, 0x2b, 0x50, 0x09, 0x03, 33}, /* F */
+ {0x22, 0x34, 0x34, 0x51, 0x0a, 0x05, 34}, /* G */
+ {0x23, 0x33, 0x33, 0x52, 0x0b, 0x04, 35}, /* H */
+ {0x24, 0x3b, 0x3b, 0x53, 0x0d, 0x26, 36}, /* J */
+ {0x25, 0x42, 0x42, 0x54, 0x0e, 0x28, 37}, /* K */
+ {0x26, 0x4b, 0x4b, 0x55, 0x0f, 0x25, 38}, /* L */
+ {0x27, 0x4c, 0x4c, 0x56, 0x33, 0x29, 39}, /* ; : */
+ {0x28, 0x52, 0x52, 0x57, 0x34, 0x27, 40}, /* ' " */
+ {0x29, 0x0e, 0x0e, 0x2a, 0x35, 0x32, 41}, /* ` ~ */
+ {0x2a, 0x12, 0x12, 0x63, 0xe1, 0x38, 42}, /* Left Shift */
+ {0x2b, 0x5d, 0x5c, 0x58, 0x31, 0x2a, 43}, /* \ | */
+ { 0, 0, 0x53, 0, 0, 0, 43}, /* \ | */
+ { 0, 0, 0x5d, 0, 0, 0, 43}, /* \ | */
+ {0x2c, 0x1a, 0x1a, 0x64, 0x1d, 0x06, 44}, /* Z */
+ {0x2d, 0x22, 0x22, 0x65, 0x1b, 0x07, 45}, /* X */
+ {0x2e, 0x21, 0x21, 0x66, 0x06, 0x08, 46}, /* C */
+ {0x2f, 0x2a, 0x2a, 0x67, 0x19, 0x09, 47}, /* V */
+ {0x30, 0x32, 0x32, 0x68, 0x05, 0x0b, 48}, /* B */
+ {0x31, 0x31, 0x31, 0x69, 0x11, 0x2d, 49}, /* N */
+ {0x32, 0x3a, 0x3a, 0x6a, 0x10, 0x2e, 50}, /* M */
+ {0x33, 0x41, 0x41, 0x6b, 0x36, 0x2b, 51}, /* , < */
+ {0x34, 0x49, 0x49, 0x6c, 0x37, 0x2f, 52}, /* . > */
+ {0x35, 0x4a, 0x4a, 0x6d, 0x38, 0x2c, 53}, /* / ? */
+ {0x36, 0x59, 0x59, 0x6e, 0xe5, 0x7b, 54}, /* Right Shift */
+ {0x37, 0x7c, 0x7e, 0x2f, 0x55, 0x43, 55}, /* KP * */
+ {0x38, 0x11, 0x19, 0x13, 0xe2, 0x37, 56}, /* Left Alt */
+ {0x39, 0x29, 0x29, 0x79, 0x2c, 0x31, 57}, /* Space */
+ {0x3a, 0x58, 0x14, 0x77, 0x39, 0x39, 58}, /* Caps Lock */
+ {0x3b, 0x05, 0x07, 0x05, 0x3a, 0x7a, 59}, /* F1 */
+ {0x3c, 0x06, 0x0f, 0x06, 0x3b, 0x78, 60}, /* F2 */
+ {0x3d, 0x04, 0x17, 0x08, 0x3c, 0x63, 61}, /* F3 */
+ {0x3e, 0x0c, 0x1f, 0x0a, 0x3d, 0x76, 62}, /* F4 */
+ {0x3f, 0x03, 0x27, 0x0c, 0x3e, 0x60, 63}, /* F5 */
+ {0x40, 0x0b, 0x2f, 0x0e, 0x3f, 0x61, 64}, /* F6 */
+ {0x41, 0x02, 0x37, 0x10, 0x40, 0x62, 65}, /* F7 */
+ {0x42, 0x0a, 0x3f, 0x11, 0x41, 0x64, 66}, /* F8 */
+ {0x43, 0x01, 0x47, 0x12, 0x42, 0x65, 67}, /* F9 */
+ {0x44, 0x09, 0x4f, 0x07, 0x43, 0x6d, 68}, /* F10 */
+ {0x45, 0x77, 0x76, 0x62, 0x53, 0x47, 69}, /* Num Lock */
+ {0x46, 0x7e, 0x5f, 0x17, 0x47, 0x6b, 70}, /* Scroll Lock Break */
+ {0x47, 0x6c, 0x6c, 0x44, 0x5f, 0x59, 71}, /* KP Home 7 */
+ {0x48, 0x75, 0x75, 0x45, 0x60, 0x5b, 72}, /* KP Up 8 */
+ {0x49, 0x7d, 0x7d, 0x46, 0x61, 0x5c, 73}, /* KP PgUp 9 */
+ {0x4a, 0x7b, 0x84, 0x47, 0x56, 0x4e, 74}, /* KP - */
+ {0x4b, 0x6b, 0x6b, 0x5b, 0x5c, 0x56, 75}, /* KP Left 4 */
+ {0x4c, 0x73, 0x73, 0x5c, 0x5d, 0x57, 76}, /* KP 5 */
+ {0x4d, 0x74, 0x74, 0x5d, 0x5e, 0x58, 77}, /* KP Right 6 */
+ {0x4e, 0x79, 0x7c, 0x7d, 0x57, 0x45, 78}, /* KP + */
+ {0x4f, 0x69, 0x69, 0x70, 0x59, 0x53, 79}, /* KP End 1 */
+ {0x50, 0x72, 0x72, 0x71, 0x5a, 0x54, 80}, /* KP Down 2 */
+ {0x51, 0x7a, 0x7a, 0x72, 0x5b, 0x55, 81}, /* KP PgDn 3 */
+ {0x52, 0x70, 0x70, 0x5e, 0x62, 0x52, 82}, /* KP Ins 0 */
+ {0x53, 0x71, 0x71, 0x32, 0x63, 0x41, 83}, /* KP Del . */
+
+/*
+ * The most common extensions to the base.
+ */
+
+ { 0, 0x78, 0x56, 0x09, 0x44, 0x67, 87}, /* F11 */
+ { 0, 0x07, 0x5e, 0x0b, 0x45, 0x6f, 88}, /* F12 */
+ { 0, 0xda, 0x79, 0x5a, 0x58, 0x4c, 96}, /* KP Enter */
+ { 0, 0xca, 0x77, 0x2e, 0x54, 0x4b, 98}, /* KP / */
+ { 0, 0x91, 0x39, 0x0d, 0xe6, 0x7c, 100}, /* Right Alt (Graph) */
+ { 0, 0, 0x58, 0, 0, 0, 100}, /* Alt Graph - Sun PS/2 Type 5 */
+ { 0, 0xf1, 0x64, 0x42, 0x4c, 0x75, 111}, /* Delete */
+ { 0, 0xfe, 0x62, 0x15, 0x48, 0x71, 119}, /* Pause Break */
+ { 0, 0xf7, 0, 0, 0, 0, 119}, /* Alternate Pause Break */
+
+/*
+ * The separate navigation keys
+ */
+
+ { 0, 0xec, 0x6e, 0x34, 0x4a, 0x73, 102}, /* Home */
+ { 0, 0xf5, 0x63, 0x14, 0x52, 0x3e, 103}, /* Up */
+ { 0, 0xfd, 0x6f, 0x60, 0x4b, 0x74, 104}, /* Page Up */
+ { 0, 0xeb, 0x61, 0x18, 0x50, 0x3b, 105}, /* Left */
+ { 0, 0xf4, 0x6a, 0x1c, 0x4f, 0x3c, 106}, /* Right */
+ { 0, 0xe9, 0x65, 0x4a, 0x4d, 0x77, 107}, /* End */
+ { 0, 0xf2, 0x60, 0x1b, 0x51, 0x3d, 108}, /* Down */
+ { 0, 0xfa, 0x6d, 0x7b, 0x4e, 0x79, 109}, /* Page Down */
+ { 0, 0xf0, 0x67, 0x2c, 0x49, 0x72, 110}, /* Insert */
+
+/*
+ * The OS keys
+ */
+
+ { 0, 0x9f, 0x8b, 0x78, 0xe3, 0, 125}, /* Left Meta (Win, Apple, Amiga) */
+ { 0, 0xa7, 0x8c, 0x7a, 0xe7, 0, 126}, /* Right Meta (Win, Apple, Amiga) */
+ { 0, 0xaf, 0x8d, 0x43, 0x65, 0, 127}, /* Compose (Application) */
+
+/*
+ * OS keys on a NCD PS/2 Sun keyboard
+ */
+
+ { 0, 0, 0x40, 0, 0, 0, 125}, /* Left Meta (Win, Apple, Amiga) */
+ { 0, 0, 0x48, 0, 0, 0, 126}, /* Right Meta (Win, Apple, Amiga) */
+ { 0, 0, 0x39, 0, 0, 0, 127}, /* Compose (Application) */
+
+/*
+ * PrintScreen
+ */
+
+ { 0, 0xfc, 0x57, 0x16, 0x46, 0, 99}, /* PrintScreen SysRq */
+
+/*
+ * Right Ctrl
+ */
+
+ { 0, 0x94, 0x58, 0, 0xe4, 0x7d, 97}, /* Right Ctrl */
+
+/*
+ * The European 102nd key
+ */
+
+ { 0, 0x61, 0x13, 0, 0x64, 0, 86}, /* the 102nd key */
+
+/*
+ * Sun function keys
+ */
+
+ { 0, 0, 0x0a, 0x01, 0x78, 0, 128}, /* Stop */
+ { 0, 0, 0x0b, 0x03, 0x79, 0, 129}, /* Again */
+ { 0, 0, 0x0c, 0x19, 0, 0, 130}, /* Props */
+ { 0, 0, 0x10, 0x1a, 0x7a, 0, 131}, /* Undo */
+ { 0, 0, 0x13, 0x31, 0, 0, 132}, /* Front */
+ { 0, 0, 0x18, 0x33, 0x7c, 0, 133}, /* Copy */
+ { 0, 0, 0x20, 0x48, 0, 0, 134}, /* Open */
+ { 0, 0, 0x28, 0x49, 0x7d, 0, 135}, /* Paste */
+ { 0, 0, 0x30, 0x5f, 0x7e, 0, 136}, /* Find */
+ { 0, 0, 0x38, 0x61, 0x7b, 0, 137}, /* Cut */
+ { 0, 0, 0x09, 0x76, 0x75, 0, 138}, /* Help */
+
+
+/*
+ * Line Feed found on Sun Type 4 keyboard
+ */
+
+ { 0, 0, 0, 0x6f, 0, 0, 101}, /* Line Feed */
+
+/*
+ * AT Enhanced keyboard in XT mode
+ */
+
+ {0x57, 0, 0, 0, 0, 0, 87}, /* F11 */
+ {0x58, 0, 0, 0, 0, 0, 88}, /* F12 */
+
+/*
+ * PP-06 keyboard extension keys
+ */
+
+ {0x65, 0, 0, 0, 0, 0, 87}, /* F11 */
+ {0x66, 0, 0, 0, 0, 0, 88}, /* F12 */
+ {0x6b, 0, 0, 0, 0, 0, 110}, /* Insert */
+ {0x6c, 0, 0, 0, 0, 0, 111}, /* Delete */
+ {0x6d, 0, 0, 0, 0, 0, 103}, /* Up */
+ {0x6e, 0, 0, 0, 0, 0, 108}, /* Down */
+ {0x6f, 0, 0, 0, 0, 0, 105}, /* Left */
+ {0x70, 0, 0, 0, 0, 0, 106}, /* Right */
+
+/*
+ * F13-F24, for USB and Focus 9000
+ */
+
+ { 0, 0x60, 0, 0, 0x68, 0, 85}, /* F13 (PF1) */
+ { 0, 0x51, 0, 0, 0x69, 0, 89}, /* F14 (PF2) */
+ { 0, 0x62, 0, 0, 0x6a, 0, 90}, /* F15 (PF3) */
+ { 0, 0x63, 0, 0, 0x6b, 0, 91}, /* F16 (PF4) */
+ { 0, 0x64, 0, 0, 0x6c, 0, 92}, /* F17 (PF5) */
+ { 0, 0x65, 0, 0, 0x6d, 0, 93}, /* F18 (PF6) */
+ { 0, 0x67, 0, 0, 0x6e, 0, 94}, /* F19 (PF7) */
+ { 0, 0x68, 0, 0, 0x6f, 0, 95}, /* F20 (PF8) */
+ { 0, 0x53, 0, 0, 0x70, 0, 120}, /* F21 (PF9) */
+ { 0, 0x6d, 0, 0, 0x71, 0, 121}, /* F22 (PF10) */
+ { 0, 0x50, 0, 0, 0x72, 0, 122}, /* F23 (PF11) */
+ { 0, 0x6f, 0, 0, 0x73, 0, 123}, /* F24 (PF12) */
+
+/*
+ * F13-F17 for DEC LK450
+ */
+
+ { 0, 0x84, 0, 0, 0, 0, 85}, /* F13 */
+ { 0, 0x8c, 0, 0, 0, 0, 89}, /* F14 */
+ { 0, 0x83, 0, 0, 0, 0, 90}, /* F15 */
+ { 0, 0x8b, 0, 0, 0, 0, 91}, /* F16 */
+ { 0, 0x82, 0, 0, 0, 0, 92}, /* F17 */
+
+/*
+ * A1-A4 for RC930
+ */
+
+ { 0, 0x0f, 0, 0, 0, 0, 85}, /* A1 */
+ { 0, 0x17, 0, 0, 0, 0, 89}, /* A2 */
+ { 0, 0x1f, 0, 0, 0, 0, 90}, /* A3 */
+ { 0, 0x27, 0, 0, 0, 0, 91}, /* A4 */
+
+/*
+ * Unlabeled keys on the NCD Sun PS/2 keyboard
+ */
+
+ { 0, 0, 0x7f, 0, 0, 0, 85}, /* U1 */
+ { 0, 0, 0x80, 0, 0, 0, 89}, /* U2 */
+ { 0, 0, 0x81, 0, 0, 0, 90}, /* U3 */
+ { 0, 0, 0x82, 0, 0, 0, 91}, /* U4 */
+ { 0, 0, 0x83, 0, 0, 0, 92}, /* U5 */
+
+/*
+ * Macro key on BTC and other keyboards
+ */
+
+ { 0, 0xef, 0, 0, 0, 0, 112}, /* BTC Macro key */
+
+/*
+ * Logitech key on Logitech NewTouch
+ */
+
+ { 0, 0xa8, 0x8e, 0, 0, 0, 112}, /* Logitech key */
+
+/*
+ * Omni key on NorthGate and Lueck keyboards
+ */
+
+ { 0, 0xf3, 0, 0, 0, 0, 112}, /* NorthGate / Lueck Omni */
+
+/*
+ * Sound (NCD Sun PS/2 + Sun Type 5 keyboard)
+ */
+
+ { 0, 0, 0x50, 0x2d, 0x7f, 0, 113}, /* Mute */
+ { 0, 0, 0x51, 0x02, 0x81, 0, 114}, /* Volume Down */
+ { 0, 0, 0x53, 0x04, 0x80, 0, 115}, /* Volume Up */
+
+/*
+ * Sound (BTC Ez multimedia keyboard)
+ */
+
+ { 0, 0xcb, 0x9c, 0, 0, 0, 113}, /* Mute */
+ { 0, 0xc2, 0x9d, 0, 0, 0, 114}, /* Volume Down */
+ { 0, 0x9c, 0x95, 0, 0, 0, 115}, /* Volume Up */
+
+/*
+ * BTC Ez Function keys
+ */
+
+ { 0, 0xbb, 0x94, 0, 0, 0, 165}, /* Previous song */
+ { 0, 0xab, 0x99, 0, 0, 0, 164}, /* Play/Pause */
+ { 0, 0xc3, 0x98, 0, 0, 0, 166}, /* Stop */
+ { 0, 0xb4, 0x93, 0, 0, 0, 163}, /* Next song */
+ { 0, 0xba, 0x97, 0, 0, 0, 161}, /* Eject */
+ { 0, 0xb3, 0x9a, 0, 0, 0, 160}, /* Close */
+ { 0, 0xb1, 0x9e, 0, 0, 0, 167}, /* Record */
+ { 0, 0xc4, 0x9f, 0, 0, 0, 168}, /* Rewind */
+ { 0, 0xb2, 0x91, 0, 0, 0, 139}, /* Menu */
+ { 0, 0x9b, 0xa3, 0, 0, 0, 140}, /* Calc */
+ { 0, 0xad, 0xa2, 0, 0, 0, 147}, /* X-fer */
+ { 0, 0xa1, 0x92, 0, 0, 0, 150}, /* WWW */
+ { 0, 0xa3, 0x9b, 0, 0, 0, 154}, /* Cycle Windows */
+ { 0, 0xa4, 0x96, 0, 0, 0, 152}, /* Coffee */
+ { 0, 0xcd, 0xa0, 0, 0, 0, 148}, /* Prog 1 */
+ { 0, 0x95, 0xa1, 0, 0, 0, 149}, /* Prog 2 */
+
+/*
+ * NCD Sun PS/2 Setup key
+ */
+
+ { 0, 0, 0x5d, 0, 0, 0, 141}, /* Setup */
+
+/*
+ * The power key (AP PFT keyboard)
+ */
+
+ { 0, 0xb7, 0, 0x30, 0x66, 0x7f, 116}, /* Power */
+
+/*
+ * The power management keys (AP PFT keyboard)
+ */
+
+ { 0, 0xbf, 0, 0, 0, 0, 142}, /* Sleep */
+ { 0, 0xde, 0, 0, 0, 0, 143}, /* WakeUp */
+
+/*
+ * Turbo-Xwing function keys.
+ */
+
+ { 0, 0xe2, 0, 0, 0, 0, 116}, /* WWW / Power */
+ { 0, 0xb3, 0, 0, 0, 0, 176}, /* Sleep */
+ { 0, 0xe4, 0, 0, 0, 0, 143}, /* Joystick / Wake */
+ { 0, 0xd7, 0, 0, 0, 0, 140}, /* Calc */
+ { 0, 0x8c, 0, 0, 0, 0, 101}, /* Line Feed */
+ { 0, 0x86, 0, 0, 0, 0, 137}, /* Cut */
+ { 0, 0xe7, 0, 0, 0, 0, 133}, /* Copy */
+ { 0, 0xb4, 0, 0, 0, 0, 135}, /* Paste */
+ { 0, 0xcf, 0, 0, 0, 0, 138}, /* Help */
+ { 0, 0x8d, 0, 0, 0, 0, 144}, /* File */
+ { 0, 0xab, 0, 0, 0, 0, 145}, /* Send File */
+ { 0, 0xc0, 0, 0, 0, 0, 146}, /* Delete File */
+ { 0, 0xa6, 0, 0, 0, 0, 151}, /* MS DOS */
+ { 0, 0xd6, 0, 0, 0, 0, 153}, /* Direction */
+ { 0, 0xa9, 0, 0, 0, 0, 166}, /* Stop */
+ { 0, 0x95, 0, 0, 0, 0, 165}, /* Prev Song */
+ { 0, 0xbb, 0, 0, 0, 0, 113}, /* Mute */
+ { 0, 0xa5, 0, 0, 0, 0, 163}, /* Next Song */
+ { 0, 0x96, 0, 0, 0, 0, 164}, /* Play / Pause */
+ { 0, 0x82, 0, 0, 0, 0, 162}, /* Eject / Close */
+ { 0, 0x84, 0, 0, 0, 0, 115}, /* Volume Up */
+ { 0, 0x83, 0, 0, 0, 0, 114}, /* Volume Down */
+
+/*
+ * KeyPad equal, found on Sun Type 4 and Mac keyboards
+ */
+
+ { 0, 0, 0, 0x2d, 0x67, 0x51, 117}, /* KP = */
+
+/*
+ * KeyPad plusminus, found on DEC LK450
+ */
+
+ { 0, 0xf9, 0, 0, 0, 0, 118}, /* DEC LK450 KP +- */
+
+/*
+ * Japan alphabet switch key
+ */
+
+ { 0, 0x68, 0, 0, 0x87, 0, 124}, /* The Jpn key - clashes with Focus PF8 */
+ { 0, 0, 0, 0, 0, 0, 0}};
+
diff --git a/doc/scancodes/scancodes.html b/doc/scancodes/scancodes.html
index 50767ea..b779972 100644
--- a/doc/scancodes/scancodes.html
+++ b/doc/scancodes/scancodes.html
@@ -14,7 +14,7 @@
<HR>
<H1>Keyboard scancodes</H1>
-<H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v1.0, 991209
+<H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v1.1d, 2000-10-26
<P><HR>
<EM>This note contains some information about PC keyboard scancodes.</EM>
<HR>
@@ -29,31 +29,55 @@
<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>
+<LI><A HREF="scancodes-1.html#ss1.8">1.8 Power Saving</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>
+<LI><A HREF="scancodes-2.html#ss2.1">2.1 Cherry G80-0777</A>
+<LI><A HREF="scancodes-2.html#ss2.2">2.2 Amstrad/Schneider PC1512</A>
+<LI><A HREF="scancodes-2.html#ss2.3">2.3 Focus KeyPro FK-9000 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.4">2.4 BTC keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.5">2.5 LK450 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.6">2.6 OmniKey keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.7">2.7 GRiD 2260 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.8">2.8 A Japanese 86/106 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.9">2.9 Trust Ergonomic keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.10">2.10 Brazilian keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.11">2.11 RC930 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.12">2.12 Tandberg Data keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.13">2.13 A Chinese keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.14">2.14 Microsoft Natural keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.15">2.15 Microsoft Internet keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.16">2.16 Microsoft Natural keyboard pro</A>
+<LI><A HREF="scancodes-2.html#ss2.17">2.17 Logitech Internet keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.18">2.18 Compaq Armada laptop keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.19">2.19 Rapid Access keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.20">2.20 Rapid Access II keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.21">2.21 Chicony KBP-8993 keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.22">2.22 Logitech Cordless Desktop Pro keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.23">2.23 Keyboards for HP Kayak and Vectra</A>
+<LI><A HREF="scancodes-2.html#ss2.24">2.24 A keyboard using e0 as ordinary scancode</A>
+<LI><A HREF="scancodes-2.html#ss2.25">2.25 IBM ThinkPad</A>
+<LI><A HREF="scancodes-2.html#ss2.26">2.26 A keyboard</A>
+<LI><A HREF="scancodes-2.html#ss2.27">2.27 Keyboards with many keys</A>
+<LI><A HREF="scancodes-2.html#ss2.28">2.28 A keyboard treating PrtSc/SysRq like Pause/Break</A>
</UL>
<P>
-<H2><A NAME="toc3">3.</A> <A HREF="scancodes-3.html">Reporting</A></H2>
+<H2><A NAME="toc3">3.</A> <A HREF="scancodes-3.html">Keyboard-internal scancodes</A></H2>
+
+<UL>
+<LI><A HREF="scancodes-3.html#ss3.1">3.1 Three scancode sets</A>
+<LI><A HREF="scancodes-3.html#ss3.2">3.2 Make and Break codes</A>
+<LI><A HREF="scancodes-3.html#ss3.3">3.3 Translation</A>
+<LI><A HREF="scancodes-3.html#ss3.4">3.4 Use</A>
+</UL>
+<P>
+<H2><A NAME="toc4">4.</A> <A HREF="scancodes-4.html">USB</A></H2>
+
+<P>
+<H2><A NAME="toc5">5.</A> <A HREF="scancodes-5.html">Reporting</A></H2>
<HR>
<A HREF="scancodes-1.html">Next</A>
diff --git a/doc/scancodes/scancodes.sgml b/doc/scancodes/scancodes.sgml
index e4d524c..30ed0d6 100644
--- a/doc/scancodes/scancodes.sgml
+++ b/doc/scancodes/scancodes.sgml
@@ -4,7 +4,7 @@
<title>Keyboard scancodes
<author>Andries Brouwer, <tt/aeb@cwi.nl/
-<date>v1.0, 991209
+<date>v1.1d, 2000-10-26
<abstract>
This note contains some information about PC keyboard scancodes.
@@ -15,9 +15,9 @@
<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
+(<ref id="kscancodes" name="Different codes"> are used by the keyboard
+firmware internally, and there also exist several
+<ref id="kscancodes" 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.
@@ -36,6 +36,8 @@
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.
+(And one gets the expected sequences upon release. But see
+<ref id="mtek" name="below">.)
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.
@@ -43,12 +45,11 @@
<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)
+<bf>00</bf> (Keyboard error - see <bf>ff</bf>)
<p>
<bf>aa</bf> (BAT [Basic Assurance Test] OK)
<p>
@@ -57,13 +58,24 @@
<bf>f1</bf> (Some keyboards, as reply to command <bf>a4</bf>:
Password not installed)
<p>
-<bf>fa</bf> (Ack)
+<bf>fa</bf> (Acknowledge from kbd)
<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)
+<bf>ff</bf> (Keyboard error)
+<newline>
+Three common causes for keyboard error are:
+(i) several keys pressed simultaneously,
+(ii) keyboard buffer overflow,
+(iii) parity error on the serial line used by keyboard
+and keyboard controller for communication.
+The error reported is <bf>ff</bf> in
+<ref name="scancode mode" id="kscancodes"> 1,
+and <bf>00</bf> in scancode modes 2 and 3.
+If translation is on, both <bf>00</bf> and <bf>ff</bf>
+are translated as <bf>ff</bf>.
<sect1>Escape scancodes<p>
The codes <bf>e0</bf> and <bf>e1</bf> introduce scancode sequences,
@@ -239,7 +251,7 @@
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.
+(left or right) Shift is down. They do not react to NumLock.
<sect1>Turbo Mode<p>
On some motherboards the LCtrl-LAlt-GreyPlus and LCtrl-LAlt-GreyMinus
@@ -253,37 +265,58 @@
Other peculiar combinations in this style include
LCtrl-LAlt-LShift-GreyMinus to turn off system cache.
<p>
-Thio Yu Jin <jin@singmail.com> complains that on his Toshiba 4010CDS
+Thio Yu Jin <<tt/jin@singmail.com/> 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.
+<sect1>Power Saving<p>
+<htmlurl url="http://www.microsoft.com/HWDEV/specs/PMref/PMinput.htm"
+name="Microsoft"> recommends: "i8042-based keyboards should deploy the
+following scan codes for power management buttons, i.e., POWER and SLEEP
+buttons:
+
+<table><tabular ca="c|cc">
+ | Set-1 make/break | Set-2 make/break @@
+Power | <bf>e0</bf> <bf>5e</bf> / <bf>e0</bf> <bf>de</bf> |
+<bf>e0</bf> <bf>37</bf> / <bf>e0</bf> <bf>f0</bf> <bf>37</bf> @
+Sleep | <bf>e0</bf> <bf>5f</bf> / <bf>e0</bf> <bf>df</bf> |
+<bf>e0</bf> <bf>3f</bf> / <bf>e0</bf> <bf>f0</bf> <bf>3f</bf> @
+Wake | <bf>e0</bf> <bf>63</bf> / <bf>e0</bf> <bf>e3</bf> |
+<bf>e0</bf> <bf>5e</bf> / <bf>e0</bf> <bf>f0</bf> <bf>5e</bf> @
+</tabular></table>
+
+The Power, Sleep, and Wake event scan codes are the i8042 equivalents
+to the System Power Down, System Sleep, and System Wake Up HID usages".
<sect>Special keyboards<p>
+<sect1>Cherry G80-0777<p>
+According to <htmlurl name="FreeKEYB/kbdinfo.html"
+url="http://titan.informatik.uni-bonn.de/~frinke/FreeKEYB/kbdinfo.html">
+this keyboard has five additional keys with scancodes
+<bf>55</bf> (F11), <bf>56</bf> (F12),
+<bf>57</bf> (F13), <bf>58</bf> (F14), <bf>59</bf> (F15).
+
+<sect1>Amstrad/Schneider PC1512<p>
+This keyboard has a Del key on the keypad, and both Del-> and Del<- keys
+above the Enter key. The Del-> key has scancode <bf>70</bf>.
+There is an additional Enter key with scancode <bf>74</bf>.
+It is possible to connect a mouse and/or joystick to the keyboard,
+and then these devices also yield scancodes:
+<bf>77</bf> (joystick button 1), <bf>78</bf> (joystick button 2),
+<bf>79</bf> (joystick right), <bf>7a</bf> (joystick left),
+<bf>7b</bf> (joystick up), <bf>7c</bf> (joystick down),
+<bf>7d</bf> (mouse right), <bf>7e</bf> (mouse left).
+The Amstrad keyboard is entirely incompatible with XT and AT keyboards,
+and can be used only on an Amstrad; conversely, no other keyboard will
+work on an older Amstrad.
+
<sect1>Focus KeyPro FK-9000 keyboard<p>
-Raul D. Miller <rockwell@nova.umd.edu>
-and <hagmanti@cps.msu.edu> report:
+Raul D. Miller <<tt/rockwell@nova.umd.edu/>
+and Timothy C. Hagman <<tt/hagmanti@cps.msu.edu/>
+<!-- and William Setzer? -->
+report:
<p>
<it>
The keyboard is a KeyPro FK-9000. The FCC label says it's made in
@@ -368,7 +401,10 @@
<sect1>BTC keyboard<p>
This keyboard has one additional key, with escaped scancode
-<bf>e0</bf> <bf>6f</bf> (Macro).
+<bf>e0</bf> <bf>6f</bf> (Macro). (Funny enough it does this
+in all modes, each of the three scancode sets, translated or not.
+In particular, this Macro key is the only key that generates
+two bytes in scancode mode 3.)
<sect1>LK450 keyboard<p>
This keyboard has six additional keys, with escaped scancodes
@@ -388,7 +424,7 @@
<bf>6c</bf> scancode; I do not know the keycap.
<sect1>A Japanese 86/106 keyboard<p>
-Barry Yip <g609296@cc.win.or.jp> reports:
+Barry Yip <<tt/g609296@cc.win.or.jp/> reports:
<p>
<it>
This keyboard has two additional keys, with scancodes
@@ -398,8 +434,13 @@
name.
</it>
+<sect1>Trust Ergonomic keyboard<p>
+Frank v Waveren <<tt/fvw@var.cx/> reports:
+The Trust Ergo Track keyboard has one additional key (`application key'), with
+escaped scancode <bf>e0</bf> <bf>68</bf>. The keycap is a triangle pointing left.
+
<sect1>Brazilian keyboard<p>
-Arnaldo Moura <lumbago@vnet.ibm.com> reports:
+Arnaldo Moura <<tt/lumbago@vnet.ibm.com/> reports:
<p>
<it>
This keyboard has two unusual keys, with scancodes
@@ -418,7 +459,7 @@
<it>For enabling these functions, run BIOS setup.</it>
<sect1>RC930 keyboard<p>
-Torben Fjerdingstad <tfj@olivia.ping.dk> reports:
+Torben Fjerdingstad <<tt/tfj@olivia.ping.dk/> reports:
<p>
<it>
It's an rc930 keyboard, from Regnecentralen/RC International, Now ICL.
@@ -438,7 +479,7 @@
<sect1>Tandberg Data keyboard
<label id="prefix_80">
<p>
-Kjetil Torgrim Homme <kjetilho@ifi.uio.no> reports:
+Kjetil Torgrim Homme <<tt/kjetilho@ifi.uio.no/> reports:
<p>
<it>
My Tandberg Data keyboard uses the prefix <bf>80</bf> for
@@ -458,16 +499,59 @@
The <bf>e1</bf> scancode: <bf>1d</bf>.
As you can see, there is no overlap on this keyboard.
</it>
+<p>
+Harald Arnesen <<tt/gurre@start.no/> gives the keycaps
+for these for the Tandberg TDV5020 keyboard.
+All use prefix <bf>80</bf> on both press and release.
+<p>
+Thirteen keys have (Norwegian) text:
+<bf>11</bf> HJELP (help), <bf>14</bf> STRYK (cut),
+<bf>16</bf> KOPI (copy), <bf>17</bf> FLYTT (move),
+<bf>19</bf> JUST (justify), <bf>21</bf> MERK (mark),
+<bf>22</bf> ANGRE (undo), <bf>23</bf> SKRIV (print),
+<bf>25</bf> SLUTT (exit), <bf>26</bf> FELT (field),
+<bf>2f</bf> AVSN (paragraph), <bf>30</bf> SETN (sentence),
+and <bf>32</bf> ORD (word).
+<p>
+Seven keys have symbols: <bf>12</bf> /\/\/\ (insert soft hyphen),
+<bf>13</bf> [Crossed down-arrow] (move down five lines),
+<bf>18</bf> >> << (justify left/right),
+<bf>1e</bf> <> >< (justify full/center),
+<bf>1f</bf> |<- (backtab),
+<bf>20</bf> ->| (tab), and
+<bf>56</bf> [Back/down arrow] (start new paragraph).
+<p>
+Other keycaps also occur. Those given above were meant
+for use with the Notis WP word processor.
-<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>A Chinese keyboard<p>
+Bruno Haible <<tt/haible@ilog.fr/> reports:
+The keyboard has three keys <bf>e0</bf> <bf>5e</bf> (Power),
+<bf>e0</bf> <bf>5f</bf> (Sleep), <bf>e0</bf> <bf>63</bf> (WakeUp)
+in the following positions:
+
+<p><table><tabular ca="lllll">
+ | F10 F11 F12 | Power | Sleep | WakeUp @@
+..| Backspace | PrtScr | ScrLck | Pause @
+..| Return | Ins | Home | PgUp @
+..| Return | Del | End | PgDn @
+</tabular></table>
<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).
+The kscancodes (see <ref id="kscancodes" name="below">)
+are <bf>e0</bf> <bf>1f</bf>, <bf>e0</bf> <bf>27</bf> and
+<bf>e0</bf> <bf>2f</bf>, respectively.
+The USB key codes are usage page 0x07, usage index 227, 231, 101
+(decimal), respectively.
+Microsoft <htmlurl name="describes"
+url="http://www.microsoft.com/hwdev/download/desinit/scancode.zip">
+the intended use in detail. Both Windows keys are intended to be
+used as modifier keys, like both shift and control and alt keys.
+The Menu key may be modified by shift etc.
<sect1>Microsoft Internet keyboard<p>
In addition to the three extra keys on the Microsoft Natural keyboard,
@@ -482,34 +566,251 @@
<bf>e0</bf> <bf>6a</bf> (Back),
<bf>e0</bf> <bf>6b</bf> (My Computer),
<bf>e0</bf> <bf>6c</bf> (Mail).
+The kscancodes (see <ref id="kscancodes" name="below">) are
+<bf>e0</bf> <bf>2b</bf>, <bf>e0</bf> <bf>3a</bf>,
+<bf>e0</bf> <bf>3f</bf>, <bf>e0</bf> <bf>10</bf>,
+<bf>e0</bf> <bf>18</bf>, <bf>e0</bf> <bf>28</bf>,
+<bf>e0</bf> <bf>30</bf>, <bf>e0</bf> <bf>38</bf>,
+<bf>e0</bf> <bf>40</bf>, <bf>e0</bf> <bf>48</bf>,
+respectively.
+
+<sect1>Microsoft Natural keyboard pro<p>
+Marco Melgazzi <<tt/marco@techie.com/> reports:
+The Microsoft Natural keyboard pro has 19 additional keys,
+with escaped scancodes
+<bf>e0</bf> <bf>6a</bf> (Back),
+<bf>e0</bf> <bf>69</bf> (Forward),
+<bf>e0</bf> <bf>68</bf> (Stop),
+<bf>e0</bf> <bf>67</bf> (Refresh),
+<bf>e0</bf> <bf>65</bf> (Search),
+<bf>e0</bf> <bf>66</bf> (Favorites),
+<bf>e0</bf> <bf>32</bf> (Web/Home),
+<bf>e0</bf> <bf>6c</bf> (Mail),
+<bf>e0</bf> <bf>20</bf> (Mute),
+<bf>e0</bf> <bf>2e</bf> (Volume -),
+<bf>e0</bf> <bf>30</bf> (Volume +),
+<bf>e0</bf> <bf>22</bf> (Play/Pause),
+<bf>e0</bf> <bf>24</bf> (Stop),
+<bf>e0</bf> <bf>10</bf> (Prev Track),
+<bf>e0</bf> <bf>19</bf> (Next Track),
+<bf>e0</bf> <bf>6d</bf> (Media),
+<bf>e0</bf> <bf>6b</bf> (My Computer),
+<bf>e0</bf> <bf>21</bf> (Calculator),
+<bf>e0</bf> <bf>5f</bf> (Sleep).
+(That is, we have the ten extra keys of the Microsoft Internet keyboard,
+with the same scancodes, and also Refresh, Mute, Volume -, Volume +,
+Play/Pause, Stop, Prev Track, Next Track, Media.)
<sect1>Logitech Internet keyboard<p>
-Jonathan DeBoer <deboer@ugrad.cs.ualberta.ca>
-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.)
+Jonathan DeBoer <<tt/deboer@ugrad.cs.ualberta.ca/> reports:
+This keyboard has 18 unusual keys.
+<p>
+<bf>e0</bf> <bf>7a</bf> (WWW),
+<bf>e0</bf> <bf>32</bf> (History),
+<bf>e0</bf> <bf>21</bf> (Open URL),
+<bf>e0</bf> <bf>23</bf> (Home),
+<bf>38</bf> <bf>2a</bf> <bf>0f</bf> <bf>8f</bf> (key press)
+<bf>8f</bf> <bf>b8</bf> <bf>aa</bf> (key release) (Send To Back) -
+this sequence simulates Alt+Shift+Tab, but contains two Tab releases,
+<bf>e0</bf> <bf>17</bf> (Print),
+<bf>e0</bf> <bf>10</bf> (Back),
+<bf>e0</bf> <bf>22</bf> (Forward),
+<bf>e0</bf> <bf>24</bf> (Stop),
+<bf>e0</bf> <bf>19</bf> (Refresh),
+<bf>e0</bf> <bf>1e</bf> (Search),
+<bf>e0</bf> <bf>12</bf> (Find),
+<bf>e0</bf> <bf>26</bf> (Add Favourite),
+<bf>e0</bf> <bf>18</bf> (Open Favourites),
+<bf>e0</bf> <bf>20</bf> (Hot Links),
+<bf>e0</bf> <bf>30</bf> (Scroll Up),
+<bf>e0</bf> <bf>2e</bf> (Scroll Down),
+<bf>e0</bf> <bf>25</bf> (Logitech).
+<p>
+
+Ryan Lortie <<tt/desertangel@globalserve.net/> writes:
+The "Logitech" key is used as a modifier.
+In windows, Logitech-Keypad+ increases volume, Logitech-Keypad- decreases.
+There is a conjoined dual-button key for "scroll".
+You press the top part to scroll up, the bottom to scroll down.
+
+<sect1>Compaq Armada laptop keyboard<p>
+Christian Gennerat <<tt/christian.gennerat@vz.cit.alcatel.fr/> writes:
+There are 4 extra keys on the Compaq Armada laptops.
+The four keys are located over the Esc-F1..F12, and are labelled *1-*4.
+Scancodes: <bf>65</bf>, <bf>67</bf>, <bf>69</bf>, <bf>6b</bf>.
+
+<sect1>Rapid Access keyboard<p>
+Dennis Bjorklund <<tt/dennisb@cs.chalmers.se/> writes:
+<p>
+I have a Rapid Access keyboard with some (14) extra buttons and
+two more leds then a normal pc keyboard. To activate the extra buttons
+one has to send the sequence <bf>ea</bf> <bf>71</bf>
+to the keyboard. Once that is done the extra keys generate normal
+e0xx sequences. To turn off the extra keys you send <bf>ea</bf> <bf>70</bf>.
+
+There are 14 keys:
+<p>
+<bf>e0</bf> <bf>25</bf> (Suspend),
+<bf>e0</bf> <bf>26</bf> (Help),
+<bf>e0</bf> <bf>32</bf> (Prg 1),
+<bf>e0</bf> <bf>17</bf> (Prg 2),
+<bf>e0</bf> <bf>30</bf> (Prg 3),
+<bf>e0</bf> <bf>2e</bf> (Prg 4),
+<bf>e0</bf> <bf>19</bf> (Play CD),
+<bf>e0</bf> <bf>24</bf> (CD Stop),
+<bf>e0</bf> <bf>22</bf> (CD Pause),
+<bf>e0</bf> <bf>1e</bf> (Vol -),
+<bf>e0</bf> <bf>29</bf> (Vol +),
+<bf>e0</bf> <bf>23</bf> (Prev song),
+<bf>e0</bf> <bf>21</bf> (Next song),
+<bf>e0</bf> <bf>12</bf> (Mute).
+<p>
+
+The Suspend and Mute buttons have extra leds on them.
+These are controlled by the sequence <bf>eb</bf> <bf>00</bf> <bf>xx</bf>
+where the <bf>xx</bf> controls the leds. Bit 2 controls the Suspend led and
+bit 5 controls the Mute led.
+
+<sect1>Rapid Access II keyboard<p>
+John Elliott <<tt/jce@seasip.demon.co.uk/> writes:
+<p>
+I have an IBM Rapid Access II keyboard (UK layout), which seems to
+generate codes that are similar - but not identical - to the Rapid Access
+keycodes listed above.
+
+Keys:
+<p>
+<bf>e0</bf> <bf>25</bf> (Green, "Internet"),
+<bf>e0</bf> <bf>26</bf> (Blue, "Internet shopping"),
+<bf>e0</bf> <bf>32</bf> (Yellow, "IBM Web support"),
+<bf>e0</bf> <bf>17</bf> (Purple),
+<bf>e0</bf> <bf>30</bf> (Red),
+<bf>e0</bf> <bf>2e</bf> (Cyan, "Help"),
+<bf>e0</bf> <bf>5f</bf> (White, "Standby" - has a LED),
+<bf>e0</bf> <bf>20</bf> (CD stop),
+<bf>e0</bf> <bf>22</bf> (CD play),
+<bf>e0</bf> <bf>24</bf> (CD back),
+<bf>e0</bf> <bf>12</bf> (CD fwd),
+<bf>e0</bf> <bf>21</bf> (Volume D),
+<bf>e0</bf> <bf>23</bf> (Volume U),
+<bf>e0</bf> <bf>1e</bf> (Mute - no LED).
+<p>
+
+There are also "back" and "forward" keys (one could think of them as
+"page left" and "page right" :-) ). They generate ALT+left and ALT+right
+respectively: <bf>38</bf> <bf>e0</bf> <bf>4b</bf> and
+<bf>38</bf> <bf>e0</bf> <bf>4d</bf>.
+
+
+<sect1>Chicony KBP-8993 keyboard<p>
+Matthijs Melchior <<tt/mmelchio@xs4all.nl/> reports:
+<p>
+The Chicony KBP-8993 keyboard is similar. It has 14 additional
+keys, enabled by sending <bf>ea</bf> <bf>71</bf> and disabled
+by sending <bf>ea</bf> <bf>70</bf>.
+
+These keys generate the following scan codes:
+<p>
+<bf>e0</bf> <bf>25</bf> (Moon),
+<bf>e0</bf> <bf>32</bf> (WWW),
+<bf>e0</bf> <bf>30</bf> (DOS),
+<bf>e0</bf> <bf>17</bf> (MyDoc),
+<bf>e0</bf> <bf>26</bf> (Menu),
+<bf>e0</bf> <bf>1e</bf> (zzZ),
+<bf>e0</bf> <bf>2e</bf> (Close),
+<bf>e0</bf> <bf>24</bf> (Stop),
+<bf>e0</bf> <bf>23</bf> (Back),
+<bf>e0</bf> <bf>22</bf> (Play),
+<bf>e0</bf> <bf>21</bf> (Forward),
+<bf>e0</bf> <bf>20</bf> (Mute),
+<bf>e0</bf> <bf>12</bf> (VolDown),
+<bf>e0</bf> <bf>19</bf> (VolUp).
+
+The two extra leds, above the Moon key, and next to the zzZ key
+are manipulated by sending: <bf>eb</bf> <bf>00</bf> <bf>0x</bf>,
+where bit 0 is the Moon led and bit 1 is the zzZ led.
+
+<sect1>Logitech Cordless Desktop Pro keyboard<p>
+Nick Rusnov <<tt/nick@grawk.net/> reports:
+<p>
+The special buttons on a Logitech Cordless Desktop Pro keyboard
+produce the following scancodes:
+<p>
+<bf>e0</bf> <bf>5f</bf> (Moon (sleep)),
+<bf>e0</bf> <bf>32</bf> (Homepage),
+<bf>e0</bf> <bf>6c</bf> (Mail),
+<bf>e0</bf> <bf>65</bf> (Search),
+<bf>e0</bf> <bf>66</bf> (runningguuy),
+<bf>e0</bf> <bf>20</bf> (Mute),
+<bf>e0</bf> <bf>2e</bf> (VolDown),
+<bf>e0</bf> <bf>30</bf> (VolUp),
+<bf>e0</bf> <bf>22</bf> (Play/Pause),
+<bf>e0</bf> <bf>24</bf> (Stop),
+<bf>e0</bf> <bf>10</bf> (Rewind),
+<bf>e0</bf> <bf>19</bf> (ff),
+<bf>e0</bf> <bf>21</bf> (Logitech).
+
+<sect1>Keyboards for HP Kayak and Vectra<p>
+Fons Rademakers <<tt/Fons.Rademakers@cern.ch/> writes:
+<p>
+<it>
+The electronics for this keyboard was first developed by HP's
+Home Products Division (HPD).
+They now make improved versions, which I don't know much about.
+We (HP Corporate PC Divisions, in Grenoble) reused the electronics,
+and changed the serigraphy printed on the keys.
+</it>
+<p><table>
+<tabular ca="cccccccccccccccccccc">
+ |Msg|TTl|WWW| ? |Lck| |
+ |Msg|Phn|WWW|xxx|Slp| |
+ |133|134|135|136|137| @
+ |Phn|S3 |S4 |S5 | i | |
+ |<<|>|||[] |>> |HP | |
+ |138|139|140|141|142| @
+ | | | | |Mut| |
+ | | | | |Mut| |
+ | | | | |143| @
+ | | | | |Vl+| |
+ | | | | |Vl+| |
+ | | | | |144| @
+ | | | | |VL-| |
+ | | | | |VL-| |
+ | | | | |145| @
+</tabular>
+<caption>
+Grenoble keyboard ------- Old HPD keyboard -------- key numbers
+</caption>
+</table>
+
+<p><table><tabular ca="ccccc">
+ | Key# | Scancode | Gren. Name | HPD name | ASCII @@
+ | 133 | <bf>e0 1e</bf> | Message/SC1 | Message | a @
+ | 134 | <bf>e0 12</bf> | Top Tools | Phone | e @
+ | 135 | <bf>e0 32</bf> | Web Browser | Internet | m @
+ | 136 | <bf>e0 17</bf> | Reminder | Shortcut | i @
+ | 137 | <bf>e0 25</bf> | Lock | Suspend | k @
+ | 138 | <bf>e0 23</bf> | Phone/SC2 | << | h @
+ | 139 | <bf>e0 22</bf> | ShortCut 3 | >|| | g @
+ | 140 | <bf>e0 24</bf> | ShortCut 4 | [] | j @
+ | 141 | <bf>e0 21</bf> | ShortCut 5 | >> | f @
+ | 142 | <bf>e0 26</bf> | Information | Information | l @
+ | 143 | <bf>e0 20</bf> | Mute | Mute | d @
+ | 144 | <bf>e0 30</bf> | Volume + | Volume + | b @
+ | 145 | <bf>e0 2e</bf> | Volume - | Volume - | c @
+</tabular></table>
+
+<it>
+Note the scancodes above are those read by x86 software in port 0x60.
+This is also called Scancode Set 1.
+Break codes are the same, with bit 7 of the second scancode set.
+Example:</it> <bf>e0 9e</bf> <it>for the Message key.
+</it>
<sect1>A keyboard using e0 as ordinary scancode
<label id="e0_as_key">
<p>
-Benjamin Carter <bcarter@ultra5.cs.umr.edu> reports:
+Benjamin Carter <<tt/bcarter@ultra5.cs.umr.edu/> reports:
<p>
<it>
I recently came into possession of a 97-key keyboard with Japanese
@@ -605,13 +906,13 @@
<p>
There are more keyboards that do not use <bf>e0</bf> as escape code.
-For example, Paul Schulz <pauls@caemrad.com.au>
+For example, Paul Schulz <<tt/pauls@caemrad.com.au/>
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 <staikos@0wned.org> writes:
+George Staikos <<tt/staikos@0wned.org/> writes:
<p><it>
I have an IBM ThinkPad i1460. It has the IBM EasyLaunch<tm> keys.
These are four multicoloured keys up at the top of the keyboard
@@ -622,13 +923,38 @@
Also, being a laptop, it has an FN key. This key generates <bf>55</bf>.
</it>
+<sect1>A keyboard<p>
+Jon Masters <<tt/jonathan@easypenguin.co.uk/> writes:
+<p><it>
+My new 121 key keyboard has 105 keys + 16 multimedia keys
+(including cool stuff like a volume jog dial that sends one scancode
+when turned one way and anther when turned the opposite way).
+</it>
+<p>
+<bf>e0</bf> <bf>5e</bf> (Power Off),
+<bf>e0</bf> <bf>5f</bf> (Sleep),
+<bf>e0</bf> <bf>63</bf> (Resume),
+<bf>e0</bf> <bf>2e</bf> (Help),
+<bf>e0</bf> <bf>20</bf> (My Favourite),
+<bf>e0</bf> <bf>30</bf> (Browser),
+<bf>e0</bf> <bf>32</bf> (WWW Search),
+<bf>e0</bf> <bf>26</bf> (Shortcut),
+<bf>e0</bf> <bf>25</bf> (Volume Down),
+<bf>e0</bf> <bf>1e</bf> (Volume Up),
+<bf>e0</bf> <bf>12</bf> (Mute),
+<bf>e0</bf> <bf>22</bf> (Previous),
+<bf>e0</bf> <bf>10</bf> (Stop),
+<bf>e0</bf> <bf>24</bf> (Next),
+<bf>e0</bf> <bf>21</bf> (Eject),
+<bf>e0</bf> <bf>19</bf> (Play).
+
<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 <fray@kernel.crashing.org> wrote:
+Mark Hatle <<tt/fray@kernel.crashing.org/> wrote:
<p>
<it>
On some ADB keyboards there are actually 128 distinct keys.
@@ -658,6 +984,215 @@
be 65536 scancodes, currently though only 128 are defined.
</it>
+<sect1>A keyboard treating PrtSc/SysRq like Pause/Break<p>
+<label id="mtek">
+Mike A. Harris <<tt/mharris@meteng.on.ca/>
+reports a keyboard (an "Mtek" keyboard, model "K208")
+where PrtSc/SysRq behaves like Pause/Break and also sends both make
+and break sequences when pressed and nothing when released.
+It does not repeat.
+(Thus, he gets <bf>e0</bf> <bf>2a</bf> <bf>e0</bf> <bf>37</bf>
+<bf>e0</bf> <bf>b7</bf> <bf>e0</bf> <bf>aa</bf> for PrtSc press,
+and <bf>54</bf> <bf>d4</bf> for SysRq (i.e., Alt+PrtSc).)
+
+
+<sect>Keyboard-internal scancodes
+<label id="kscancodes">
+<p>
+<sect1>Three scancode sets<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>
+Set 1 contains the values that the XT keyboard (with only one set
+of scancodes) produced, with extensions for new keys. Someone
+decided that another numbering was more logical and invented
+scancode Set 2. However, it was realized that new scancodes
+would break old programs, so the keyboard output was fed to a
+8042 microprocessor on the motherboard that could translate Set 2
+back into Set 1. Indeed a smart construction. This is the default today.
+Finally there is the PS/2 version, Set 3, used by nobody.
+<p>
+Sets 2 and 3 are designed to be translated by the 8042.
+Set 1 should not be translated.
+<p>
+Not all keyboards support all scancode sets. For example, my MyCom
+laptop only supports scancode Set 2, and its keyboard does not react
+at all when in mode 1 or 3.
+<p>
+<sect1>Make and Break codes<p>
+The key press / key release is coded as follows:
+For Set 1, if the make code of a key is <it>c</it>, the break code
+will be <it>c</it>+0x80. If the make code is <bf>e0</bf> <it>c</it>,
+the break code will be <bf>e0</bf> <it>c</it>+0x80.
+The Pause key has make code <bf>e1</bf> <bf>1d</bf> <bf>45</bf>
+<bf>e1</bf> <bf>9d</bf> <bf>c5</bf> and does not generate a break code.
+For Set 2, if the make code of a key is <it>c</it>, the break code
+will be <bf>f0</bf> <it>c</it>. If the make code is <bf>e0</bf> <it>c</it>,
+the break code will be <bf>e0</bf> <bf>f0</bf> <it>c</it>.
+The Pause key has make code <bf>e1</bf> <bf>14</bf> <bf>77</bf>
+<bf>e1</bf> <bf>f0</bf> <bf>14</bf> <bf>f0</bf> <bf>77</bf>.
+For Set 3, by default most keys do not generate a break code - only CapsLock,
+LShift, RShift, LCtrl and LAlt do.
+(On Microsoft keyboards, also LWin, RWin, Menu, Back, Forward, Stop,
+Mail, Search, Favorites, Web/Home, MyComputer, Calculator, Sleep do.
+On a BTC keyboard, also the Macro key does.)
+However, in Scancode Mode 3 it is possible to enable or disable key repeat
+and the production of break codes either on a key-by-key basis
+or for all keys at once.
+And just like for Set 2, key release is indicated by a <bf>f0</bf> prefix
+in those cases where it is indicated.
+There is nothing special with the Pause key in scancode mode 3.
+<p>
+<sect1>Translation<p>
+The 8042 microprocessor translates the incoming byte stream produced
+by the keyboard, and turns an <bf>f0</bf> prefix into an OR with
+<bf>80</bf> for the next byte.
+<label id="contagious">
+(Some implementations do this for the next byte that does not have
+this bit set already. A consequence is that in Set 3 the keys with Set-3
+value 0x80 or more are broken in a peculiar way: hitting such a key and
+then some other key turns the make code for this last key into a break code.
+For example the Sleep key on a Microsoft Internet keyboard generates
+<bf>54</bf> / <bf>d4</bf> for press/release. But pressing and
+releasing first Menu and then Sleep produces
+<bf>8d</bf> <bf>8d</bf> <bf>d4</bf> <bf>d4</bf> as translation of
+<bf>8d</bf> <bf>f0</bf> <bf>8d</bf> <bf>54</bf> <bf>f0</bf> <bf>54</bf>.
+Other implementations are OK.)
+<p>
+Unless told not to translate, the keyboard controller translates
+kscancodes into scancodes using the following table (in hex):
+
+<p><table><tabular ca="c|cccccccccccccccc">
+ | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0a | 0b | 0c | 0d | 0e | 0f @@
+00 | ff | 43 | 41 | 3f | 3d | 3b | 3c | 58 | 64 | 44 | 42 | 40 | 3e | 0f | 29 | 59 @
+10 | 65 | 38 | 2a | 70 | 1d | 10 | 02 | 5a | 66 | 71 | 2c | 1f | 1e | 11 | 03 | 5b @
+20 | 67 | 2e | 2d | 20 | 12 | 05 | 04 | 5c | 68 | 39 | 2f | 21 | 14 | 13 | 06 | 5d @
+30 | 69 | 31 | 30 | 23 | 22 | 15 | 07 | 5e | 6a | 72 | 32 | 24 | 16 | 08 | 09 | 5f @
+40 | 6b | 33 | 25 | 17 | 18 | 0b | 0a | 60 | 6c | 34 | 35 | 26 | 27 | 19 | 0c | 61 @
+50 | 6d | 73 | 28 | 74 | 1a | 0d | 62 | 6e | 3a | 36 | 1c | 1b | 75 | 2b | 63 | 76 @
+60 | 55 | 56 | 77 | 78 | 79 | 7a | 0e | 7b | 7c | 4f | 7d | 4b | 47 | 7e | 7f | 6f @
+70 | 52 | 53 | 50 | 4c | 4d | 48 | 01 | 45 | 57 | 4e | 51 | 4a | 37 | 49 | 46 | 54 @
+80 | 80?| 81 | 82 | 41 | 54 | 85 | 86 | 87 | 88 | 89 | 8a | 8b | 8c | 8d | 8e | 8f @
+90 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 9a | 9b | 9c | 9d | 9e | 9f @
+a0 | a0 | a1 | a2 | a3 | a4 | a5 | a6 | a7 | a8 | a9 | aa | ab | ac | ad | ae | af @
+b0 | b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8 | b9 | ba | bb | bc | bd | be | bf @
+c0 | c0 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | ca | cb | cc | cd | ce | cf @
+d0 | d0 | d1 | d2 | d3 | d4 | d5?| d6?| d7 | d8 | d9?| da?| db | dc | dd | de?| df @
+e0 | e0 | e1 | e2?| e3?| e4?| e5 | e6 | e7?| e8 | e9 | ea | eb | ec | ed?| ee?| ef?@
+f0 | - | f1?| f2?| f3?| f4?| f5?| f6?| f7?| f8?| f9?| fa?| fb?| fc?| fd?| fe?| ff @
+</tabular></table>
+
+A reference for the first half of this table is the book by Gary J Konzak
+<it>PC 8042 Controller</it>, ISBN 0-929392-21-3.
+(Report by <tt/vojtech@suse.cz/.)
+
+A way to check this table is: (i) put the keyboard in untranslated modes 1, 2, 3
+and look at the <htmlurl name="resulting values" url="table.h">, and
+(ii) put the keyboard in translated scancode modes 1, 2, 3. Now compare
+the values. The entries with question marks were not checked in this way.
+
+Note that the range <bf>01</bf>-<bf>7f</bf> of this table is 1-1.
+In the second half of the table, translated and untranslated values
+are equal in all known cases, with the two exceptions <bf>83</bf> and <bf>84</bf>.
+
+One asks the controller to transmit untranslated scancodes by writing
+a keyboard controller command with bit 5 set and bit 6 cleared.
+E.g., use the command byte <bf>45</bf> to get translated codes,
+and <bf>24</bf> to get untranslated codes that do not cause interrupts.
+
+<sect1>Use<p>
+Can these other scancode sets be used? Probably not.
+
+(i) My MyCom laptop does not support scancode sets 1 and 3 at all.
+
+(ii) Some laptops have special key combinations that bring one
+into a setup or configuration utility. It is impossible to do
+anything useful, or to get out of it again, when the scancode mode
+is not translated Set 2.
+
+(iii) Many keyboards have bugs in scancode sets 1 and/or 3 but
+are fine in scancode Set 2.
+Vojtech Pavlik reports that his BTC keyboard has the same codes
+for the '1' and '2' keys in Set3, both having the code for '1').
+On my BTC keyboard the key up value for Esc and 1 are both <bf>ff</bf>
+in scancode Set 1.
+
+(iv) A big advantage of Set 3 is that each key generates a unique code
+so that one does not need to parse sequences. However, the BTC keyboard
+mentioned above generates <bf>e0</bf> <bf>6f</bf> for its Macro key
+also in scancode mode 3.
+
+(v) Some keyboard controllers cannot handle Set 3 values that are
+larger than 0x7f, and give <ref id="contagious" name="peculiar results">
+for some keys on the Microsoft Internet keyboard in translated
+scancode mode 3.
+
+(vi) The USB legacy support only supports translated Set 2.
+
+(vii) The <htmlurl name="Microsoft Keyboard Scan Code Specification"
+url="http://www.microsoft.com/hwdev/download/desinit/scancode.zip"> writes:
+<it>In the very early days of Windows NT, an attempt was made
+to use the much more orthogonal Scan Code Set 3, but due to bugs
+in the implementation of this Scan Code Set on numerous OEM
+keyboards, the idea was abandoned.</it>
+And also <it>Scan Code Set 3 is not used or required for operation
+of Microsoft operating systems.</it>
+
+
+<sect>USB<p>
+The USB specification prescribes 16-bit keycodes for keyboard positions,
+identified with key captions for the usual US layout.
+Below the values are given in decimal. 0-3 are protocol values,
+namely NoEvent, ErrorRollOver, POSTFail, ErrorUndefined, respectively.
+The values 224-231 are for modifier keys.
+
+<p><table><tabular ca="cccccccccccc">
+ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 @
+- | err | err | err | A | B | C | D | E | F | G | H @@
+12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 @
+ I | J | K | L | M | N | O | P | Q | R | S | T @@
+24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 @
+ U | V | W | X | Y | Z | 1 | 2 | 3 | 4 | 5 | 6 @@
+36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 @
+ 7 | 8 | 9 | 0 | Enter | Esc | BSp | Tab | Space | - / _ | = / + | [ / { @@
+ 48 | 49 | 50 | 51 | 52 | 53 |
+ 54 | 55 | 56 | 57 | 58 | 59 @
+] / } | \ / | | ... | ; / : | ' / " | ` / ˜ |
+ , / < | . / > | / / ? | Caps Lock | F1 | F2 @@
+60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 @
+F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PrtScr | Scroll Lock @@
+ 72 | 73 | 74 | 75 | 76 | 77 |
+ 78 | 79 | 80 | 81 | 82 | 83 @
+Pause | Insert | Home | PgUp | Delete | End |
+ PgDn | Right | Left | Down | Up | Num Lock @@
+ 84 | 85 | 86 | 87 | 88 | 89 |
+ 90 | 91 | 92 | 93 | 94 | 95 @
+ KP / | KP * | KP - | KP + | KP Enter | KP 1 / End |
+KP 2 / Down | KP 3 / PgDn | KP 4 / Left | KP 5 | KP 6 / Right | KP 7 / Home @@
+ 96 | 97 | 98 | 99 | 100 | 101 |
+ 102 | 103 | 104 | 105 | 106 | 107 @
+KP 8 / Up | KP 9 / PgUp | KP 0 / Ins | KP . / Del | ... | Applic |
+ Power | KP = | F13 | F14 | F15 | F16 @@
+108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 @
+F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | Execute | Help | Menu | Select @@
+ 120 | 121 | 122 | 123 | 124 | 125 |
+ 126 | 127 | 128 | 129 | 130 | 131 @
+Stop | Again | Undo | Cut | Copy | Paste |
+Find | Mute | Volume Up | Volume Down | Locking Caps Lock | Locking Num Lock @@
+ 132 | 133 | 134 | 135 | 136 | 137 |
+ 138 | 139 | 140 | 141 | 142 | 143 @
+Locking Scroll Lock | KP , | KP = | Internat | Internat | Internat |
+ Internat | Internat | Internat | Internat | Internat | Internat @@
+ 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 @
+LANG | LANG | LANG | LANG | LANG | LANG | LANG | LANG | LANG | Alt Erase | SysRq | Cancel @@
+ 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 |165|166|167 @
+Clear | Prior | Return | Separ | Out | Oper | Clear / Again | CrSel / Props | ExSel | | @@@
+ 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 @
+LCtrl | LShift | LAlt | LGUI | RCtrl | RShift | RAlt | RGUI @@
+</tabular></table>
+
<sect>Reporting<p>
Additions and corrections are welcome.
Use <tt>showkey -s</tt> to get the scancodes.
diff --git a/doc/scancodes/sun4table.h b/doc/scancodes/sun4table.h
new file mode 100644
index 0000000..bbf3b4e
--- /dev/null
+++ b/doc/scancodes/sun4table.h
@@ -0,0 +1,130 @@
+/* Sun scancode stuff - type4 keyboard - aeb, 991217 */
+
+struct keycode {
+ unsigned int raw;
+ char *name; /* keycap on a standard US keyboard */
+} keycodes[] = {
+ /* Left block */
+ 01, "L1 / Stop",
+ 03, "L2 / Again",
+ 19, "L3 / Props",
+ 1a, "L4 / Undo",
+ 31, "L5 / Front",
+ 33, "L6 / Copy",
+ 48, "L7 / Open",
+ 49, "L8 / Paste",
+ 5f, "L9 / Find",
+ 61, "L10 / Cut",
+ 76, "Help",
+
+ /* Top row */
+ 05, "F1",
+ 06, "F2",
+ 08, "F3",
+ 0a, "F4",
+ 0c, "F5",
+ 0e, "F6",
+ 10, "F7",
+ 11, "F8",
+ 12, "F9",
+ 07, "F10",
+ 09, "F11",
+ 0b, "F12",
+ 58, "\\|",
+ 42, "Delete",
+
+ /* 2nd row */
+ 1d, "Esc",
+ 1e, "1!",
+ 1f, "2@",
+ 20, "3#",
+ 21, "4$",
+ 22, "5%E",
+ 23, "6^",
+ 24, "7&",
+ 25, "8*",
+ 26, "9(",
+ 27, "0)",
+ 28, "-_",
+ 29, "=+",
+ 2b, "Backspace",
+
+ /* 3rd row */
+ 35, "Tab",
+ 36, "Q",
+ 37, "W",
+ 38, "E",
+ 39, "R",
+ 3a, "T",
+ 3b, "Y",
+ 3c, "U",
+ 3d, "I",
+ 3e, "O",
+ 3f, "P",
+ 40, "[{",
+ 41, "]}",
+ 59, "Return",
+
+ /* 4th row */
+ 4c, "Ctrl",
+ 4d, "A",
+ 4e, "S",
+ 4f, "D",
+ 50, "F",
+ 51, "G",
+ 52, "H",
+ 53, "J",
+ 54, "K",
+ 55, "L",
+ 56, ";:",
+ 57, "'\"",
+ 2a, "`~",
+
+ /* 5th row */
+ 63, "LShift",
+ 64, "Z",
+ 65, "X",
+ 66, "C",
+ 67, "V",
+ 68, "B",
+ 69, "N",
+ 6a, "M",
+ 6b, ",<",
+ 6c, ".>",
+ 6d, "/?",
+ 6e, "RShift",
+ 6f, "LineFeed",
+
+ /* 6th row */
+ 77, "CapsLock",
+ 13, "Alt",
+ 78, "LDiamond",
+ 79, "space",
+ 7a, "RDiamond",
+ 43, "Compose",
+ 0d, "AltGr",
+
+ /* Right block */
+ 15, "R1 / Pause",
+ 16, "R2 / PrSc",
+ 17, "R3 / ScrollLock",
+ 2d, "R4 / =",
+ 2e, "R5 / /",
+ 2f, "R6 / *",
+ 44, "R7 / 7 / Home",
+ 45, "R8 / 8 / Up",
+ 46, "R9 / 9 / PgUp",
+ 5b, "R10 / 4 / Left",
+ 5c, "R11 / 5",
+ 5d, "R12 / 6 / Right",
+ 70, "R13 / 1 / End",
+ 71, "R14 / 2 / Down",
+ 72, "R15 / 3 / PgDn",
+
+ 62, "NumLock",
+ 47, "KP--",
+ 7d, "KP-+",
+ 5e, "KP-0 / Ins",
+ 32, "KP-. / Del",
+ 5a, "KP-Enter",
+};
diff --git a/doc/scancodes/table.h b/doc/scancodes/table.h
new file mode 100644
index 0000000..6540282
--- /dev/null
+++ b/doc/scancodes/table.h
@@ -0,0 +1,170 @@
+/* Scancode stuff - aeb, 991216 */
+
+/* translation from keyboard to scancode - the 8042 table */
+
+unsigned char ttable[256] = {
+0xff,0x43,0x41,0x3f,0x3d,0x3b,0x3c,0x58,0x64,0x44,0x42,0x40,0x3e,0x0f,0x29,0x59,
+0x65,0x38,0x2a,0x70,0x1d,0x10,0x02,0x5a,0x66,0x71,0x2c,0x1f,0x1e,0x11,0x03,0x5b,
+0x67,0x2e,0x2d,0x20,0x12,0x05,0x04,0x5c,0x68,0x39,0x2f,0x21,0x14,0x13,0x06,0x5d,
+0x69,0x31,0x30,0x23,0x22,0x15,0x07,0x5e,0x6a,0x72,0x32,0x24,0x16,0x08,0x09,0x5f,
+0x6b,0x33,0x25,0x17,0x18,0x0b,0x0a,0x60,0x6c,0x34,0x35,0x26,0x27,0x19,0x0c,0x61,
+0x6d,0x73,0x28,0x74,0x1a,0x0d,0x62,0x6e,0x3a,0x36,0x1c,0x1b,0x75,0x2b,0x63,0x76,
+0x55,0x56,0x77,0x78,0x79,0x7a,0x0e,0x7b,0x7c,0x4f,0x7d,0x4b,0x47,0x7e,0x7f,0x6f,
+0x52,0x53,0x50,0x4c,0x4d,0x48,0x01,0x45,0x57,0x4e,0x51,0x4a,0x37,0x49,0x46,0x54,
+0x80,0x81,0x82,0x41,0x54,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
+0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
+0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
+0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
+0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
+0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
+0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
+0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
+};
+
+/* some entries guessed - see scancodes.sgml */
+
+
+/* Untranslated scancodes, and USB key values.
+ For translated values, feed through ttable[].
+
+ I also included Vojtech Pavlik's scancodes.h in this directory.
+ It mostly agrees with this table, but lacks
+ Microsoft Internet keys, and misses some set1 values. */
+
+struct keycode {
+ unsigned int position, usb, set1, set2, set3;
+ char *name; /* keycap on a standard US keyboard */
+} keycodes[] = {
+ 1, 53, 0x29, 0x0e, 0x0e, "`~",
+ 2, 30, 0x02, 0x16, 0x16, "1!",
+ 3, 31, 0x03, 0x1e, 0x1e, "2@",
+ 4, 32, 0x04, 0x26, 0x26, "3#",
+ 5, 33, 0x05, 0x25, 0x25, "4$",
+ 6, 34, 0x06, 0x2e, 0x2e, "5%E",
+ 7, 35, 0x07, 0x36, 0x36, "6^",
+ 8, 36, 0x08, 0x3d, 0x3d, "7&",
+ 9, 37, 0x09, 0x3e, 0x3e, "8*",
+ 10, 38, 0x0a, 0x46, 0x46, "9(",
+ 11, 39, 0x0b, 0x45, 0x45, "0)",
+ 12, 45, 0x0c, 0x4e, 0x4e, "-_",
+ 13, 46, 0x0d, 0x55, 0x55, "=+",
+ 15, 42, 0x0e, 0x66, 0x66, "Backspace",
+
+ 16, 43, 0x0f, 0x0d, 0x0d, "Tab",
+ 17, 20, 0x10, 0x15, 0x15, "Q",
+ 18, 26, 0x11, 0x1d, 0x1d, "W",
+ 19, 8, 0x12, 0x24, 0x24, "E",
+ 20, 21, 0x13, 0x2d, 0x2d, "R",
+ 21, 23, 0x14, 0x2c, 0x2c, "T",
+ 22, 28, 0x15, 0x35, 0x35, "Y",
+ 23, 24, 0x16, 0x3c, 0x3c, "U",
+ 24, 12, 0x17, 0x43, 0x43, "I",
+ 25, 18, 0x18, 0x44, 0x44, "O",
+ 26, 19, 0x19, 0x4d, 0x4d, "P",
+ 27, 47, 0x1a, 0x54, 0x54, "[{",
+ 28, 48, 0x1b, 0x5b, 0x5b, "]}",
+ 29, 49, 0x2b, 0x5d, 0x5c, "\\|",
+
+ 30, 57, 0x3a, 0x58, 0x14, "CapsLock",
+ 31, 04, 0x1e, 0x1c, 0x1c, "A",
+ 32, 22, 0x1f, 0x1b, 0x1b, "S",
+ 33, 7, 0x20, 0x23, 0x23, "D",
+ 34, 9, 0x21, 0x2b, 0x2b, "F",
+ 35, 10, 0x22, 0x34, 0x34, "G",
+ 36, 11, 0x23, 0x33, 0x33, "H",
+ 37, 13, 0x24, 0x3b, 0x3b, "J",
+ 38, 14, 0x25, 0x42, 0x42, "K",
+ 39, 15, 0x26, 0x4b, 0x4b, "L",
+ 40, 51, 0x27, 0x4c, 0x4c, ";:",
+ 41, 52, 0x28, 0x52, 0x52, "'\"",
+ 42, 50, 0, 0, 0, "non-US-1",
+ 43, 40, 0x1c, 0x5a, 0x5a, "Enter",
+
+ 44, 225, 0x2a, 0x12, 0x12, "LShift",
+ 46, 29, 0x2c, 0x1a, 0x1a, "Z",
+ 47, 27, 0x2d, 0x22, 0x22, "X",
+ 48, 6, 0x2e, 0x21, 0x21, "C",
+ 49, 25, 0x2f, 0x2a, 0x2a, "V",
+ 50, 5, 0x30, 0x32, 0x32, "B",
+ 51, 17, 0x31, 0x31, 0x31, "N",
+ 52, 16, 0x32, 0x3a, 0x3a, "M",
+ 53, 54, 0x33, 0x41, 0x41, ",<",
+ 54, 55, 0x34, 0x49, 0x49, ".>",
+ 55, 56, 0x35, 0x4a, 0x4a, "/?",
+ 57, 229, 0x36, 0x59, 0x59, "RShift",
+
+ 58, 224, 0x1d, 0x14, 0x11, "LCtrl",
+ 60, 226, 0x38, 0x11, 0x19, "LAlt",
+ 61, 44, 0x39, 0x29, 0x29, "space",
+ 62, 230, 0xe038, 0xe011, 0x39, "RAlt",
+ 64, 228, 0xe01d, 0xe014, 0x58, "RCtrl",
+
+ 75, 73, 0xe052, 0xe070, 0x67, "Insert",
+ 76, 76, 0xe053, 0xe071, 0x64, "Delete",
+ 80, 74, 0xe047, 0xe06c, 0x6e, "Home",
+ 81, 77, 0xe04f, 0xe069, 0x65, "End",
+ 85, 75, 0xe049, 0xe07d, 0x6f, "PgUp",
+ 86, 78, 0xe051, 0xe07a, 0x6d, "PgDn",
+
+ 79, 80, 0xe04b, 0xe06b, 0x61, "Left",
+ 83, 82, 0xe048, 0xe075, 0x63, "Up",
+ 84, 81, 0xe050, 0xe072, 0x60, "Down",
+ 89, 79, 0xe04d, 0xe074, 0x6a, "Right",
+
+ 90, 83, 0x45, 0x77, 0x76, "NumLock",
+ 91, 95, 0x47, 0x6c, 0x6c, "KP-7 / Home",
+ 92, 92, 0x4b, 0x6b, 0x6b, "KP-4 / Left",
+ 93, 89, 0x4f, 0x69, 0x69, "KP-1 / End",
+ 95, 84, 0xe035, 0xe04a, 0x77, "KP-/",
+ 96, 96, 0x48, 0x75, 0x75, "KP-8 / Up",
+ 97, 93, 0x4c, 0x73, 0x73, "KP-5",
+ 98, 90, 0x50, 0x72, 0x72, "KP-2 / Down",
+ 99, 98, 0x52, 0x70, 0x70, "KP-0 / Ins",
+ 100, 85, 0x37, 0x7c, 0x7e, "KP-*",
+ 101, 97, 0x49, 0x7d, 0x7d, "KP-9 / PgUp",
+ 102, 94, 0x4d, 0x74, 0x74, "KP-6 / Right",
+ 103, 91, 0x51, 0x7a, 0x7a, "KP-3 / PgDn",
+ 104, 99, 0x53, 0x71, 0x71, "KP-. / Del",
+ 105, 86, 0x4a, 0x7b, 0x84, "KP--",
+ 106, 87, 0x4e, 0x79, 0x7c, "KP-+",
+ 108, 88, 0xe01c, 0xe05a, 0x79, "KP-Enter",
+
+ 110, 41, 0x01, 0x76, 0x08, "Esc",
+ 112, 58, 0x3b, 0x05, 0x07, "F1",
+ 113, 59, 0x3c, 0x06, 0x0f, "F2",
+ 114, 60, 0x3d, 0x04, 0x17, "F3",
+ 115, 61, 0x3e, 0x0c, 0x1f, "F4",
+ 116, 62, 0x3f, 0x03, 0x27, "F5",
+ 117, 63, 0x40, 0x0b, 0x2f, "F6",
+ 118, 64, 0x41, 0x83, 0x37, "F7", /* Vojtech has 0x02 in set2 */
+ 119, 65, 0x42, 0x0a, 0x3f, "F8",
+ 120, 66, 0x43, 0x01, 0x47, "F9",
+ 121, 67, 0x44, 0x09, 0x4f, "F10",
+ 122, 68, 0x57, 0x78, 0x56, "F11",
+ 123, 69, 0x58, 0x07, 0x5e, "F12",
+
+ 124, 70, 0xe037, 0xe07c, 0x57, "PrtScr",
+ 0, 154, 0x54, 0x84, 0x57, "Alt+SysRq",
+ 125, 71, 0x46, 0x7e, 0x5f, "ScrollLock",
+ 126, 72, 0xe11d45, 0xe11477, 0x62, "Pause",
+ 0, 0, 0xe046, 0xe07e, 0x62, "Ctrl+Break",
+
+ /* Microsoft Windows and Internet keys and Power keys */
+ 0, 227, 0xe05b, 0xe01f, 0x8b, "LWin (USB: LGUI)",
+ 0, 231, 0xe05c, 0xe027, 0x8c, "RWin (USB: RGUI)",
+ 0, 0, 0xe05d, 0xe02f, 0x8d, "Menu",
+
+ 0, 0, 0xe06a, 0xe038, 0x38, "Back",
+ 0, 0, 0xe069, 0xe030, 0x30, "Forward",
+ 0, 0, 0xe068, 0xe028, 0x28, "Stop",
+ 0, 0, 0xe06c, 0xe048, 0x48, "Mail",
+ 0, 0, 0xe065, 0xe010, 0x10, "Search",
+ 0, 0, 0xe066, 0xe018, 0x18, "Favorites",
+ 0, 0, 0xe032, 0xe03a, 0x97, "Web / Home",
+
+ 0, 0, 0xe06b, 0xe040, 0x40, "My Computer",
+ 0, 0, 0xe021, 0xe02b, 0x99, "Calculator",
+ 0, 0, 0xe05f, 0xe03f, 0x7f, "Sleep",
+ 0, 0, 0xe05e, 0xe037, 0, "Power",
+ 0, 0, 0xe063, 0xe05e, 0, "Wake",
+};
diff --git a/man/Makefile b/man/Makefile
index 730e029..cc2fbae 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -1,3 +1,7 @@
+# Generated files
+GEN1=man1/dumpkeys.1 man1/loadkeys.1
+GEN8=man8/setfont.8 man8/loadunimap.8 man8/mapscrn.8
+
install:
for i in man?; do \
install -d -m 755 $(MANDIR)/$$i; \
@@ -6,4 +10,4 @@
rm -f $(MANDIR)/man5/keytables.5
clean:
- rm -f man1/dumpkeys.1 man1/loadkeys.1 man8/setfont.8
+ rm -f $(GEN1) $(GEN8)
diff --git a/man/man1/showkey.1 b/man/man1/showkey.1
index 06bd565..0c0f091 100644
--- a/man/man1/showkey.1
+++ b/man/man1/showkey.1
@@ -24,7 +24,10 @@
sequences the keyboard sends at once on a given key press. The scan code
dumping mode is primarily intended for debugging the keyboard driver or
other low level interfaces. As such it shouldn't be of much interest to
-the regular end-user.
+the regular end-user. However, some modern keyboards have keys or buttons
+that produce scancodes to which the kernel does not associate a keycode,
+and, after finding out what these are, the user can assign keycodes with
+.BR setkeycodes (8).
.LP
When in the default keycode dump mode,
.B showkey
@@ -66,5 +69,5 @@
.SH "SEE ALSO"
.BR loadkeys (1),
.BR dumpkeys (1),
-.BR keymaps (5)
-
+.BR keymaps (5),
+.BR setkeycodes (8)
diff --git a/man/man8/loadunimap.8 b/man/man8/loadunimap.8.in
similarity index 86%
rename from man/man8/loadunimap.8
rename to man/man8/loadunimap.8.in
index 6db18c3..15b1210 100644
--- a/man/man8/loadunimap.8
+++ b/man/man8/loadunimap.8.in
@@ -28,8 +28,10 @@
.B loadunimap
directly - its function is also built into
.BR setfont .
-.SH "FILES"
-/usr/lib/kbd/consoletrans is the default directory for mappings.
+.SH FILES
+.I @datadir@/unimaps
+is the default directory for unicode mappings.
.SH "SEE ALSO"
+.BR mapscrn (8),
.BR setfont (8)
diff --git a/man/man8/mapscrn.8 b/man/man8/mapscrn.8.in
similarity index 89%
rename from man/man8/mapscrn.8
rename to man/man8/mapscrn.8.in
index d071657..77c5273 100644
--- a/man/man8/mapscrn.8
+++ b/man/man8/mapscrn.8.in
@@ -37,7 +37,7 @@
.br
2. two-column text file
.br
-Format (1) is is an image of translation
+Format (1) is an image of translation
.I table.
Any time a character with the code
.I i
@@ -65,9 +65,12 @@
Note that blank, comma, tab character and '#' cannot be specified
with the 4th format.
.PP
-Note that control characters ( with codes < 32) cannot be re-mapped with
+Note that control characters (with codes < 32) cannot be re-mapped with
.I mapscrn
because they have special meaning for the driver.
+.SH FILES
+.I @datadir@/consoletrans
+is the default directory for screen mappings.
.SH "SEE ALSO"
.IR setfont (8)
.SH AUTHOR
diff --git a/man/man8/setfont.8.in b/man/man8/setfont.8.in
index 8a13307..f07e814 100644
--- a/man/man8/setfont.8.in
+++ b/man/man8/setfont.8.in
@@ -91,11 +91,13 @@
One may add a Unicode mapping table to a psf font using
.IR psfaddtable (1).
-.SH "FILES"
+.SH FILES
.I @datadir@/consolefonts
is the default font directory.
+.I @datadir@/unimaps
+is the default directory for unicode maps.
.I @datadir@/consoletrans
-is the default directory for mappings.
+is the default directory for screen mappings.
The default font is a file
.I default
(or
diff --git a/openvt/Makefile b/openvt/Makefile
index c183e7b..ac5cc11 100644
--- a/openvt/Makefile
+++ b/openvt/Makefile
@@ -28,5 +28,6 @@
install -c $(PROGS) $(BINDIR)
install -c $(MAN) $(MANDIR)
+# don't change 4711 to 0711 - this is the setuid target
setuid:
chmod 4711 $(BINDIR)/$(PROG)
diff --git a/openvt/README.cad b/openvt/README.cad
index 7a75af8..3d1524f 100644
--- a/openvt/README.cad
+++ b/openvt/README.cad
@@ -5,7 +5,7 @@
usage:
-In /etc/inittab cadd the lines
+In /etc/inittab add the lines
# What to do at the "Three Finger Salute".
ca::ctrlaltdel:openvt -sw /sbin/cad
diff --git a/openvt/cad b/openvt/cad
index aaf8b33..fc678fb 100755
--- a/openvt/cad
+++ b/openvt/cad
@@ -2,11 +2,12 @@
trap "" 0 1 2 15
-LOG=/tmp/w.log.$$
-dialog --clear
+tput clear
-w | egrep -v tty[1-8] | tail +2 > $LOG
-count=`wc -l < $LOG`
+# Find the non-local logins, probably on ttyp etc. Or on pts/N.
+# grep -E is equivalent to egrep but does not exist everywhere
+LOG="`w -s | egrep -v 'tty[0-9]' | tail +2`"
+count=`echo "$LOG" | wc -l`
dont_panic() {
dialog --infobox "
@@ -29,19 +30,17 @@
/sbin/shutdown -r now "sistema esta en shutdown"
else
dialog --yesno "
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-There are the following remote users in
+There are the following users in
the machine:
-`cat $LOG`
+`echo "$LOG"`
Shutdown will be delayed by 2 minutes
-inorder to warn the remote users.
+in order to warn the users.
Do you still want to start the shutdown?
-" 22 60
+" `expr 14 + $count` 70
if [ $? = 0 ];then
@@ -56,6 +55,6 @@
" 7 50 &
sleep 5
- dialog --clear
+ tput clear
fi
fi
diff --git a/openvt/openvt.1 b/openvt/openvt.1
index 9035dfd..c93bab0 100644
--- a/openvt/openvt.1
+++ b/openvt/openvt.1
@@ -1,6 +1,6 @@
.\" Copyright 1994-95 Jon Tombs (jon@gtex02.us.es, jon@robots.ox.ac.uk)
.\" May be distributed under the GNU General Public License
-.TH OPEN 1 V1.4 "19 Jul 1996" "Linux 1.x" "Linux Users' Manual"
+.TH OPENVT 1 V1.4 "19 Jul 1996" "Linux 1.x" "Linux Users' Manual"
.SH NAME
openvt \- start a program on a new virtual terminal (VT).
.SH SYNOPSIS
@@ -47,7 +47,7 @@
.SH NOTE
If
.B openvt
-is compiled with a POSIX (Gnu) getopt() and you wish to set
+is compiled with a POSIX (GNU) getopt() and you wish to set
options to the command to be run, then you must supply
the end of options \-\- flag before the command.
.BR
@@ -68,13 +68,15 @@
.I "openvt -- ls -l"
.BR
+.SH HISTORY
+Earlier,
+.B openvt
+was called
+.BR open .
+It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk.>
+The \-w idea is from "sam".
.SH "SEE ALSO"
.BR chvt (1),
.BR doshell (8),
-.BR login (1).
-
-.SH AUTHOR
-Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>
-.br
-\-w idea from "sam".
+.BR login (1)
diff --git a/po/Makefile b/po/Makefile
index 50ad758..a60f958 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -1,5 +1,5 @@
PACKAGE = kbd
-VERSION = 0.99
+VERSION = 1.04
include ../make_include
@@ -14,7 +14,7 @@
FOREIGN=
SHELL = /bin/sh
-prefix = /usr
+prefix = $(DESTDIR)/usr
exec_prefix = ${prefix}
datadir = $(prefix)/share
localedir = $(datadir)/locale
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
index b3b92ae..848f6b2 100644
--- a/po/cat-id-tbl.c
+++ b/po/cat-id-tbl.c
@@ -24,38 +24,39 @@
openvt: could not open %s R/W (%s)\n", 13},
{"openvt: could not deallocate console %d\n", 14},
{"usage: chvt N\n", 15},
- {"%s: deallocating all unused consoles failed\n", 16},
- {"%s: 0: illegal VT number\n", 17},
- {"%s: VT 1 is the console and cannot be deallocated\n", 18},
- {"%s: could not deallocate console %d\n", 19},
- {"KDGKBENT error at index 0 in table %d: ", 20},
- {"%s: cannot find any keymaps?\n", 21},
- {"%s: plain map not allocated? very strange ...\n", 22},
- {"KDGKBENT error at index %d in table %d: ", 23},
- {"keycode range supported by kernel: 1 - %d\n", 24},
- {"max number of actions bindable to a key: %d\n", 25},
- {"number of keymaps in actual use: %d\n", 26},
- {"of which %d dynamically allocated\n", 27},
- {"ranges of action codes supported by kernel:\n", 28},
- {"number of function keys supported by kernel: %d\n", 29},
- {"max nr of compose definitions: %d\n", 30},
- {"nr of compose definitions in actual use: %d\n", 31},
+ {"%s: unknown option\n", 16},
+ {"%s: deallocating all unused consoles failed\n", 17},
+ {"%s: 0: illegal VT number\n", 18},
+ {"%s: VT 1 is the console and cannot be deallocated\n", 19},
+ {"%s: could not deallocate console %d\n", 20},
+ {"KDGKBENT error at index 0 in table %d: ", 21},
+ {"%s: cannot find any keymaps?\n", 22},
+ {"%s: plain map not allocated? very strange ...\n", 23},
+ {"KDGKBENT error at index %d in table %d: ", 24},
+ {"keycode range supported by kernel: 1 - %d\n", 25},
+ {"max number of actions bindable to a key: %d\n", 26},
+ {"number of keymaps in actual use: %d\n", 27},
+ {"of which %d dynamically allocated\n", 28},
+ {"ranges of action codes supported by kernel:\n", 29},
+ {"number of function keys supported by kernel: %d\n", 30},
+ {"max nr of compose definitions: %d\n", 31},
+ {"nr of compose definitions in actual use: %d\n", 32},
{"\
Symbols recognized by %s:\n\
(numeric value, symbol)\n\
-\n", 32},
+\n", 33},
{"\
\n\
The following synonyms are recognized:\n\
-\n", 33},
- {"%-15s for %s\n", 34},
+\n", 34},
+ {"%-15s for %s\n", 35},
{"\
\n\
-Recognized modifier names and their column numbers:\n", 35},
- {"# not alt_is_meta: on keymap %d key %d is bound to", 36},
- {"impossible: not meta?\n", 37},
- {"KDGKBSENT failed at index %d: ", 38},
- {"dumpkeys version %s", 39},
+Recognized modifier names and their column numbers:\n", 36},
+ {"# not alt_is_meta: on keymap %d key %d is bound to", 37},
+ {"impossible: not meta?\n", 38},
+ {"KDGKBSENT failed at index %d: ", 39},
+ {"dumpkeys version %s", 40},
{"\
\n\
usage: dumpkeys [options...]\n\
@@ -71,34 +72,33 @@
\t --funcs-only\t display only the function key strings\n\
\t --keys-only\t display only key bindings\n\
\t --compose-only display only compose key combinations\n\
-\t-c --charset=", 40},
+\t-c --charset=", 41},
{"\
\t\t\t interpret character action codes to be from the\n\
-\t\t\t specified character set\n", 41},
- {"error executing %s\n", 42},
- {"usage: getkeycodes\n", 43},
- {"Plain scancodes xx (hex) versus keycodes (dec)\n", 44},
- {"0 is an error; for 1-88 (0x01-0x58) scancode equals keycode\n", 45},
+\t\t\t specified character set\n", 42},
+ {"error executing %s\n", 43},
+ {"usage: getkeycodes\n", 44},
+ {"Plain scancodes xx (hex) versus keycodes (dec)\n", 45},
+ {"0 is an error; for 1-88 (0x01-0x58) scancode equals keycode\n", 46},
{"\
\n\
\n\
-Escaped scancodes e0 xx (hex)\n", 46},
- {"failed to get keycode for scancode 0x%x\n", 47},
+Escaped scancodes e0 xx (hex)\n", 47},
+ {"failed to get keycode for scancode 0x%x\n", 48},
{"\
Usage:\n\
-\t%s [-s]\n", 48},
- {"strange... ct changed from %d to %d\n", 49},
- {"usage: kbd_mode [-a|-u|-k|-s]\n", 50},
- {"kbd_mode: error reading keyboard mode\n", 51},
- {"The keyboard is in raw (scancode) mode\n", 52},
- {"The keyboard is in mediumraw (keycode) mode\n", 53},
- {"The keyboard is in the default (ASCII) mode\n", 54},
- {"The keyboard is in Unicode (UTF-8) mode\n", 55},
- {"The keyboard is in some unknown mode\n", 56},
- {"%s: error setting keyboard mode\n", 57},
- {"Typematic Rate set to %.1f cps (delay = %d ms)\n", 58},
- {"Cannot open /dev/port", 59},
- {"kdfontop.c: only width 8 supported\n", 60},
+\t%s [-s]\n", 49},
+ {"strange... ct changed from %d to %d\n", 50},
+ {"usage: kbd_mode [-a|-u|-k|-s]\n", 51},
+ {"kbd_mode: error reading keyboard mode\n", 52},
+ {"The keyboard is in raw (scancode) mode\n", 53},
+ {"The keyboard is in mediumraw (keycode) mode\n", 54},
+ {"The keyboard is in the default (ASCII) mode\n", 55},
+ {"The keyboard is in Unicode (UTF-8) mode\n", 56},
+ {"The keyboard is in some unknown mode\n", 57},
+ {"%s: error setting keyboard mode\n", 58},
+ {"Typematic Rate set to %.1f cps (delay = %d ms)\n", 59},
+ {"Cannot open /dev/port", 60},
{"bug: getfont called with count<256\n", 61},
{"unknown charset %s - ignoring charset request\n", 62},
{"assuming iso-8859-1 %s\n", 63},
@@ -135,26 +135,26 @@
{"mapscrn: cannot open map file _%s_\n", 88},
{"Cannot stat map file", 89},
{"Loading symbolic screen map from file %s\n", 90},
- {"Error parsing symbolic map\n", 91},
+ {"Error parsing symbolic map from `%s'\n", 91},
{"Loading binary screen map from file %s\n", 92},
- {"Cannot read map from file", 93},
- {"Loaded screen map from `%s'\n", 94},
- {"mapscrn: format error detected in _%s_\n", 95},
- {"Error writing map to file", 96},
- {"Saved screen map in `%s'\n", 97},
- {"%s: short ucs2 unicode table\n", 98},
- {"%s: short utf8 unicode table\n", 99},
- {"%s: bad utf8\n", 100},
- {"%s: short unicode table\n", 101},
- {"%s: Error reading input font", 102},
- {"%s: Bad call of readpsffont\n", 103},
- {"%s: Unsupported psf file mode (%d)\n", 104},
- {"%s: Unsupported psf version (%d)\n", 105},
- {"%s: zero input font length?\n", 106},
- {"%s: zero input character size?\n", 107},
- {"%s: Input file: bad input length (%d)\n", 108},
- {"%s: Input file: trailing garbage\n", 109},
- {"appendunicode: illegal unicode %u\n", 110},
+ {"Error reading map from file `%s'\n", 93},
+ {"mapscrn: format error detected in _%s_\n", 94},
+ {"Error writing map to file", 95},
+ {"Saved screen map in `%s'\n", 96},
+ {"%s: short ucs2 unicode table\n", 97},
+ {"%s: short utf8 unicode table\n", 98},
+ {"%s: bad utf8\n", 99},
+ {"%s: short unicode table\n", 100},
+ {"%s: Error reading input font", 101},
+ {"%s: Bad call of readpsffont\n", 102},
+ {"%s: Unsupported psf file mode (%d)\n", 103},
+ {"%s: Unsupported psf version (%d)\n", 104},
+ {"%s: zero input font length?\n", 105},
+ {"%s: zero input character size?\n", 106},
+ {"%s: Input file: bad input length (%d)\n", 107},
+ {"%s: Input file: trailing garbage\n", 108},
+ {"appendunicode: illegal unicode %u\n", 109},
+ {"Cannot write font file header", 110},
{"%s: Warning: line too long\n", 111},
{"%s: Bad input line: %s\n", 112},
{"%s: Glyph number (0x%lx) past end of font\n", 113},
@@ -219,43 +219,46 @@
{"\
setfont: cannot both restore from character ROM and from file. Font \
unchanged.\n", 138},
- {"Bad character size %d\n", 139},
- {"%s: font position 32 is nonblank\n", 140},
- {"%s: wiped it\n", 141},
- {"%s: background will look funny\n", 142},
- {"Loading %d-char 8x%d font from file %s\n", 143},
- {"Loading %d-char 8x%d font\n", 144},
- {"%s: bug in do_loadtable\n", 145},
- {"Loading Unicode mapping table...\n", 146},
+ {"Bad character height %d\n", 139},
+ {"Bad character width %d\n", 140},
+ {"%s: font position 32 is nonblank\n", 141},
+ {"%s: wiped it\n", 142},
+ {"%s: background will look funny\n", 143},
+ {"Loading %d-char %dx%d font from file %s\n", 144},
+ {"Loading %d-char %dx%d font\n", 145},
+ {"Loading %d-char %dx%d (%d) font from file %s\n", 146},
+ {"Loading %d-char %dx%d (%d) font\n", 147},
+ {"%s: bug in do_loadtable\n", 148},
+ {"Loading Unicode mapping table...\n", 149},
{"\
It seems this kernel is older than 1.1.92\n\
-No Unicode mapping table loaded.\n", 147},
- {"Cannot open font file %s\n", 148},
- {"When loading several fonts, all must be psf fonts - %s isn't\n", 149},
- {"Read %d-char 8x%d font from file %s\n", 150},
- {"When loading several fonts, all must have the same pointsize\n", 151},
- {"Cannot find default font\n", 152},
- {"Cannot find %s font\n", 153},
- {"No final newline in combine file\n", 154},
- {"Too many files to combine\n", 155},
- {"Hmm - a font from restorefont? Using the first half.\n", 156},
- {"Bad input file size\n", 157},
+No Unicode mapping table loaded.\n", 150},
+ {"Cannot open font file %s\n", 151},
+ {"When loading several fonts, all must be psf fonts - %s isn't\n", 152},
+ {"Read %d-char %dx%d font from file %s\n", 153},
+ {"When loading several fonts, all must have the same height\n", 154},
+ {"When loading several fonts, all must have the same width\n", 155},
+ {"Cannot find default font\n", 156},
+ {"Cannot find %s font\n", 157},
+ {"No final newline in combine file\n", 158},
+ {"Too many files to combine\n", 159},
+ {"Hmm - a font from restorefont? Using the first half.\n", 160},
+ {"Bad input file size\n", 161},
{"\
This file contains 3 fonts: 8x8, 8x14 and 8x16. Please indicate\n\
-using an option -8 or -14 or -16 which one you want loaded.\n", 158},
- {"You asked for font size %d, but only 8, 14, 16 are possible here.\n", 159},
- {"Cannot write font file header", 160},
- {"Found nothing to save\n", 161},
- {"Cannot write font file", 162},
- {"Saved %d-char 8x%d font file on %s\n", 163},
+using an option -8 or -14 or -16 which one you want loaded.\n", 162},
+ {"You asked for font size %d, but only 8, 14, 16 are possible here.\n", 163},
+ {"Found nothing to save\n", 164},
+ {"Cannot write font file", 165},
+ {"Saved %d-char %dx%d font file on %s\n", 166},
{"\
usage: setkeycode scancode keycode ...\n\
(where scancode is either xx or e0xx, given in hexadecimal,\n\
- and keycode is given in decimal)\n", 164},
- {"even number of arguments expected", 165},
- {"error reading scancode", 166},
- {"code outside bounds", 167},
- {"failed to set scancode %x to keycode %d\n", 168},
+ and keycode is given in decimal)\n", 167},
+ {"even number of arguments expected", 168},
+ {"error reading scancode", 169},
+ {"code outside bounds", 170},
+ {"failed to set scancode %x to keycode %d\n", 171},
{"\
Usage:\n\
\tsetleds [-v] [-L] [-D] [-F] [[+|-][ num | caps | scroll %s]]\n\
@@ -268,52 +271,52 @@
(and these are usually reflected in the leds).\n\
With -L, setleds only sets the leds, and leaves the flags alone.\n\
With -D, setleds sets both the flags and the default flags, so\n\
-that a subsequent reset will not change the flags.\n", 169},
- {"Error reading current led setting. Maybe stdin is not a VT?\n", 170},
- {"Error reading current flags setting. Maybe an old kernel?\n", 171},
- {"Error reading current led setting from /dev/kbd.\n", 172},
- {"KIOCGLED unavailable?\n", 173},
- {"KIOCSLED unavailable?\n", 174},
- {"Error opening /dev/kbd.\n", 175},
- {"Error resetting ledmode\n", 176},
- {"Current default flags: ", 177},
- {"Current flags: ", 178},
- {"Current leds: ", 179},
+that a subsequent reset will not change the flags.\n", 172},
+ {"Error reading current led setting. Maybe stdin is not a VT?\n", 173},
+ {"Error reading current flags setting. Maybe an old kernel?\n", 174},
+ {"Error reading current led setting from /dev/kbd.\n", 175},
+ {"KIOCGLED unavailable?\n", 176},
+ {"KIOCSLED unavailable?\n", 177},
+ {"Error opening /dev/kbd.\n", 178},
+ {"Error resetting ledmode\n", 179},
+ {"Current default flags: ", 180},
+ {"Current flags: ", 181},
+ {"Current leds: ", 182},
{"\
unrecognized argument: _%s_\n\
-\n", 180},
- {"Old default flags: ", 181},
- {"New default flags: ", 182},
- {"Old flags: ", 183},
- {"New flags: ", 184},
- {"Old leds: ", 185},
- {"New leds: ", 186},
+\n", 183},
+ {"Old default flags: ", 184},
+ {"New default flags: ", 185},
+ {"Old flags: ", 186},
+ {"New flags: ", 187},
+ {"Old leds: ", 188},
+ {"New leds: ", 189},
{"\
Usage:\n\
\tsetmetamode [ metabit | meta | bit | escprefix | esc | prefix ]\n\
Each vt has his own copy of this bit. Use\n\
\tsetmetamode [arg] < /dev/ttyn\n\
to change the settings of another vt.\n\
-The setting before and after the change are reported.\n", 187},
- {"Meta key sets high order bit\n", 188},
- {"Meta key gives Esc prefix\n", 189},
- {"Strange mode for Meta key?\n", 190},
- {"Error reading current setting. Maybe stdin is not a VT?\n", 191},
- {"old state: ", 192},
- {"new state: ", 193},
- {"usage: %s\n", 194},
- {"failed to restore original translation table\n", 195},
+The setting before and after the change are reported.\n", 190},
+ {"Meta key sets high order bit\n", 191},
+ {"Meta key gives Esc prefix\n", 192},
+ {"Strange mode for Meta key?\n", 193},
+ {"Error reading current setting. Maybe stdin is not a VT?\n", 194},
+ {"old state: ", 195},
+ {"new state: ", 196},
+ {"usage: %s\n", 197},
+ {"failed to restore original translation table\n", 198},
{"\
usage: showfont\n\
-(probably after loading a font with `setfont font')\n", 196},
- {"cannot change translation table\n", 197},
- {"cannot change translation table??\n", 198},
- {"?UNKNOWN?", 199},
- {"kb mode was %s\n", 200},
+(probably after loading a font with `setfont font')\n", 199},
+ {"cannot change translation table\n", 200},
+ {"cannot change translation table??\n", 201},
+ {"?UNKNOWN?", 202},
+ {"kb mode was %s\n", 203},
{"\
[ if you are trying this under X, it might not work\n\
-since the X server is also reading /dev/console ]\n", 201},
- {"caught signal %d, cleaning up...\n", 202},
+since the X server is also reading /dev/console ]\n", 204},
+ {"caught signal %d, cleaning up...\n", 205},
{"\
showkey version %s\n\
\n\
@@ -324,17 +327,17 @@
\t-h --help\tdisplay this help text\n\
\t-a --ascii\tdisplay the decimal/octal/hex values of the keys\n\
\t-s --scancodes\tdisplay only the raw scan-codes\n\
-\t-k --keycodes\tdisplay only the interpreted keycodes (default)\n", 203},
+\t-k --keycodes\tdisplay only the interpreted keycodes (default)\n", 206},
{"\
\n\
Press any keys - Ctrl-D will terminate this program\n\
-\n", 204},
- {"press any key (program terminates 10s after last keypress)...\n", 205},
- {"keycode %3d %s\n", 206},
- {"release", 207},
- {"press", 208},
- {"%s: out of memory\n", 209},
- {"%s from %s\n", 210},
+\n", 207},
+ {"press any key (program terminates 10s after last keypress)...\n", 208},
+ {"keycode %3d %s\n", 209},
+ {"release", 210},
+ {"press", 211},
+ {"%s: out of memory\n", 212},
+ {"%s from %s\n", 213},
};
-int _msg_tbl_length = 210;
+int _msg_tbl_length = 213;
diff --git a/src/Makefile.in b/src/Makefile.in
index e838b68..4f9b392 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -9,6 +9,11 @@
BINDIR = /usr/bin
endif
+# Maybe we want to use a qwertz keyboard before /usr is mounted
+ifndef LOADKEYS_BINDIR
+LOADKEYS_BINDIR = /bin
+endif
+
PROGS = dumpkeys loadkeys showkey setfont showfont \
setleds setmetamode kbd_mode chvt deallocvt \
psfxtable kbdrate
@@ -27,9 +32,11 @@
OLDPROGS= mapscrn loadunimap
-MISC = screendump setvesablank spawn_console spawn_login \
+# Not installed by default
+MISC = screendump setlogcons setvesablank spawn_console spawn_login \
getunimap clrunimap fgconsole outpsfheader
+# Not installed by default
SHCMDS = unicode_start unicode_stop
WARN = -Wall -Wmissing-prototypes -Wstrict-prototypes
@@ -55,8 +62,10 @@
# install -s -m 0755 -o root $(MISC) $(BINDIR)
# install -c -m 0755 -o root $(SHCMDS) $(BINDIR)
for i in psfaddtable psfgettable psfstriptable; do \
- rm -f $(BINDIR)/$$i; ln -s $(BINDIR)/psfxtable $(BINDIR)/$$i; \
+ rm -f $(BINDIR)/$$i; ln -s psfxtable $(BINDIR)/$$i; \
done
+ rm -f $(BINDIR)/loadkeys
+ install -s -m 0755 -o root loadkeys $(LOADKEYS_BINDIR)
@echo "You may also want to add psf.magic to /usr/lib/magic"
@@ -93,8 +102,8 @@
catwithfont.o chvt.o clrunimap.o deallocvt.o dumpkeys.o fgconsole.o: getfd.h
getfd.o getkeycodes.o getunimap.o kbd_mode.o loadkeys.o loadunimap.o: getfd.h
-mapscrn.o resizecons.o setfont.o setkeycodes.o setvesablank.o: getfd.h
-showkey.o: getfd.h
+mapscrn.o resizecons.o setfont.o setkeycodes.o setlogcons.o: getfd.h
+setvesablank.o showkey.o: getfd.h
kdfontop.o setfont.o: kdfontop.h
@@ -114,7 +123,10 @@
psffontop.o psfxtable.o setfont.o: psffontop.h
-dumpkeys.o kbdrate.o loadkeys.o setfont.o showkey.o: version.h
+chvt.o deallocvt.o dumpkeys.o getkeycodes.o getunimap.o kbd_mode.o: version.h
+kbdrate.o loadkeys.o loadunimap.o mapscrn.o psfxtable.o resizecons.o: version.h
+screendump.o setfont.o setkeycodes.o setleds.o setmetamode.o: version.h
+showfont.o showkey.o totextmode.o: version.h
findfile.o loadunimap.o psffontop.o psfxtable.o setfont.o xmalloc.o: xmalloc.h
@@ -132,7 +144,7 @@
chvt clrunimap deallocvt dumpkeys fgconsole getkeycodes getunimap: getfd.o
kbd_mode loadkeys loadunimap mapscrn resizecons setkeycodes setfont: getfd.o
-setvesablank showkey: getfd.o
+setlogcons setvesablank showkey: getfd.o
setfont: mapscrn.o loadunimap.o kdfontop.o psffontop.o
diff --git a/src/cp1250.syms.h b/src/cp1250.syms.h
new file mode 100644
index 0000000..53a27eb
--- /dev/null
+++ b/src/cp1250.syms.h
@@ -0,0 +1,137 @@
+/*
+ * cp1250 symbols, aeb, 2000-12-29
+ * first half as usual; last quarter identical to latin-2 (iso 8859-2)
+ *
+ * No names have been introduced yet for the various quotation marks
+ */
+static sym cp1250_syms[] = { /* 128-255 */
+ { 0x20ac, "euro"}, /* 0200 */
+ { 0xfffd, ""},
+ { 0x201a, ""}, /* SINGLE LOW-9 QUOTATION MARK */
+ { 0xfffd, ""},
+ { 0x201e, ""}, /* DOUBLE LOW-9 QUOTATION MARK */
+ { 0x2026, "ellipsis"},
+ { 0x2020, "dagger"},
+ { 0x2021, "doubledagger"},
+ { 0xfffd, ""}, /* 0210 */
+ { 0x2030, "permille"},
+ { 0x0160, "Scaron"},
+ { 0x2039, ""}, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
+ { 0x015a, "Sacute"},
+ { 0x0164, "Tcaron"},
+ { 0x017d, "Zcaron"},
+ { 0x0179, "Zacute"},
+ { 0xfffd, ""}, /* 0220 */
+ { 0x2018, ""}, /* LEFT SINGLE QUOTATION MARK */
+ { 0x2019, ""}, /* RIGHT SINGLE QUOTATION MARK */
+ { 0x201c, ""}, /* LEFT DOUBLE QUOTATION MARK */
+ { 0x201d, ""}, /* RIGHT DOUBLE QUOTATION MARK */
+ { 0x2022, "bullet"},
+ { 0x2013, "endash"},
+ { 0x2014, "emdash"},
+ { 0xfffd, ""}, /* 0230 */
+ { 0x2122, "trademark"},
+ { 0x0161, "scaron"},
+ { 0x203a, ""}, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
+ { 0x015b, "sacute"},
+ { 0x0165, "tcaron"},
+ { 0x017e, "zcaron"},
+ { 0x017a, "zacute"},
+ { 0x00a0, ""}, /* 0240 */
+ { 0x02c7, "caron"},
+ { 0x02d8, "breve"},
+ { 0x0141, "Lstroke"},
+ { 0x00a4, ""},
+ { 0x0104, "Aogonek"},
+ { 0x00a6, ""},
+ { 0x00a7, ""},
+ { 0x00a8, ""}, /* 0250 */
+ { 0x00a9, ""},
+ { 0x015e, "Scedilla"},
+ { 0x00ab, ""},
+ { 0x00ac, ""},
+ { 0x00ad, ""},
+ { 0x00ae, ""},
+ { 0x017b, "Zabovedot"},
+ { 0x00b0, ""}, /* 0260 */
+ { 0x00b1, ""},
+ { 0x02db, "ogonek"},
+ { 0x0142, "lstroke"},
+ { 0x00b4, ""},
+ { 0x00b5, ""},
+ { 0x00b6, ""},
+ { 0x00b7, ""},
+ { 0x00b8, ""}, /* 0270 */
+ { 0x0105, "aogonek"},
+ { 0x015f, "scedilla"},
+ { 0x00bb, ""},
+ { 0x013d, "Lcaron"},
+ { 0x02dd, "doubleacute"},
+ { 0x013e, "lcaron"},
+/* from here identical to latin-2 */
+ { 0x017c, "zabovedot"},
+ { 0x0154, "Racute"}, /* 0300 */
+ { 0x00c1, "Aacute"},
+ { 0x00c2, "Acircumflex"},
+ { 0x0102, "Abreve"},
+ { 0x00c4, "Adiaeresis"},
+ { 0x0139, "Lacute"},
+ { 0x0106, "Cacute"},
+ { 0x00c7, "Ccedilla"},
+ { 0x010c, "Ccaron"}, /* 0310 */
+ { 0x00c9, "Eacute"},
+ { 0x0118, "Eogonek"},
+ { 0x00cb, "Ediaeresis"},
+ { 0x011a, "Ecaron"},
+ { 0x00cd, "Iacute"},
+ { 0x00ce, "Icircumflex"},
+ { 0x010e, "Dcaron"},
+ { 0x0110, "Dstroke"}, /* 0320 */
+ { 0x0143, "Nacute"},
+ { 0x0147, "Ncaron"},
+ { 0x00d3, "Oacute"},
+ { 0x00d4, "Ocircumflex"},
+ { 0x0150, "Odoubleacute"},
+ { 0x00d6, "Odiaeresis"},
+ { 0x00d7, "multiply"},
+ { 0x0158, "Rcaron"}, /* 0330 */
+ { 0x016e, "Uring"},
+ { 0x00da, "Uacute"},
+ { 0x0170, "Udoubleacute"},
+ { 0x00dc, "Udiaeresis"},
+ { 0x00dd, "Yacute"},
+ { 0x0162, "Tcedilla"},
+ { 0x00df, "ssharp"},
+ { 0x0155, "racute"}, /* 0340 */
+ { 0x00e1, "aacute"},
+ { 0x00e2, "acircumflex"},
+ { 0x0103, "abreve"},
+ { 0x00e4, "adiaeresis"},
+ { 0x013a, "lacute"},
+ { 0x0107, "cacute"},
+ { 0x00e7, "ccedilla"},
+ { 0x010d, "ccaron"}, /* 0350 */
+ { 0x00e9, "eacute"},
+ { 0x0119, "eogonek"},
+ { 0x00eb, "ediaeresis"},
+ { 0x011b, "ecaron"},
+ { 0x00ed, "iacute"},
+ { 0x00ee, "icircumflex"},
+ { 0x010f, "dcaron"},
+ { 0x0111, "dstroke"}, /* 0360 */
+ { 0x0144, "nacute"},
+ { 0x0148, "ncaron"},
+ { 0x00f3, "oacute"},
+ { 0x00f4, "ocircumflex"},
+ { 0x0151, "odoubleacute"},
+ { 0x00f6, "odiaeresis"},
+ { 0x00f7, "division"},
+ { 0x0159, "rcaron"}, /* 0370 */
+ { 0x016f, "uring"},
+ { 0x00fa, "uacute"},
+ { 0x0171, "udoubleacute"},
+ { 0x00fc, "udiaeresis"},
+ { 0x00fd, "yacute"},
+ { 0x0163, "tcedilla"},
+ { 0x02d9, "abovedot"},
+};
diff --git a/src/deallocvt.c b/src/deallocvt.c
index 9d70614..dbbf944 100644
--- a/src/deallocvt.c
+++ b/src/deallocvt.c
@@ -2,57 +2,65 @@
* disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
* Renamed deallocvt.
*/
+#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
+#include <ctype.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <linux/vt.h>
-#include <stdio.h>
#include "getfd.h"
#include "nls.h"
#include "version.h"
int
main(int argc, char *argv[]) {
- int fd, num, i;
+ int fd, num, i;
- if (argc < 1) /* unlikely */
- exit(1);
- set_progname(argv[0]);
+ if (argc < 1) /* unlikely */
+ exit(1);
+ set_progname(argv[0]);
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
- if (argc == 2 && !strcmp(argv[1], "-V"))
- print_version_and_exit();
+ if (argc == 2 && !strcmp(argv[1], "-V"))
+ print_version_and_exit();
- fd = getfd();
-
- if (argc == 1) {
- /* deallocate all unused consoles */
- if (ioctl(fd,VT_DISALLOCATE,0)) {
- perror("VT_DISALLOCATE");
- fprintf(stderr,
- _("%s: deallocating all unused consoles failed\n"),
- progname);
- exit(1);
+ for (i = 1; i < argc; i++) {
+ if (!isdigit(argv[i][0])) {
+ fprintf(stderr, _("%s: unknown option\n"), progname);
+ exit(1);
+ }
}
- } else
- for (i = 1; i < argc; i++) {
- num = atoi(argv[i]);
- if (num == 0)
- fprintf(stderr, _("%s: 0: illegal VT number\n"), progname);
- else if (num == 1)
- fprintf(stderr,
- _("%s: VT 1 is the console and cannot be deallocated\n"),
- progname);
- else
- if (ioctl(fd,VT_DISALLOCATE,num)) {
- perror("VT_DISALLOCATE");
- fprintf(stderr, _("%s: could not deallocate console %d\n"),
- progname, num);
+
+ fd = getfd();
+
+ if (argc == 1) {
+ /* deallocate all unused consoles */
+ if (ioctl(fd,VT_DISALLOCATE,0)) {
+ perror("VT_DISALLOCATE");
+ fprintf(stderr,
+ _("%s: deallocating all unused consoles failed\n"),
+ progname);
+ exit(1);
+ }
+ } else for (i = 1; i < argc; i++) {
+ num = atoi(argv[i]);
+ if (num == 0)
+ fprintf(stderr,
+ _("%s: 0: illegal VT number\n"), progname);
+ else if (num == 1)
+ fprintf(stderr,
+ _("%s: VT 1 is the console and cannot be deallocated\n"),
+ progname);
+ else if (ioctl(fd,VT_DISALLOCATE,num)) {
+ perror("VT_DISALLOCATE");
+ fprintf(stderr,
+ _("%s: could not deallocate console %d\n"),
+ progname, num);
+ }
}
- }
- exit(0);
+ exit(0);
}
diff --git a/src/kbdrate.c b/src/kbdrate.c
index 3bb6582..8896e97 100644
--- a/src/kbdrate.c
+++ b/src/kbdrate.c
@@ -117,7 +117,7 @@
if (rate == 0) /* switch repeat off */
kbdrep_s.rate = 0;
else
- kbdrep_s.rate = 1000.0 / rate; /* convert cps to msec */
+ kbdrep_s.rate = 1000.0 / rate; /* convert cps to msec */
if (kbdrep_s.rate < 1)
kbdrep_s.rate = 1;
kbdrep_s.delay = delay;
diff --git a/src/kdfontop.c b/src/kdfontop.c
index bfc70ce..5db7e92 100644
--- a/src/kdfontop.c
+++ b/src/kdfontop.c
@@ -118,20 +118,22 @@
#endif /* KDFONTOP */
int
-font_charheight(char *buf, int count) {
- int h, i;
+font_charheight(char *buf, int count, int width) {
+ int h, i, x;
+ int bytewidth = (width+7)/8;
for (h = 32; h > 0; h--)
for (i = 0; i < count; i++)
- if (buf[32*i+h-1])
- goto nonzero;
+ for (x = 0; x < bytewidth; x++)
+ if (buf[(32*i+h-1)*bytewidth+x])
+ goto nonzero;
nonzero:
return h;
}
-
+
int
-getfont(int fd, char *buf, int *count, int *height) {
+getfont(int fd, char *buf, int *count, int *width, int *height) {
struct consolefontdesc cfd;
struct console_font_op cfo;
int i;
@@ -147,11 +149,8 @@
*count = cfo.charcount;
if (height)
*height = cfo.height;
- if (cfo.width != 8) {
- fprintf(stderr,
- _("kdfontop.c: only width 8 supported\n"));
- exit(1);
- }
+ if (width)
+ *width = cfo.width;
return 0;
}
if (errno != ENOSYS && errno != EINVAL) {
@@ -166,6 +165,10 @@
i = ioctl(fd, GIO_FONTX, &cfd);
if (i == 0) {
*count = cfd.charcount;
+ if (height)
+ *height = cfd.charheight;
+ if (width)
+ *width = 8;
return 0;
}
if (errno != ENOSYS && errno != EINVAL) {
@@ -184,29 +187,35 @@
return -1;
}
*count = 256;
+ if (height)
+ *height = 0; /* undefined, at most 32 */
+ if (width)
+ *width = 8;
return 0;
}
int
-putfont(int fd, char *buf, int count, int height) {
+putfont(int fd, char *buf, int count, int width, int height) {
struct consolefontdesc cfd;
struct console_font_op cfo;
int i;
+ if (!width)
+ width = 8;
if (!height)
- height = font_charheight(buf, count);
+ height = font_charheight(buf, count, width);
/* First attempt: KDFONTOP */
cfo.op = KD_FONT_OP_SET;
cfo.flags = 0;
- cfo.width = 8;
+ cfo.width = width;
cfo.height = height;
cfo.charcount = count;
cfo.data = buf;
i = ioctl(fd, KDFONTOP, &cfo);
if (i == 0)
return 0;
- if (errno != ENOSYS && errno != EINVAL) {
+ if (width != 8 || (errno != ENOSYS && errno != EINVAL)) {
perror("putfont: KDFONTOP");
return -1;
}
diff --git a/src/kdfontop.h b/src/kdfontop.h
index da33746..fbccee7 100644
--- a/src/kdfontop.h
+++ b/src/kdfontop.h
@@ -1,17 +1,19 @@
/*
* Read kernel font into BUF with room for COUNT 32x32 glyphs.
* Return 0 on success -1 on failure.
- * Sets number of glyphs in COUNT, glyph height in HEIGHT.
+ * Sets number of glyphs in COUNT, glyph size in WIDTH and HEIGHT.
*/
-extern int getfont(int fd, char *buf, int *count, int *height);
+extern int getfont(int fd, char *buf, int *count, int *width, int *height);
/*
- * Load kernel font of pointsize HEIGHT from BUF with length COUNT.
+ * Load kernel font of width WIDTH and pointsize HEIGHT from BUF
+ * with length COUNT.
* Return 0 on success, -1 on failure.
*/
-extern int putfont(int fd, char *buf, int count, int height);
+extern int putfont(int fd, char *buf, int count, int width, int height);
/*
- * Find the maximum height of nonblank pixels (in the 32*COUNT bytes of BUF).
+ * Find the maximum height of nonblank pixels
+ * (in the ((WIDTH+7)/8)*32*COUNT bytes of BUF).
*/
-extern int font_charheight(char *buf, int count);
+extern int font_charheight(char *buf, int count, int width);
diff --git a/src/ksyms.c b/src/ksyms.c
index 94ad991..980ce60 100644
--- a/src/ksyms.c
+++ b/src/ksyms.c
@@ -341,7 +341,7 @@
};
static sym latin2_syms[] = {
- { 0x00a0, "" },
+ { 0x00a0, "" }, /* 0240 */
{ 0x0104, "Aogonek" },
{ 0x02d8, "breve" },
{ 0x0141, "Lstroke" },
@@ -373,7 +373,7 @@
{ 0x02dd, "doubleacute" },
{ 0x017e, "zcaron" },
{ 0x017c, "zabovedot" },
- { 0x0154, "Racute" },
+ { 0x0154, "Racute" }, /* 0300 */
{ 0x00c1, "" },
{ 0x00c2, "" },
{ 0x0102, "Abreve" },
@@ -1121,6 +1121,7 @@
};
#include "koi8.syms.h"
+#include "cp1250.syms.h"
#include "ethiopic.syms.h"
static sym iso_8859_15_syms[] = {
@@ -1592,19 +1593,20 @@
sym *charnames;
int start;
} charsets[] = {
- { "iso-8859-1", latin1_syms, 160 },
- { "iso-8859-2", latin2_syms, 160 },
- { "iso-8859-3", latin3_syms, 160 },
- { "iso-8859-4", latin4_syms, 160 },
- { "iso-8859-5", iso_8859_5_syms, 160 },
- { "iso-8859-7", iso_8859_7_syms, 160 },
- { "iso-8859-8", iso_8859_8_syms, 160 },
- { "iso-8859-9", iso_8859_9_syms, 208 },
- { "iso-8859-15", iso_8859_15_syms, 160 },
- { "mazovia", mazovia_syms, 128 },
- { "koi8-r", koi8_syms, 128 },
- { "koi8-u", koi8_syms, 128 },
- { "iso-10646-18", iso_10646_18_syms, 159 }, /* ethiopic */
+ { "iso-8859-1", latin1_syms, 160 },
+ { "iso-8859-2", latin2_syms, 160 },
+ { "iso-8859-3", latin3_syms, 160 },
+ { "iso-8859-4", latin4_syms, 160 },
+ { "iso-8859-5", iso_8859_5_syms, 160 },
+ { "iso-8859-7", iso_8859_7_syms, 160 },
+ { "iso-8859-8", iso_8859_8_syms, 160 },
+ { "iso-8859-9", iso_8859_9_syms, 208 },
+ { "iso-8859-15", iso_8859_15_syms, 160 },
+ { "mazovia", mazovia_syms, 128 },
+ { "cp-1250", cp1250_syms, 128 },
+ { "koi8-r", koi8_syms, 128 },
+ { "koi8-u", koi8_syms, 128 },
+ { "iso-10646-18", iso_10646_18_syms, 159 }, /* ethiopic */
};
/* Functions for both dumpkeys and loadkeys. */
diff --git a/src/loadkeys.y b/src/loadkeys.y
index 2d9fdaf..7e188a1 100644
--- a/src/loadkeys.y
+++ b/src/loadkeys.y
@@ -475,7 +475,8 @@
char *include_dirpath1[] = { "", "../include/", "../../include/", 0 };
char *include_dirpath2[] = { 0, 0, 0, 0 };
char *include_dirpath3[] = { DATADIR "/" KEYMAPDIR "/include/",
- DATADIR "/" KEYMAPDIR "/i386/include/", 0 };
+ DATADIR "/" KEYMAPDIR "/i386/include/",
+ DATADIR "/" KEYMAPDIR "/mac/include/", 0 };
char *include_suffixes[] = { "", ".inc", 0 };
FILE *find_standard_incl_file(char *s) {
diff --git a/src/loadunimap.c b/src/loadunimap.c
index fb9d019..dc42e9f 100644
--- a/src/loadunimap.c
+++ b/src/loadunimap.c
@@ -1,7 +1,7 @@
/*
* loadunimap.c - aeb
*
- * Version 1.00
+ * Version 1.04
*/
#include <errno.h>
diff --git a/src/mapscrn.c b/src/mapscrn.c
index 5ec657c..323daf0 100644
--- a/src/mapscrn.c
+++ b/src/mapscrn.c
@@ -1,5 +1,5 @@
/*
- * mapscrn.c - version 0.98
+ * mapscrn.c
*/
#include <stdio.h>
@@ -72,7 +72,8 @@
int i;
if ((fp = findfile(mfil, mapdirpath, mapsuffixes)) == NULL) {
- fprintf(stderr, _("mapscrn: cannot open map file _%s_\n"), mfil);
+ fprintf(stderr, _("mapscrn: cannot open map file _%s_\n"),
+ mfil);
exit(1);
}
if (stat(pathname, &stbuf)) {
@@ -81,20 +82,23 @@
exit(1);
}
if (stbuf.st_size != E_TABSZ) {
- fprintf(stderr,
- _("Loading symbolic screen map from file %s\n"),
- pathname);
-
+ if (verbose)
+ printf(_("Loading symbolic screen map from file %s\n"),
+ pathname);
if (parsemap(fp,buf)) {
- fprintf(stderr, _("Error parsing symbolic map\n"));
+ fprintf(stderr,
+ _("Error parsing symbolic map from `%s'\n"),
+ pathname);
exit(1);
}
} else {
- fprintf(stderr, _("Loading binary screen map from file %s\n"),
- pathname);
-
+ if (verbose)
+ printf(_("Loading binary screen map from file %s\n"),
+ pathname);
if (fread(buf,E_TABSZ,1,fp) != 1) {
- fprintf(stderr, _("Cannot read map from file"));
+ fprintf(stderr,
+ _("Error reading map from file `%s'\n"),
+ pathname);
exit(1);
}
}
@@ -102,12 +106,9 @@
i = ioctl(fd,PIO_SCRNMAP,buf);
if (i) {
- perror("PIO_SCRNMAP");
- exit(1);
+ perror("PIO_SCRNMAP");
+ exit(1);
}
-
- if (verbose)
- printf(_("Loaded screen map from `%s'\n"), mfil);
}
static int
diff --git a/src/outpsfheader.c b/src/outpsfheader.c
index 06fecc6..a788497 100644
--- a/src/outpsfheader.c
+++ b/src/outpsfheader.c
@@ -1,4 +1,5 @@
/* outpsfheader - auxiliary fn - not to be installed */
+/* assumes a little-endian machine */
#include <stdio.h>
#include "psf.h"
diff --git a/src/psf.h b/src/psf.h
index 7c14341..7b9dbac 100644
--- a/src/psf.h
+++ b/src/psf.h
@@ -57,6 +57,7 @@
* done in the same style).
* Following hpa's suggestion, psf2 uses UTF-8 rather than UCS-2,
* and has 32-bit magic 0x864ab572.
+ * The integers here are little endian 4-byte integers.
*/
#define PSF2_MAGIC0 0x72
diff --git a/src/psffontop.c b/src/psffontop.c
index 8df477e..4a1080a 100644
--- a/src/psffontop.c
+++ b/src/psffontop.c
@@ -44,6 +44,19 @@
}
static unsigned int
+assemble_int(unsigned char *ip) {
+ return (ip[0] + (ip[1]<<8) + (ip[2]<<16) + (ip[3]<<24));
+}
+
+static void
+store_int_le(unsigned char *ip, int num) {
+ ip[0] = (num & 0xff);
+ ip[1] = ((num >> 8) & 0xff);
+ ip[2] = ((num >> 16) & 0xff);
+ ip[3] = ((num >> 24) & 0xff);
+}
+
+static unsigned int
assemble_ucs2(char **inptr, int cnt) {
unsigned char **in = (unsigned char **) inptr;
unsigned int u1, u2;
@@ -167,6 +180,7 @@
* buffer was allocated using malloc().
* In FONTBUFP, FONTSZP the subinterval of ALLBUFP containing
* the font data is given.
+ * The font width is stored in FONTWIDTHP.
* The number of glyphs is stored in FONTLENP.
* The unicodetable is stored in UCLISTHEADSP (when non-NULL), with
* fontpositions counted from FONTPOS0 (so that calling this several
@@ -177,11 +191,11 @@
int
readpsffont(FILE *fontf, char **allbufp, int *allszp,
char **fontbufp, int *fontszp,
- int *fontlenp, int fontpos0,
+ int *fontwidthp, int *fontlenp, int fontpos0,
struct unicode_list **uclistheadsp) {
char *inputbuf = NULL;
int inputbuflth = 0;
- int inputlth, fontlen, charsize, hastable, ftoffset, utf8;
+ int inputlth, fontlen, fontwidth, charsize, hastable, ftoffset, utf8;
int i, k, n;
/*
@@ -238,10 +252,12 @@
charsize = psfhdr->charsize;
hastable = (psfhdr->mode & (PSF1_MODEHASTAB|PSF1_MODEHASSEQ));
ftoffset = sizeof(struct psf1_header);
+ fontwidth = 8;
utf8 = 0;
} else if (inputlth >= sizeof(struct psf2_header) &&
PSF2_MAGIC_OK((unsigned char *)inputbuf)) {
struct psf2_header *psfhdr;
+ int flags;
psfhdr = (struct psf2_header *) &inputbuf[0];
@@ -250,10 +266,12 @@
fprintf(stderr, u, progname, psfhdr->version);
exit(EX_DATAERR);
}
- fontlen = psfhdr->length;
- charsize = psfhdr->charsize;
- hastable = (psfhdr->flags & PSF2_HAS_UNICODE_TABLE);
- ftoffset = psfhdr->headersize;
+ fontlen = assemble_int((unsigned char *) &psfhdr->length);
+ charsize = assemble_int((unsigned char *) &psfhdr->charsize);
+ flags = assemble_int((unsigned char *) &psfhdr->flags);
+ hastable = (flags & PSF2_HAS_UNICODE_TABLE);
+ ftoffset = assemble_int((unsigned char *) &psfhdr->headersize);
+ fontwidth = assemble_int((unsigned char *) &psfhdr->width);
utf8 = 1;
} else
return -1; /* not psf */
@@ -282,6 +300,8 @@
*fontszp = fontlen * charsize;
if (fontlenp)
*fontlenp = fontlen;
+ if (fontwidthp)
+ *fontwidthp = fontwidth;
if (!uclistheadsp)
return 0; /* got font, don't need unicode_list */
@@ -380,34 +400,34 @@
}
void
-writepsffont(FILE *ofil, char *fontbuf, int charsize, int fontlen,
- int psftype, struct unicode_list *uclistheads) {
- int i;
- int utf8;
- int seqs = 0;
+writepsffontheader(FILE *ofil, int width, int height, int fontlen,
+ int *psftype, int flags) {
+ int bytewidth, charsize, ret;
- if (uclistheads)
- seqs = has_sequences(uclistheads, fontlen);
+ bytewidth = (width+7)/8;
+ charsize = bytewidth * height;
- /* Output new font file */
- if ((fontlen != 256 && fontlen != 512) || psftype == 2) {
+ if ((fontlen != 256 && fontlen != 512) || width != 8)
+ *psftype = 2;
+
+ if (*psftype == 2) {
struct psf2_header h;
+ int flags2 = 0;
+ if (flags & WPSFH_HASTAB)
+ flags2 |= PSF2_HAS_UNICODE_TABLE;
h.magic[0] = PSF2_MAGIC0;
h.magic[1] = PSF2_MAGIC1;
h.magic[2] = PSF2_MAGIC2;
h.magic[3] = PSF2_MAGIC3;
- h.version = 0;
- h.headersize = sizeof(h);
- h.flags = 0;
- if (uclistheads != NULL)
- h.flags |= PSF2_HAS_UNICODE_TABLE;
- h.length = fontlen;
- h.charsize = charsize;
- h.width = 8;
- h.height = charsize;
- fwrite(&h, sizeof(h), 1, ofil);
- utf8 = 1;
+ store_int_le((unsigned char *) &h.version, 0);
+ store_int_le((unsigned char *) &h.headersize, sizeof(h));
+ store_int_le((unsigned char *) &h.flags, flags2);
+ store_int_le((unsigned char *) &h.length, fontlen);
+ store_int_le((unsigned char *) &h.charsize, charsize);
+ store_int_le((unsigned char *) &h.width, width);
+ store_int_le((unsigned char *) &h.height, height);
+ ret = fwrite(&h, sizeof(h), 1, ofil);
} else {
struct psf1_header h;
@@ -416,12 +436,39 @@
h.mode = 0;
if (fontlen == 512)
h.mode |= PSF1_MODE512;
- if (uclistheads != NULL)
- h.mode |= (seqs ? PSF1_MODEHASSEQ : PSF1_MODEHASTAB);
+ if (flags & WPSFH_HASSEQ)
+ h.mode |= PSF1_MODEHASSEQ;
+ else if (flags & WPSFH_HASTAB)
+ h.mode |= PSF1_MODEHASTAB;
h.charsize = charsize;
- fwrite(&h, sizeof(h), 1, ofil);
- utf8 = 0;
+ ret = fwrite(&h, sizeof(h), 1, ofil);
}
+
+ if (ret != 1) {
+ fprintf(stderr, _("Cannot write font file header"));
+ exit(EX_IOERR);
+ }
+}
+
+
+void
+writepsffont(FILE *ofil, char *fontbuf, int width, int height, int fontlen,
+ int psftype, struct unicode_list *uclistheads) {
+ int bytewidth, charsize, flags, utf8, i;
+
+ bytewidth = (width+7)/8;
+ charsize = bytewidth * height;
+ flags = 0;
+
+ if (uclistheads) {
+ flags |= WPSFH_HASTAB;
+ if (has_sequences(uclistheads, fontlen))
+ flags |= WPSFH_HASSEQ;
+ }
+
+ writepsffontheader(ofil, width, height, fontlen, &psftype, flags);
+ utf8 = (psftype == 2);
+
fwrite(fontbuf, charsize, fontlen, ofil);
if (uclistheads != NULL) {
struct unicode_list *ul;
diff --git a/src/psffontop.h b/src/psffontop.h
index b2c014e..0611451 100644
--- a/src/psffontop.h
+++ b/src/psffontop.h
@@ -14,12 +14,18 @@
extern int readpsffont(FILE *fontf, char **allbufp, int *allszp,
char **fontbufp, int *fontszp,
- int *fontlenp, int fontpos0,
+ int *fontwidthp, int *fontlenp, int fontpos0,
struct unicode_list **uclistheadsp);
extern void writepsffont(FILE *ofil, char *fontbuf,
- int charsize, int fontlen, int psftype,
+ int width, int height, int fontlen, int psftype,
struct unicode_list *uclistheads);
+#define WPSFH_HASTAB 1
+#define WPSFH_HASSEQ 2
+extern void writepsffontheader(FILE *ofil,
+ int width, int height, int fontlen,
+ int *psftype, int flags);
+
extern void appendunicode(FILE *fp, unsigned int uc, int utf8);
extern void appendseparator(FILE *fp, int seq, int utf8);
diff --git a/src/psfxtable.c b/src/psfxtable.c
index 95069ea..1a55c85 100644
--- a/src/psfxtable.c
+++ b/src/psfxtable.c
@@ -231,6 +231,7 @@
FILE *ifil, *ofil, *itab, *otab;
int psftype, fontlen, charsize, hastable, notable;
int i;
+ int width = 8, bytewidth, height;
char *inbuf, *fontbuf;
int inbuflth, fontbuflth;
@@ -352,7 +353,8 @@
}
if (readpsffont(ifil, &inbuf, &inbuflth, &fontbuf, &fontbuflth,
- &fontlen, 0, itab ? NULL : &uclistheads) == -1) {
+ &width, &fontlen, 0,
+ itab ? NULL : &uclistheads) == -1) {
char *u = _("%s: Bad magic number on %s\n");
fprintf(stderr, u, progname, ifname);
exit(EX_DATAERR);
@@ -360,6 +362,10 @@
fclose(ifil);
charsize = fontbuflth/fontlen;
+ bytewidth = (width + 7)/8;
+ if (!bytewidth)
+ bytewidth = 1;
+ height = charsize / bytewidth;
hastable = (uclistheads != NULL);
@@ -411,7 +417,7 @@
}
if (ofil) {
- writepsffont(ofil, fontbuf, charsize, fontlen, psftype,
+ writepsffont(ofil, fontbuf, width, height, fontlen, psftype,
notable ? NULL : uclistheads);
fclose(ofil);
}
diff --git a/src/setfont.c b/src/setfont.c
index eeb6b48..f09c94b 100644
--- a/src/setfont.c
+++ b/src/setfont.c
@@ -1,7 +1,7 @@
/*
* setfont.c - Eugene Crosser & Andries Brouwer
*
- * Version 1.00
+ * Version 1.04
*
* Loads the console font, and possibly the corresponding screen map(s).
* We accept two kind of screen maps, one [-m] giving the correspondence
@@ -45,7 +45,6 @@
extern void loadnewmap(int fd, char *mfil);
extern void activatemap(void);
extern void disactivatemap(void);
-extern int font_charheight(char *buf, int count);
int verbose = 0;
int force = 0;
@@ -230,28 +229,33 @@
static int erase_mode = 1;
static void
-do_loadfont(int fd, char *inbuf, int unit, int hwunit, int fontsize,
- char *pathname) {
+do_loadfont(int fd, char *inbuf, int width, int height, int hwunit,
+ int fontsize, char *pathname) {
char *buf;
int i, buflen;
+ int bytewidth = (width+7)/8;
+ int charsize = height * bytewidth;
+ int kcharsize = 32 * bytewidth;
int bad_video_erase_char = 0;
- 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);
+ if (height < 1 || height > 32) {
+ fprintf(stderr, _("Bad character height %d\n"), height);
+ exit(EX_DATAERR);
+ }
+ if (width < 1 || width > 32) {
+ fprintf(stderr, _("Bad character width %d\n"), width);
exit(EX_DATAERR);
}
if (!hwunit)
- hwunit = unit;
+ hwunit = height;
+
+ buflen = kcharsize * ((fontsize < 128) ? 128 : fontsize);
+ buf = xmalloc(buflen);
+ memset(buf,0,buflen);
for (i = 0; i < fontsize; i++)
- memcpy(buf+(32*i), inbuf+(unit*i), unit);
+ memcpy(buf+(i*kcharsize), inbuf+(i*charsize), charsize);
/*
* Due to a kernel bug, font position 32 is used
@@ -259,8 +263,8 @@
* So, usually this font position should be blank.
*/
if (erase_mode) {
- for (i = 0; i < 32; i++)
- if (buf[32*32+i])
+ for (i = 0; i < kcharsize; i++)
+ if (buf[32*kcharsize+i])
bad_video_erase_char = 1;
if (bad_video_erase_char) {
fprintf(stderr,
@@ -270,8 +274,8 @@
case 3:
exit(EX_DATAERR);
case 2:
- for (i = 0; i < 32; i++)
- buf[32*32+i] = 0;
+ for (i = 0; i < kcharsize; i++)
+ buf[32*kcharsize+i] = 0;
fprintf(stderr, _("%s: wiped it\n"), progname);
break;
case 1:
@@ -285,15 +289,21 @@
}
if (verbose) {
- if (pathname)
- printf(_("Loading %d-char 8x%d font from file %s\n"),
- fontsize, unit, pathname);
+ if (height == hwunit && pathname)
+ printf(_("Loading %d-char %dx%d font from file %s\n"),
+ fontsize, width, height, pathname);
+ else if (height == hwunit)
+ printf(_("Loading %d-char %dx%d font\n"),
+ fontsize, width, height);
+ else if (pathname)
+ printf(_("Loading %d-char %dx%d (%d) font from file %s\n"),
+ fontsize, width, height, hwunit, pathname);
else
- printf(_("Loading %d-char 8x%d font\n"),
- fontsize, unit);
+ printf(_("Loading %d-char %dx%d (%d) font\n"),
+ fontsize, width, height, hwunit);
}
- if (putfont(fd, buf, fontsize, hwunit))
+ if (putfont(fd, buf, fontsize, width, hwunit))
exit(EX_OSERR);
}
@@ -372,8 +382,8 @@
int iunit, int hwunit, int no_m, int no_u) {
FILE *fpi;
char *ifil, *inbuf, *fontbuf, *bigfontbuf;
- int inputlth, fontbuflth, fontsize, unit;
- int bigfontbuflth, bigfontsize, bigunit;
+ int inputlth, fontbuflth, fontsize, height, width, bytewidth;
+ int bigfontbuflth, bigfontsize, bigheight, bigwidth;
struct unicode_list *uclistheads;
int i;
@@ -388,7 +398,8 @@
bigfontbuflth = 0;
bigfontsize = 0;
uclistheads = NULL;
- bigunit = 0;
+ bigheight = 0;
+ bigwidth = 0;
for (i=0; i<ifilct; i++) {
ifil = ifiles[i];
@@ -403,31 +414,42 @@
fontsize = 0;
if(readpsffont(fpi, &inbuf, &inputlth, &fontbuf, &fontbuflth,
- &fontsize, bigfontsize,
+ &width, &fontsize, bigfontsize,
no_u ? NULL : &uclistheads)) {
fprintf(stderr, _("When loading several fonts, all "
"must be psf fonts - %s isn't\n"),
pathname);
exit(EX_DATAERR);
}
- unit = fontbuflth / fontsize;
+ bytewidth = (width+7) / 8;
+ height = fontbuflth / (bytewidth * fontsize);
if (verbose)
- printf(_("Read %d-char 8x%d font from file %s\n"),
- fontsize, unit, pathname);
- if (bigunit == 0)
- bigunit = unit;
- else if (bigunit != unit) {
+ printf(_("Read %d-char %dx%d font from file %s\n"),
+ fontsize, width, height, pathname);
+
+ if (bigheight == 0)
+ bigheight = height;
+ else if (bigheight != height) {
fprintf(stderr, _("When loading several fonts, all "
- "must have the same pointsize\n"));
+ "must have the same height\n"));
exit(EX_DATAERR);
}
+ if (bigwidth == 0)
+ bigwidth = width;
+ else if (bigwidth != width) {
+ fprintf(stderr, _("When loading several fonts, all "
+ "must have the same width\n"));
+ exit(EX_DATAERR);
+ }
+
bigfontsize += fontsize;
bigfontbuflth += fontbuflth;
bigfontbuf = xrealloc(bigfontbuf, bigfontbuflth);
memcpy(bigfontbuf+bigfontbuflth-fontbuflth,
fontbuf, fontbuflth);
}
- do_loadfont(fd, bigfontbuf, bigunit, hwunit, bigfontsize, NULL);
+ do_loadfont(fd, bigfontbuf, bigwidth, bigheight, hwunit,
+ bigfontsize, NULL);
if (uclistheads && !no_u)
do_loadtable(fd, uclistheads, bigfontsize);
@@ -437,7 +459,7 @@
loadnewfont(int fd, char *ifil, int iunit, int hwunit, int no_m, int no_u) {
FILE *fpi;
char defname[20];
- int unit, def = 0;
+ int height, width, bytewidth, def = 0;
char *inbuf, *fontbuf;
int inputlth, fontbuflth, fontsize, offset;
struct unicode_list *uclistheads;
@@ -474,13 +496,17 @@
inbuf = fontbuf = NULL;
inputlth = fontbuflth = fontsize = 0;
+ width = 8;
uclistheads = NULL;
if(readpsffont(fpi, &inbuf, &inputlth, &fontbuf, &fontbuflth,
- &fontsize, 0, no_u ? NULL : &uclistheads) == 0) {
+ &width, &fontsize, 0,
+ no_u ? NULL : &uclistheads) == 0) {
/* we've got a psf font */
- unit = fontbuflth / fontsize;
+ bytewidth = (width+7) / 8;
+ height = fontbuflth / (bytewidth * fontsize);
- do_loadfont(fd, fontbuf, unit, hwunit, fontsize, pathname);
+ do_loadfont(fd, fontbuf, width, height, hwunit,
+ fontsize, pathname);
if (uclistheads && !no_u)
do_loadtable(fd, uclistheads, fontsize);
#if 1
@@ -524,8 +550,9 @@
/* file with three code pages? */
if (inputlth == 9780) {
offset = position_codepage(iunit);
- unit = iunit;
+ height = iunit;
fontsize = 256;
+ width = 8;
} else if (inputlth == 32768) {
/* restorefont -w writes a SVGA font to file
restorefont -r restores it
@@ -538,7 +565,8 @@
inputlth = 16384; /* ignore rest */
fontsize = 512;
offset = 0;
- unit = 32;
+ width = 8;
+ height = 32;
if (!hwunit)
hwunit = 16;
} else {
@@ -553,9 +581,11 @@
exit(EX_DATAERR);
}
fontsize = 256;
- unit = inputlth/256;
+ width = 8;
+ height = inputlth/256;
}
- do_loadfont(fd, inbuf+offset, unit, hwunit, fontsize, pathname);
+ do_loadfont(fd, inbuf+offset, width, height, hwunit, fontsize,
+ pathname);
}
static int
@@ -591,53 +621,58 @@
}
static void
-do_saveoldfont(int fd, char *ofil, FILE *fpo, int unimap_follows, int *count) {
- int i, unit, ct;
- char buf[65536];
+do_saveoldfont(int fd, char *ofil, FILE *fpo, int unimap_follows,
+ int *count, int *utf8) {
- ct = sizeof(buf)/(32*32/8); /* max size 32x32, 8 bits/byte */
- if (getfont(fd, buf, &ct, NULL)) /* ignore height given by kernel */
- exit(EX_OSERR);
+/* this is the max font size the kernel is willing to handle */
+#define MAXFONTSIZE 65536
+ char buf[MAXFONTSIZE];
- /* save as efficiently as possible */
- unit = font_charheight(buf, ct);
+ int i, ct, width, height, bytewidth, charsize, kcharsize;
- /* Do we need a psf header? */
- /* Yes if ct=512 - otherwise we cannot distinguish
- a 512-char 8x8 and a 256-char 8x16 font. */
+ ct = sizeof(buf)/(32*32/8); /* max size 32x32, 8 bits/byte */
+ if (getfont(fd, buf, &ct, &width, &height))
+ exit(EX_OSERR);
+
+ /* save as efficiently as possible */
+ bytewidth = (width + 7) / 8;
+ height = font_charheight(buf, ct, width);
+ charsize = height * bytewidth;
+ kcharsize = 32 * bytewidth;
+
+ /* Do we need a psf header? */
+ /* Yes if ct==512 - otherwise we cannot distinguish
+ a 512-char 8x8 and a 256-char 8x16 font. */
#define ALWAYS_PSF_HEADER 1
- if (ct != 256 || unimap_follows || ALWAYS_PSF_HEADER) {
- struct psf1_header psfhdr;
+ if (ct != 256 || width != 8 || unimap_follows || ALWAYS_PSF_HEADER) {
+ int psftype = 1;
+ int flags = 0;
- psfhdr.magic[0] = PSF1_MAGIC0;
- psfhdr.magic[1] = PSF1_MAGIC1;
- psfhdr.mode = 0;
- if (ct != 256)
- psfhdr.mode |= PSF1_MODE512;
- if (unimap_follows)
- psfhdr.mode |= PSF1_MODEHASTAB;
- psfhdr.charsize = unit;
- if (fwrite(&psfhdr, sizeof(struct psf1_header), 1, fpo) != 1) {
- fprintf(stderr, _("Cannot write font file header"));
- exit(EX_IOERR);
+ if (unimap_follows)
+ flags |= WPSFH_HASTAB;
+ writepsffontheader (fpo, width, height, ct, &psftype, flags);
+ if (utf8)
+ *utf8 = (psftype == 2);
}
- }
- if (unit == 0)
- fprintf(stderr, _("Found nothing to save\n"));
- else {
- for (i = 0; i < ct; i++)
- if (fwrite(buf+(32*i), unit, 1, fpo) != 1) {
- fprintf(stderr, _("Cannot write font file"));
- exit(EX_IOERR);
+ if (height == 0) {
+ fprintf(stderr, _("Found nothing to save\n"));
+ } else {
+ for (i = 0; i < ct; i++) {
+ if (fwrite(buf+(i*kcharsize), charsize, 1, fpo) != 1) {
+ fprintf(stderr, _("Cannot write font file"));
+ exit(EX_IOERR);
+ }
+ }
+ if (verbose) {
+ printf(_("Saved %d-char %dx%d font file on %s\n"),
+ ct, width, height, ofil);
+ }
}
- if (verbose)
- printf(_("Saved %d-char 8x%d font file on %s\n"), ct, unit, ofil);
- }
- if (count)
- *count = ct;
+ if (count)
+ *count = ct;
}
static void
@@ -648,7 +683,7 @@
perror(ofil);
exit(EX_CANTCREAT);
}
- do_saveoldfont(fd, ofil, fpo, 0, NULL);
+ do_saveoldfont(fd, ofil, fpo, 0, NULL, NULL);
fclose(fpo);
}
@@ -656,14 +691,15 @@
saveoldfontplusunicodemap(int fd, char *Ofil) {
FILE *fpo;
int ct;
+ int utf8 = 0;
if((fpo = fopen(Ofil, "w")) == NULL) {
perror(Ofil);
exit(EX_CANTCREAT);
}
ct = 0;
- do_saveoldfont(fd, Ofil, fpo, 1, &ct);
- appendunicodemap(fd, fpo, ct, 0);
+ do_saveoldfont(fd, Ofil, fpo, 1, &ct, &utf8);
+ appendunicodemap(fd, fpo, ct, utf8);
fclose(fpo);
}
diff --git a/src/setlogcons.c b/src/setlogcons.c
new file mode 100644
index 0000000..526c260
--- /dev/null
+++ b/src/setlogcons.c
@@ -0,0 +1,37 @@
+/*
+ * setlogcons.c - aeb - 000523
+ *
+ * usage: setlogcons N
+ */
+
+/* Send kernel messages to the current console or to console N */
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+#include "getfd.h"
+#include "nls.h"
+
+int
+main(int argc, char **argv){
+ int fd, cons;
+ struct { char fn, subarg; } arg;
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ if (argc == 2)
+ cons = atoi(argv[1]);
+ else
+ cons = 0; /* current console */
+
+ fd = getfd();
+ arg.fn = 11; /* redirect kernel messages */
+ arg.subarg = cons; /* to specified console */
+ if (ioctl(fd, TIOCLINUX, &arg)) {
+ perror("TIOCLINUX");
+ exit(1);
+ }
+ return 0;
+}
diff --git a/src/spawn_console.c b/src/spawn_console.c
index fba7c96..2401644 100644
--- a/src/spawn_console.c
+++ b/src/spawn_console.c
@@ -25,7 +25,10 @@
if (fd < 0)
fd = 0;
signal(SIGHUP, sighup);
- ioctl(fd, KDSIGACCEPT, (long) SIGHUP);
+ if (ioctl(fd, KDSIGACCEPT, (long) SIGHUP)) {
+ perror("KDSIGACCEPT");
+ exit(1);
+ }
while(1)
sleep(3600);
}
diff --git a/src/totextmode.c b/src/totextmode.c
new file mode 100644
index 0000000..45804e8
--- /dev/null
+++ b/src/totextmode.c
@@ -0,0 +1,39 @@
+/*
+ * totextmode.c - aeb - 2000-01-20
+ */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <linux/vt.h>
+#include <linux/kd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include "getfd.h"
+#include "nls.h"
+#include "version.h"
+
+int
+main(int argc, char *argv[]) {
+ int fd, num;
+
+ set_progname(argv[0]);
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ if (argc == 2 && !strcmp(argv[1], "-V"))
+ print_version_and_exit();
+
+ if (argc != 2) {
+ fprintf(stderr, _("usage: totextmode\n"));
+ exit(1);
+ }
+ fd = getfd();
+ num = atoi(argv[1]);
+ if (ioctl(fd,KDSETMODE,KD_TEXT)) {
+ perror("totextmode: KDSETMODE");
+ exit(1);
+ }
+ exit(0);
+}
diff --git a/src/version.h b/src/version.h
index 7f432a6..6eaa6f5 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,6 +1,6 @@
#include <string.h>
-#define VERSION "1.02"
+#define VERSION "1.04"
char *progname;