Input infrastructure, INPUT server, PCKBD driver
This commit separates the low-level keyboard driver from TTY, putting it in a separate driver (PCKBD). The commit also separates management of raw input devices from TTY, and puts it in a separate server (INPUT). All keyboard and mouse input from hardware is sent by drivers to the INPUT server, which either sends it to a process that has opened a raw input device, or otherwise forwards it to TTY for standard processing. Design by Dirk Vogt. Prototype by Uli Kastlunger. Additional changes made to the prototype: - the event communication is now based on USB HID codes; all input drivers have to use USB codes to describe events; - all TTY keymaps have been converted to USB format, with the effect that a single keymap covers all keys; there is no (static) escaped keymap anymore; - further keymap tweaks now allow remapping of literally all keys; - input device renumbering and protocol rewrite; - INPUT server rewrite, with added support for cancel and select; - PCKBD reimplementation, including PC/AT-to-USB translation; - support for manipulating keyboard LEDs has been added; - keyboard and mouse multiplexer devices have been added to INPUT, primarily so that an X server need only open two devices; - a new "libinputdriver" library abstracts away protocol details from input drivers, and should be used by all future input drivers; - both INPUT and PCKBD can be restarted; - TTY is now scheduled by KERNEL, so that it won't be punished for running a lot; without this, simply running "yes" on the console kills the system; - the KIOCBELL IOCTL has been moved to /dev/console; - support for the SCANCODES termios setting has been removed; - obsolete keymap compression has been removed; - the obsolete Olivetti M24 keymap has been removed. Change-Id: I3a672fb8c4fd566734e4b46d3994b4b7fc96d578
This commit is contained in:
parent
ec2359d566
commit
6b3f4dc157
89 changed files with 4316 additions and 4234 deletions
|
@ -126,10 +126,6 @@ do
|
|||
;;
|
||||
4,125) des="video output" dev=video
|
||||
;;
|
||||
4,126) des="auxiliary input" dev=kbdaux
|
||||
;;
|
||||
4,127) des="keyboard input" dev=kbd
|
||||
;;
|
||||
4,12[89]|4,1[3-8]?|4,19[01])
|
||||
p=`expr \\( $minor - 128 \\) / 16 | tr '0123' 'pqrs'`
|
||||
n=`expr $minor % 16`
|
||||
|
@ -212,6 +208,24 @@ do
|
|||
des="vnode disk $drive partition $par slice $sub"
|
||||
dev=vnd${drive}p${par}s${sub}
|
||||
;;
|
||||
64,0)
|
||||
des="keyboard input multiplexer"
|
||||
dev=kbdmux
|
||||
;;
|
||||
64,[1-4])
|
||||
n=`expr $minor - 1`
|
||||
des="keyboard input $n"
|
||||
dev=kbd$n
|
||||
;;
|
||||
64,64)
|
||||
des="mouse input multiplexer"
|
||||
dev=mousemux
|
||||
;;
|
||||
64,6[5-8])
|
||||
n=`expr $minor - 65`
|
||||
des="mouse input $n"
|
||||
dev=mouse$n
|
||||
;;
|
||||
BAD,BAD)
|
||||
des= dev=
|
||||
;;
|
||||
|
|
|
@ -35,7 +35,8 @@ case $#:$1 in
|
|||
sht21b1s40 sht21b2s40 sht21b3s40 \
|
||||
bmp085b1s77 bmp085b2s77 bmp085b3s77 \
|
||||
vnd0 vnd0p0 vnd0p0s0 vnd1 vnd1p0 vnd1p0s0 \
|
||||
vnd2 vnd3 vnd4 vnd5 vnd6 vnd7
|
||||
vnd2 vnd3 vnd4 vnd5 vnd6 vnd7 \
|
||||
input
|
||||
;;
|
||||
0:|1:-\?)
|
||||
cat >&2 <<EOF
|
||||
|
@ -63,13 +64,12 @@ Where key is one of the following:
|
|||
klog # Make /dev/klog
|
||||
random # Make /dev/random, /dev/urandom
|
||||
uds # Make /dev/uds
|
||||
kbd # Make /dev/kbd
|
||||
kbdaux # Make /dev/kbdaux
|
||||
filter # Make /dev/filter
|
||||
fbd # Make /dev/fbd
|
||||
hello # Make /dev/hello
|
||||
video # Make /dev/video
|
||||
vnd0 vnd0p0 vnd0p0s0 .. # Make vnode disks /dev/vnd[0-7] and (sub)partitions
|
||||
input # Make /dev/kbdmux, /dev/kbd[0-3], idem /dev/mouse~
|
||||
std # All standard devices
|
||||
EOF
|
||||
exit 1
|
||||
|
@ -189,9 +189,8 @@ do
|
|||
$e mknod ${n} c $maj `expr $m + 1`
|
||||
$e chmod 660 ${n}n ${n}
|
||||
;;
|
||||
console|lp|tty|log|kbd|kbdaux|video)
|
||||
# Console, line printer, anonymous tty, diagnostics device,
|
||||
# raw keyboard, ps/2 mouse, video.
|
||||
console|lp|tty|log|video)
|
||||
# Console, line printer, anonymous tty, diagnostics device, video.
|
||||
$e mknod console c 4 0
|
||||
$e chmod 600 console
|
||||
$e chgrp tty console
|
||||
|
@ -203,10 +202,6 @@ do
|
|||
$e chmod 200 lp
|
||||
$e mknod log c 4 15
|
||||
$e chmod 222 log
|
||||
$e mknod kbd c 4 127
|
||||
$e mknod kbdaux c 4 126
|
||||
$e chmod 660 kbd kbdaux
|
||||
$e chgrp operator kbd kbdaux
|
||||
$e mknod video c 4 125
|
||||
$e chmod 600 video
|
||||
$e chgrp operator video
|
||||
|
@ -374,6 +369,20 @@ do
|
|||
done
|
||||
echo $alldev | xargs $e chmod 600
|
||||
;;
|
||||
input)
|
||||
$e mknod kbdmux c 64 0
|
||||
$e mknod mousemux c 64 64
|
||||
alldev="kbdmux mousemux"
|
||||
for n in 0 1 2 3
|
||||
do
|
||||
k=`expr $n + 1`
|
||||
m=`expr $n + 65`
|
||||
$e mknod kbd$n c 64 $k
|
||||
$e mknod mouse$n c 64 $m
|
||||
alldev="$alldev kbd$n mouse$n"
|
||||
done
|
||||
echo $alldev | xargs $e chmod 600
|
||||
;;
|
||||
*)
|
||||
echo "$0: don't know about $dev" >&2
|
||||
ex=1
|
||||
|
|
|
@ -6,86 +6,51 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if __minix_vmd
|
||||
#define KBD_DEVICE "/dev/kbd"
|
||||
#else
|
||||
#define KBD_DEVICE "/dev/console"
|
||||
#endif
|
||||
|
||||
u16_t keymap[NR_SCAN_CODES * MAP_COLS];
|
||||
u8_t comprmap[4 + NR_SCAN_CODES * MAP_COLS * 9/8 * 2 + 1];
|
||||
|
||||
|
||||
void tell(char *s)
|
||||
{
|
||||
write(2, s, strlen(s));
|
||||
}
|
||||
|
||||
|
||||
void fatal(char *say)
|
||||
{
|
||||
int err = errno;
|
||||
tell("loadkeys: ");
|
||||
if (say != NULL) {
|
||||
tell(say);
|
||||
tell(": ");
|
||||
}
|
||||
tell(strerror(err));
|
||||
tell("\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "loadkeys: %s: %s\n", say, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
tell("Usage: loadkeys mapfile\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "usage: loadkeys <mapfile>\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
u8_t *cm;
|
||||
u16_t *km;
|
||||
int fd, n, fb;
|
||||
char sig[4];
|
||||
keymap_t keymap;
|
||||
int fd;
|
||||
|
||||
if (argc != 2)
|
||||
usage();
|
||||
|
||||
if ((fd = open(argv[1], O_RDONLY)) < 0) fatal(argv[1]);
|
||||
|
||||
if (read(fd, comprmap, sizeof(comprmap)) < 0) fatal(argv[1]);
|
||||
if (read(fd, sig, sizeof(sig)) < sizeof(sig)) fatal(argv[1]);
|
||||
|
||||
if (memcmp(comprmap, KEY_MAGIC, 4) != 0) {
|
||||
tell("loadkeys: ");
|
||||
tell(argv[1]);
|
||||
tell(": not a keymap file\n");
|
||||
exit(1);
|
||||
if (memcmp(sig, KEY_MAGIC, sizeof(sig)) != 0) {
|
||||
fprintf(stderr, "loadkeys: %s: not a keymap file\n", argv[1]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (read(fd, keymap, sizeof(keymap)) < sizeof(keymap)) fatal(argv[1]);
|
||||
|
||||
close(fd);
|
||||
|
||||
/* Decompress the keymap data. */
|
||||
cm = comprmap + 4;
|
||||
n = 8;
|
||||
for (km = keymap; km < keymap + NR_SCAN_CODES * MAP_COLS; km++) {
|
||||
if (n == 8) {
|
||||
/* Need a new flag byte. */
|
||||
fb = *cm++;
|
||||
n = 0;
|
||||
}
|
||||
*km = *cm++; /* Low byte. */
|
||||
if (fb & (1 << n)) {
|
||||
*km |= (*cm++ << 8); /* One of the few special keys. */
|
||||
}
|
||||
n++;
|
||||
}
|
||||
|
||||
if ((fd = open(KBD_DEVICE, O_WRONLY)) < 0) fatal(KBD_DEVICE);
|
||||
|
||||
if (ioctl(fd, KIOCSMAP, keymap) < 0) fatal(KBD_DEVICE);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
./sbin/at_wini minix-sys
|
||||
./sbin/floppy minix-sys
|
||||
./sbin/hgfs minix-sys
|
||||
./sbin/pckbd minix-sys
|
||||
./sbin/vbfs minix-sys
|
||||
./sbin/virtio_blk minix-sys
|
||||
./usr/include/gcc-4.5/abmintrin.h minix-sys gcccmds
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
./boot/minix/.temp/mod06_memory minix-sys
|
||||
./boot/minix_default minix-sys
|
||||
./dev minix-sys
|
||||
./dev/mouse minix-sys
|
||||
./etc minix-sys
|
||||
./etc/atf minix-sys atf
|
||||
./etc/boot.cfg.default minix-sys
|
||||
|
@ -153,6 +152,7 @@
|
|||
./sbin/fsck.ext2 minix-sys
|
||||
./sbin/fsck_ext2fs minix-sys
|
||||
./sbin/fsck.mfs minix-sys
|
||||
./sbin/input minix-sys
|
||||
./sbin/is minix-sys
|
||||
./sbin/isofs minix-sys
|
||||
./sbin/mfs minix-sys
|
||||
|
@ -1185,6 +1185,7 @@
|
|||
./usr/include/minix/i2cdriver.h minix-sys
|
||||
./usr/include/minix/i2c.h minix-sys
|
||||
./usr/include/minix/input.h minix-sys
|
||||
./usr/include/minix/inputdriver.h minix-sys
|
||||
./usr/include/minix/ioctl.h minix-sys
|
||||
./usr/include/minix/ipcconst.h minix-sys
|
||||
./usr/include/minix/ipc.h minix-sys
|
||||
|
@ -1580,7 +1581,6 @@
|
|||
./usr/lib/keymaps/italian.map minix-sys
|
||||
./usr/lib/keymaps/japanese.map minix-sys
|
||||
./usr/lib/keymaps/latin-america.map minix-sys
|
||||
./usr/lib/keymaps/olivetti.map minix-sys
|
||||
./usr/lib/keymaps/polish.map minix-sys
|
||||
./usr/lib/keymaps/portuguese.map minix-sys
|
||||
./usr/lib/keymaps/russian-cp1251.map minix-sys
|
||||
|
@ -1590,7 +1590,6 @@
|
|||
./usr/lib/keymaps/spanish.map minix-sys
|
||||
./usr/lib/keymaps/uk.map minix-sys
|
||||
./usr/lib/keymaps/ukraine-koi8-u.map minix-sys
|
||||
./usr/lib/keymaps/us-std-esc.map minix-sys
|
||||
./usr/lib/keymaps/us-std.map minix-sys
|
||||
./usr/lib/keymaps/us-swap.map minix-sys
|
||||
./usr/lib/libarchive.a minix-sys
|
||||
|
@ -1678,6 +1677,8 @@
|
|||
./usr/lib/libgcc_s.so minix-sys gcccmds
|
||||
./usr/lib/libgcc_s.so.1.0 minix-sys gcccmds
|
||||
./usr/lib/libgcc_s.so.1 minix-sys gcccmds
|
||||
./usr/lib/libinputdriver.a minix-sys
|
||||
./usr/lib/libinputdriver_pic.a minix-sys
|
||||
./usr/lib/libl.a minix-sys
|
||||
./usr/lib/liblua.a minix-sys
|
||||
./usr/lib/liblua_pic.a minix-sys
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
.if ${MKIMAGEONLY} == "yes"
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
SUBDIR= at_wini floppy tty pci
|
||||
SUBDIR= at_wini floppy tty pci pckbd
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} == "earm"
|
||||
|
@ -17,8 +17,8 @@ SUBDIR= tty
|
|||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
SUBDIR= ahci amddev atl2 at_wini audio dec21140A dp8390 dpeth \
|
||||
e1000 fbd filter floppy fxp hello lance log mmc orinoco pci printer \
|
||||
random readclock rtl8139 rtl8169 ti1225 tty vbox acpi \
|
||||
e1000 fbd filter floppy fxp hello lance log mmc orinoco pci pckbd \
|
||||
printer random readclock rtl8139 rtl8169 ti1225 tty vbox acpi \
|
||||
virtio_blk virtio_net vnd
|
||||
.endif
|
||||
|
||||
|
|
12
drivers/pckbd/Makefile
Normal file
12
drivers/pckbd/Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Makefile for the PC keyboard/mouse driver (PCKBD)
|
||||
PROG= pckbd
|
||||
SRCS= pckbd.c table.c
|
||||
|
||||
DPADD+= ${LIBINPUTDRIVER} ${LIBSYS} ${LIBTIMERS}
|
||||
LDADD+= -linputdriver -lsys -ltimers
|
||||
|
||||
MAN=
|
||||
|
||||
BINDIR?= /sbin
|
||||
|
||||
.include <minix.service.mk>
|
476
drivers/pckbd/pckbd.c
Normal file
476
drivers/pckbd/pckbd.c
Normal file
|
@ -0,0 +1,476 @@
|
|||
/* Keyboard driver for PCs and ATs. */
|
||||
#include <minix/drivers.h>
|
||||
#include <minix/input.h>
|
||||
#include <minix/inputdriver.h>
|
||||
|
||||
#include "pckbd.h"
|
||||
|
||||
/*
|
||||
* Data that is to be sent to the keyboard. Each byte is ACKed by the keyboard.
|
||||
* This is currently somewhat overpowered for its only purpose: setting LEDs.
|
||||
*/
|
||||
static struct kbdout {
|
||||
unsigned char buf[KBD_OUT_BUFSZ];
|
||||
int offset;
|
||||
int avail;
|
||||
int expect_ack;
|
||||
} kbdout;
|
||||
|
||||
static int kbd_watchdog_set = 0;
|
||||
static int kbd_alive = 1;
|
||||
static minix_timer_t tmr_kbd_wd;
|
||||
|
||||
static int irq_hook_id = -1;
|
||||
static int aux_irq_hook_id = -1;
|
||||
|
||||
static int kbd_state = 0;
|
||||
|
||||
static unsigned char aux_bytes[3];
|
||||
static unsigned char aux_state = 0;
|
||||
static int aux_counter = 0;
|
||||
|
||||
static void pckbd_leds(unsigned int);
|
||||
static void pckbd_intr(unsigned int);
|
||||
static void pckbd_alarm(clock_t);
|
||||
|
||||
static struct inputdriver pckbd_tab = {
|
||||
.idr_leds = pckbd_leds,
|
||||
.idr_intr = pckbd_intr,
|
||||
.idr_alarm = pckbd_alarm
|
||||
};
|
||||
|
||||
/*
|
||||
* The watchdog timer function, implementing all but the actual reset.
|
||||
*/
|
||||
static void
|
||||
kbd_watchdog(minix_timer_t *UNUSED(tmrp))
|
||||
{
|
||||
kbd_watchdog_set = 0;
|
||||
if (!kbdout.avail)
|
||||
return; /* Watchdog is no longer needed */
|
||||
|
||||
if (!kbd_alive)
|
||||
printf("PCKBD: watchdog should reset keyboard\n");
|
||||
kbd_alive = 0;
|
||||
|
||||
set_timer(&tmr_kbd_wd, sys_hz(), kbd_watchdog, 0);
|
||||
|
||||
kbd_watchdog_set = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send queued data to the keyboard.
|
||||
*/
|
||||
static void
|
||||
kbd_send(void)
|
||||
{
|
||||
u32_t sb;
|
||||
int r;
|
||||
|
||||
if (!kbdout.avail)
|
||||
return;
|
||||
if (kbdout.expect_ack)
|
||||
return;
|
||||
|
||||
if ((r = sys_inb(KB_STATUS, &sb)) != OK)
|
||||
printf("PCKBD: send sys_inb() failed (1): %d\n", r);
|
||||
|
||||
if (sb & (KB_OUT_FULL | KB_IN_FULL)) {
|
||||
printf("PCKBD: not sending (1): sb = 0x%x\n", sb);
|
||||
return;
|
||||
}
|
||||
micro_delay(KBC_IN_DELAY);
|
||||
if ((r = sys_inb(KB_STATUS, &sb)) != OK)
|
||||
printf("PCKBD: send sys_inb() failed (2): %d\n", r);
|
||||
if (sb & (KB_OUT_FULL | KB_IN_FULL)) {
|
||||
printf("PCKBD: not sending (2): sb = 0x%x\n", sb);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Okay, buffer is really empty */
|
||||
if ((r = sys_outb(KEYBD, kbdout.buf[kbdout.offset])) != OK)
|
||||
printf("PCKBD: send sys_outb() failed: %d\n", r);
|
||||
kbdout.offset++;
|
||||
kbdout.avail--;
|
||||
kbdout.expect_ack = 1;
|
||||
|
||||
kbd_alive = 1;
|
||||
if (kbd_watchdog_set) {
|
||||
/* Set a watchdog timer for one second. */
|
||||
set_timer(&tmr_kbd_wd, sys_hz(), kbd_watchdog, 0);
|
||||
|
||||
kbd_watchdog_set = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to obtain input from the keyboard.
|
||||
*/
|
||||
static int
|
||||
scan_keyboard(unsigned char *bp, int *isauxp)
|
||||
{
|
||||
u32_t b, sb;
|
||||
int r;
|
||||
|
||||
if ((r = sys_inb(KB_STATUS, &sb)) != OK) {
|
||||
printf("PCKBD: scan sys_inb() failed (1): %d\n", r);
|
||||
return FALSE;
|
||||
}
|
||||
if (!(sb & KB_OUT_FULL)) {
|
||||
if (kbdout.avail && !kbdout.expect_ack)
|
||||
kbd_send();
|
||||
return FALSE;
|
||||
}
|
||||
if ((r = sys_inb(KEYBD, &b)) != OK) {
|
||||
printf("PCKBD: scan sys_inb() failed (2): %d\n", r);
|
||||
return FALSE;
|
||||
}
|
||||
if (!(sb & KB_AUX_BYTE) && b == KB_ACK && kbdout.expect_ack) {
|
||||
kbdout.expect_ack = 0;
|
||||
micro_delay(KBC_IN_DELAY);
|
||||
kbd_send();
|
||||
return FALSE;
|
||||
}
|
||||
if (bp)
|
||||
*bp = b;
|
||||
if (isauxp)
|
||||
*isauxp = !!(sb & KB_AUX_BYTE);
|
||||
if (kbdout.avail && !kbdout.expect_ack) {
|
||||
micro_delay(KBC_IN_DELAY);
|
||||
kbd_send();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait until the controller is ready. Return TRUE on success, FALSE on
|
||||
* timeout. Since this may discard input, only use during initialization.
|
||||
*/
|
||||
static int
|
||||
kb_wait(void)
|
||||
{
|
||||
spin_t spin;
|
||||
u32_t status;
|
||||
int r, isaux;
|
||||
unsigned char byte;
|
||||
|
||||
SPIN_FOR(&spin, KBC_WAIT_TIME) {
|
||||
if ((r = sys_inb(KB_STATUS, &status)) != OK)
|
||||
printf("PCKBD: wait sys_inb() failed: %d\n", r);
|
||||
if (status & KB_OUT_FULL)
|
||||
(void) scan_keyboard(&byte, &isaux);
|
||||
if (!(status & (KB_IN_FULL | KB_OUT_FULL)))
|
||||
return TRUE; /* wait until ready */
|
||||
}
|
||||
|
||||
printf("PCKBD: wait timeout\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the LEDs on the caps, num, and scroll lock keys.
|
||||
*/
|
||||
static void
|
||||
set_leds(unsigned char ledmask)
|
||||
{
|
||||
if (kbdout.avail == 0)
|
||||
kbdout.offset = 0;
|
||||
if (kbdout.offset + kbdout.avail + 2 > KBD_OUT_BUFSZ) {
|
||||
/*
|
||||
* The output buffer is full. Ignore this command. Reset the
|
||||
* ACK flag.
|
||||
*/
|
||||
kbdout.expect_ack = 0;
|
||||
} else {
|
||||
kbdout.buf[kbdout.offset+kbdout.avail] = LED_CODE;
|
||||
kbdout.buf[kbdout.offset+kbdout.avail+1] = ledmask;
|
||||
kbdout.avail += 2;
|
||||
}
|
||||
if (!kbdout.expect_ack)
|
||||
kbd_send();
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a command to the keyboard.
|
||||
*/
|
||||
static void
|
||||
kbc_cmd0(int cmd)
|
||||
{
|
||||
int r;
|
||||
|
||||
kb_wait();
|
||||
if ((r = sys_outb(KB_COMMAND, cmd)) != OK)
|
||||
printf("PCKBD: cmd0 sys_outb() failed: %d\n", r);
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a command to the keyboard, including data.
|
||||
*/
|
||||
static void
|
||||
kbc_cmd1(int cmd, int data)
|
||||
{
|
||||
int r;
|
||||
|
||||
kb_wait();
|
||||
if ((r = sys_outb(KB_COMMAND, cmd)) != OK)
|
||||
printf("PCKBD: cmd1 sys_outb() failed (1): %d\n", r);
|
||||
kb_wait();
|
||||
if ((r = sys_outb(KEYBD, data)) != OK)
|
||||
printf("PCKBD: cmd1 sys_outb() failed (2): %d\n", r);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait at most one second for a byte from the keyboard or the controller.
|
||||
*/
|
||||
static int
|
||||
kbc_read(void)
|
||||
{
|
||||
u32_t byte, status;
|
||||
spin_t spin;
|
||||
int r;
|
||||
|
||||
SPIN_FOR(&spin, KBC_READ_TIME) {
|
||||
if ((r = sys_inb(KB_STATUS, &status)) != OK)
|
||||
printf("PCKBD: read sys_inb() failed (1): %d\n", r);
|
||||
if (status & KB_OUT_FULL) {
|
||||
micro_delay(KBC_IN_DELAY);
|
||||
if ((r = sys_inb(KEYBD, &byte)) != OK)
|
||||
printf("PCKBD: read sys_inb() failed (2): "
|
||||
"%d\n", r);
|
||||
if (status & KB_AUX_BYTE)
|
||||
printf("PCKBD: read got aux 0x%x\n", byte);
|
||||
return byte;
|
||||
}
|
||||
}
|
||||
|
||||
panic("kbc_read failed to complete");
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the keyboard hardware.
|
||||
*/
|
||||
static void
|
||||
kb_init(void)
|
||||
{
|
||||
int r, ccb;
|
||||
|
||||
/* Discard leftover keystroke. */
|
||||
scan_keyboard(NULL, NULL);
|
||||
|
||||
/* Set interrupt handler and enable keyboard IRQ. */
|
||||
irq_hook_id = KEYBOARD_IRQ; /* id to be returned on interrupt */
|
||||
r = sys_irqsetpolicy(KEYBOARD_IRQ, IRQ_REENABLE, &irq_hook_id);
|
||||
if (r != OK)
|
||||
panic("Couldn't set keyboard IRQ policy: %d", r);
|
||||
if ((r = sys_irqenable(&irq_hook_id)) != OK)
|
||||
panic("Couldn't enable keyboard IRQs: %d", r);
|
||||
|
||||
/* Set AUX interrupt handler and enable AUX IRQ. */
|
||||
aux_irq_hook_id = KBD_AUX_IRQ; /* id to be returned on interrupt */
|
||||
r = sys_irqsetpolicy(KBD_AUX_IRQ, IRQ_REENABLE, &aux_irq_hook_id);
|
||||
if (r != OK)
|
||||
panic("Couldn't set AUX IRQ policy: %d", r);
|
||||
if ((r = sys_irqenable(&aux_irq_hook_id)) != OK)
|
||||
panic("Couldn't enable AUX IRQs: %d", r);
|
||||
|
||||
/* Disable the keyboard and AUX. */
|
||||
kbc_cmd0(KBC_DI_KBD);
|
||||
kbc_cmd0(KBC_DI_AUX);
|
||||
|
||||
/* Get the current configuration byte. */
|
||||
kbc_cmd0(KBC_RD_RAM_CCB);
|
||||
ccb = kbc_read();
|
||||
|
||||
/* Enable both interrupts. */
|
||||
kbc_cmd1(KBC_WR_RAM_CCB, ccb | 3);
|
||||
|
||||
/* Re-enable the keyboard device. */
|
||||
kbc_cmd0(KBC_EN_KBD);
|
||||
|
||||
/* Enable the AUX device. */
|
||||
kbc_cmd0(KBC_EN_AUX);
|
||||
|
||||
/* Set the initial LED state. */
|
||||
kb_wait();
|
||||
|
||||
set_leds(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a keyboard scancode.
|
||||
*/
|
||||
static void
|
||||
kbd_process(unsigned char scode)
|
||||
{
|
||||
int press, index, page, code;
|
||||
|
||||
press = !(scode & SCAN_RELEASE) ? INPUT_PRESS : INPUT_RELEASE;
|
||||
index = scode & ~SCAN_RELEASE;
|
||||
|
||||
switch (kbd_state) {
|
||||
case 1:
|
||||
page = scanmap_escaped[index].page;
|
||||
code = scanmap_escaped[index].code;
|
||||
break;
|
||||
case 2:
|
||||
kbd_state = (index == SCAN_CTRL) ? 3 : 0;
|
||||
return;
|
||||
case 3:
|
||||
if (index == SCAN_NUMLOCK) {
|
||||
page = INPUT_PAGE_KEY;
|
||||
code = INPUT_KEY_PAUSE;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
switch (scode) {
|
||||
case SCAN_EXT0:
|
||||
kbd_state = 1;
|
||||
return;
|
||||
case SCAN_EXT1:
|
||||
kbd_state = 2;
|
||||
return;
|
||||
}
|
||||
page = scanmap_normal[index].page;
|
||||
code = scanmap_normal[index].code;
|
||||
break;
|
||||
}
|
||||
|
||||
if (page)
|
||||
inputdriver_send_event(FALSE /*mouse*/, page, code, press, 0);
|
||||
|
||||
kbd_state = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Process an auxiliary (mouse) scancode.
|
||||
*/
|
||||
static void
|
||||
kbdaux_process(unsigned char scode)
|
||||
{
|
||||
u32_t delta;
|
||||
int i;
|
||||
|
||||
if (aux_counter == 0 && !(scode & 0x08))
|
||||
return; /* resync */
|
||||
|
||||
aux_bytes[aux_counter++] = scode;
|
||||
|
||||
if (aux_counter < 3)
|
||||
return; /* need more first */
|
||||
|
||||
aux_counter = 0;
|
||||
|
||||
/* Send an event for each button state change. */
|
||||
for (i = 0; i < 3; i++) {
|
||||
if ((aux_state ^ aux_bytes[0]) & (1 << i)) {
|
||||
aux_state ^= (1 << i);
|
||||
|
||||
inputdriver_send_event(TRUE /*mouse*/,
|
||||
INPUT_PAGE_BUTTON, INPUT_BUTTON_1 + i,
|
||||
aux_state & (1 << i), 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Send an event for each relative mouse movement, X and/or Y. */
|
||||
for (i = 0; i < 2; i++) {
|
||||
delta = aux_bytes[1 + i];
|
||||
if (delta != 0) {
|
||||
if (aux_bytes[0] & (0x10 << i))
|
||||
delta |= 0xFFFFFF00; /* make signed */
|
||||
|
||||
inputdriver_send_event(TRUE /*mouse*/, INPUT_PAGE_GD,
|
||||
!i ? INPUT_GD_X : INPUT_GD_Y, delta,
|
||||
INPUT_FLAG_REL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set keyboard LEDs.
|
||||
*/
|
||||
static void
|
||||
pckbd_leds(unsigned int leds)
|
||||
{
|
||||
unsigned char b;
|
||||
|
||||
b = 0;
|
||||
if (leds & (1 << INPUT_LED_NUMLOCK)) b |= LED_NUM_LOCK;
|
||||
if (leds & (1 << INPUT_LED_CAPSLOCK)) b |= LED_CAPS_LOCK;
|
||||
if (leds & (1 << INPUT_LED_SCROLLLOCK)) b |= LED_SCROLL_LOCK;
|
||||
|
||||
set_leds(b);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a keyboard interrupt.
|
||||
*/
|
||||
static void
|
||||
pckbd_intr(unsigned int UNUSED(mask))
|
||||
{
|
||||
unsigned char scode;
|
||||
int isaux;
|
||||
|
||||
/* Fetch a character from the keyboard hardware and acknowledge it. */
|
||||
if (!scan_keyboard(&scode, &isaux))
|
||||
return;
|
||||
|
||||
if (!isaux) {
|
||||
/* A keyboard key press or release. */
|
||||
kbd_process(scode);
|
||||
} else {
|
||||
/* A mouse event. */
|
||||
kbdaux_process(scode);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a timer signal.
|
||||
*/
|
||||
static void
|
||||
pckbd_alarm(clock_t stamp)
|
||||
{
|
||||
expire_timers(stamp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the driver.
|
||||
*/
|
||||
static int
|
||||
pckbd_init(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
/* Initialize the watchdog timer. */
|
||||
init_timer(&tmr_kbd_wd);
|
||||
|
||||
/* Initialize the keyboard. */
|
||||
kb_init();
|
||||
|
||||
/* Announce the driver's presence. */
|
||||
inputdriver_announce(INPUT_DEV_KBD | INPUT_DEV_MOUSE);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set callback routines and let SEF initialize.
|
||||
*/
|
||||
static void
|
||||
pckbd_startup(void)
|
||||
{
|
||||
sef_setcb_init_fresh(pckbd_init);
|
||||
|
||||
sef_startup();
|
||||
}
|
||||
|
||||
/*
|
||||
* PC keyboard/mouse driver task.
|
||||
*/
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
pckbd_startup();
|
||||
|
||||
inputdriver_task(&pckbd_tab);
|
||||
|
||||
return 0;
|
||||
}
|
49
drivers/pckbd/pckbd.h
Normal file
49
drivers/pckbd/pckbd.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#ifndef _DRIVERS_PCKBD_H
|
||||
#define _DRIVERS_PCKBD_H
|
||||
|
||||
/* Standard and AT keyboard. (PS/2 MCA implies AT throughout.) */
|
||||
#define KEYBD 0x60 /* I/O port for keyboard data */
|
||||
|
||||
/* AT keyboard. */
|
||||
#define KB_COMMAND 0x64 /* I/O port for commands on AT */
|
||||
#define KB_STATUS 0x64 /* I/O port for status on AT */
|
||||
#define KB_ACK 0xFA /* keyboard ack response */
|
||||
#define KB_AUX_BYTE 0x20 /* Auxiliary Device Output Buffer Full */
|
||||
#define KB_OUT_FULL 0x01 /* status bit set when keypress char pending */
|
||||
#define KB_IN_FULL 0x02 /* status bit set when not ready to receive */
|
||||
#define KBC_RD_RAM_CCB 0x20 /* Read controller command byte */
|
||||
#define KBC_WR_RAM_CCB 0x60 /* Write controller command byte */
|
||||
#define KBC_DI_AUX 0xA7 /* Disable Auxiliary Device */
|
||||
#define KBC_EN_AUX 0xA8 /* Enable Auxiliary Device */
|
||||
#define KBC_DI_KBD 0xAD /* Disable Keybard Interface */
|
||||
#define KBC_EN_KBD 0xAE /* Enable Keybard Interface */
|
||||
#define LED_CODE 0xED /* command to keyboard to set LEDs */
|
||||
|
||||
#define KBC_WAIT_TIME 100000 /* wait this many usecs for a status update */
|
||||
#define KBC_READ_TIME 1000000 /* wait this many usecs for a result byte */
|
||||
|
||||
#define KBC_IN_DELAY 7 /* wait 7 microseconds when polling */
|
||||
|
||||
#define KBD_OUT_BUFSZ 16 /* Output buffer for data to the keyboard. */
|
||||
|
||||
#define KBD_SCAN_CODES 0x80
|
||||
|
||||
#define SCAN_RELEASE 0x80
|
||||
#define SCAN_CTRL 0x1D
|
||||
#define SCAN_NUMLOCK 0x45
|
||||
#define SCAN_EXT0 0xE0
|
||||
#define SCAN_EXT1 0xE1
|
||||
|
||||
#define LED_SCROLL_LOCK 0x01
|
||||
#define LED_NUM_LOCK 0x02
|
||||
#define LED_CAPS_LOCK 0x04
|
||||
|
||||
struct scanmap {
|
||||
unsigned short page;
|
||||
unsigned short code;
|
||||
};
|
||||
|
||||
extern const struct scanmap scanmap_normal[KBD_SCAN_CODES];
|
||||
extern const struct scanmap scanmap_escaped[KBD_SCAN_CODES];
|
||||
|
||||
#endif /* !_DRIVERS_PCKBD_H */
|
169
drivers/pckbd/table.c
Normal file
169
drivers/pckbd/table.c
Normal file
|
@ -0,0 +1,169 @@
|
|||
/* Scancode conversion tables from PC keyboard scan codes to USB HID codes. */
|
||||
/*
|
||||
* The contents of this file are based on the Microsoft "USB HID to PS/2 Scan
|
||||
* Code Translation Table" document, of which the purpose is to provide a
|
||||
* translation the other way around. Therefore, some codes might be missing.
|
||||
*/
|
||||
#include <minix/input.h>
|
||||
|
||||
#include "pckbd.h"
|
||||
|
||||
const struct scanmap scanmap_normal[KBD_SCAN_CODES] = {
|
||||
[0x01] = { INPUT_PAGE_KEY, INPUT_KEY_ESCAPE },
|
||||
[0x02] = { INPUT_PAGE_KEY, INPUT_KEY_1 },
|
||||
[0x03] = { INPUT_PAGE_KEY, INPUT_KEY_2 },
|
||||
[0x04] = { INPUT_PAGE_KEY, INPUT_KEY_3 },
|
||||
[0x05] = { INPUT_PAGE_KEY, INPUT_KEY_4 },
|
||||
[0x06] = { INPUT_PAGE_KEY, INPUT_KEY_5 },
|
||||
[0x07] = { INPUT_PAGE_KEY, INPUT_KEY_6 },
|
||||
[0x08] = { INPUT_PAGE_KEY, INPUT_KEY_7 },
|
||||
[0x09] = { INPUT_PAGE_KEY, INPUT_KEY_8 },
|
||||
[0x0A] = { INPUT_PAGE_KEY, INPUT_KEY_9 },
|
||||
[0x0B] = { INPUT_PAGE_KEY, INPUT_KEY_0 },
|
||||
[0x0C] = { INPUT_PAGE_KEY, INPUT_KEY_DASH },
|
||||
[0x0D] = { INPUT_PAGE_KEY, INPUT_KEY_EQUAL },
|
||||
[0x0E] = { INPUT_PAGE_KEY, INPUT_KEY_BACKSPACE },
|
||||
[0x0F] = { INPUT_PAGE_KEY, INPUT_KEY_TAB },
|
||||
[0x10] = { INPUT_PAGE_KEY, INPUT_KEY_Q },
|
||||
[0x11] = { INPUT_PAGE_KEY, INPUT_KEY_W },
|
||||
[0x12] = { INPUT_PAGE_KEY, INPUT_KEY_E },
|
||||
[0x13] = { INPUT_PAGE_KEY, INPUT_KEY_R },
|
||||
[0x14] = { INPUT_PAGE_KEY, INPUT_KEY_T },
|
||||
[0x15] = { INPUT_PAGE_KEY, INPUT_KEY_Y },
|
||||
[0x16] = { INPUT_PAGE_KEY, INPUT_KEY_U },
|
||||
[0x17] = { INPUT_PAGE_KEY, INPUT_KEY_I },
|
||||
[0x18] = { INPUT_PAGE_KEY, INPUT_KEY_O },
|
||||
[0x19] = { INPUT_PAGE_KEY, INPUT_KEY_P },
|
||||
[0x1A] = { INPUT_PAGE_KEY, INPUT_KEY_OPEN_BRACKET },
|
||||
[0x1B] = { INPUT_PAGE_KEY, INPUT_KEY_CLOSE_BRACKET },
|
||||
[0x1C] = { INPUT_PAGE_KEY, INPUT_KEY_ENTER },
|
||||
[0x1D] = { INPUT_PAGE_KEY, INPUT_KEY_LEFT_CTRL },
|
||||
[0x1E] = { INPUT_PAGE_KEY, INPUT_KEY_A },
|
||||
[0x1F] = { INPUT_PAGE_KEY, INPUT_KEY_S },
|
||||
[0x20] = { INPUT_PAGE_KEY, INPUT_KEY_D },
|
||||
[0x21] = { INPUT_PAGE_KEY, INPUT_KEY_F },
|
||||
[0x22] = { INPUT_PAGE_KEY, INPUT_KEY_G },
|
||||
[0x23] = { INPUT_PAGE_KEY, INPUT_KEY_H },
|
||||
[0x24] = { INPUT_PAGE_KEY, INPUT_KEY_J },
|
||||
[0x25] = { INPUT_PAGE_KEY, INPUT_KEY_K },
|
||||
[0x26] = { INPUT_PAGE_KEY, INPUT_KEY_L },
|
||||
[0x27] = { INPUT_PAGE_KEY, INPUT_KEY_SEMICOLON },
|
||||
[0x28] = { INPUT_PAGE_KEY, INPUT_KEY_APOSTROPH },
|
||||
[0x29] = { INPUT_PAGE_KEY, INPUT_KEY_GRAVE_ACCENT },
|
||||
[0x2A] = { INPUT_PAGE_KEY, INPUT_KEY_LEFT_SHIFT },
|
||||
[0x2B] = { INPUT_PAGE_KEY, INPUT_KEY_BACKSLASH },
|
||||
[0x2C] = { INPUT_PAGE_KEY, INPUT_KEY_Z },
|
||||
[0x2D] = { INPUT_PAGE_KEY, INPUT_KEY_X },
|
||||
[0x2E] = { INPUT_PAGE_KEY, INPUT_KEY_C },
|
||||
[0x2F] = { INPUT_PAGE_KEY, INPUT_KEY_V },
|
||||
[0x30] = { INPUT_PAGE_KEY, INPUT_KEY_B },
|
||||
[0x31] = { INPUT_PAGE_KEY, INPUT_KEY_N },
|
||||
[0x32] = { INPUT_PAGE_KEY, INPUT_KEY_M },
|
||||
[0x33] = { INPUT_PAGE_KEY, INPUT_KEY_COMMA },
|
||||
[0x34] = { INPUT_PAGE_KEY, INPUT_KEY_PERIOD },
|
||||
[0x35] = { INPUT_PAGE_KEY, INPUT_KEY_SLASH },
|
||||
[0x36] = { INPUT_PAGE_KEY, INPUT_KEY_RIGHT_SHIFT },
|
||||
[0x37] = { INPUT_PAGE_KEY, INPUT_KEY_KP_STAR },
|
||||
[0x38] = { INPUT_PAGE_KEY, INPUT_KEY_LEFT_ALT },
|
||||
[0x39] = { INPUT_PAGE_KEY, INPUT_KEY_SPACEBAR },
|
||||
[0x3A] = { INPUT_PAGE_KEY, INPUT_KEY_CAPS_LOCK },
|
||||
[0x3B] = { INPUT_PAGE_KEY, INPUT_KEY_F1 },
|
||||
[0x3C] = { INPUT_PAGE_KEY, INPUT_KEY_F2 },
|
||||
[0x3D] = { INPUT_PAGE_KEY, INPUT_KEY_F3 },
|
||||
[0x3E] = { INPUT_PAGE_KEY, INPUT_KEY_F4 },
|
||||
[0x3F] = { INPUT_PAGE_KEY, INPUT_KEY_F5 },
|
||||
[0x40] = { INPUT_PAGE_KEY, INPUT_KEY_F6 },
|
||||
[0x41] = { INPUT_PAGE_KEY, INPUT_KEY_F7 },
|
||||
[0x42] = { INPUT_PAGE_KEY, INPUT_KEY_F8 },
|
||||
[0x43] = { INPUT_PAGE_KEY, INPUT_KEY_F9 },
|
||||
[0x44] = { INPUT_PAGE_KEY, INPUT_KEY_F10 },
|
||||
[0x45] = { INPUT_PAGE_KEY, INPUT_KEY_NUM_LOCK },
|
||||
[0x46] = { INPUT_PAGE_KEY, INPUT_KEY_SCROLL_LOCK },
|
||||
[0x47] = { INPUT_PAGE_KEY, INPUT_KEY_KP_7 },
|
||||
[0x48] = { INPUT_PAGE_KEY, INPUT_KEY_KP_8 },
|
||||
[0x49] = { INPUT_PAGE_KEY, INPUT_KEY_KP_9 },
|
||||
[0x4A] = { INPUT_PAGE_KEY, INPUT_KEY_KP_DASH },
|
||||
[0x4B] = { INPUT_PAGE_KEY, INPUT_KEY_KP_4 },
|
||||
[0x4C] = { INPUT_PAGE_KEY, INPUT_KEY_KP_5 },
|
||||
[0x4D] = { INPUT_PAGE_KEY, INPUT_KEY_KP_6 },
|
||||
[0x4E] = { INPUT_PAGE_KEY, INPUT_KEY_KP_PLUS },
|
||||
[0x4F] = { INPUT_PAGE_KEY, INPUT_KEY_KP_1 },
|
||||
[0x50] = { INPUT_PAGE_KEY, INPUT_KEY_KP_2 },
|
||||
[0x51] = { INPUT_PAGE_KEY, INPUT_KEY_KP_3 },
|
||||
[0x52] = { INPUT_PAGE_KEY, INPUT_KEY_KP_0 },
|
||||
[0x53] = { INPUT_PAGE_KEY, INPUT_KEY_KP_PERIOD },
|
||||
[0x54] = { INPUT_PAGE_KEY, INPUT_KEY_SYSREQ },
|
||||
[0x56] = { INPUT_PAGE_KEY, INPUT_KEY_EUROPE_2 },
|
||||
[0x57] = { INPUT_PAGE_KEY, INPUT_KEY_F11 },
|
||||
[0x58] = { INPUT_PAGE_KEY, INPUT_KEY_F12 },
|
||||
[0x59] = { INPUT_PAGE_KEY, INPUT_KEY_KP_EQUAL },
|
||||
[0x5C] = { INPUT_PAGE_KEY, INPUT_KEY_I10L_6 },
|
||||
[0x64] = { INPUT_PAGE_KEY, INPUT_KEY_F13 },
|
||||
[0x65] = { INPUT_PAGE_KEY, INPUT_KEY_F14 },
|
||||
[0x66] = { INPUT_PAGE_KEY, INPUT_KEY_F15 },
|
||||
[0x67] = { INPUT_PAGE_KEY, INPUT_KEY_F16 },
|
||||
[0x68] = { INPUT_PAGE_KEY, INPUT_KEY_F17 },
|
||||
[0x69] = { INPUT_PAGE_KEY, INPUT_KEY_F18 },
|
||||
[0x6A] = { INPUT_PAGE_KEY, INPUT_KEY_F19 },
|
||||
[0x6B] = { INPUT_PAGE_KEY, INPUT_KEY_F20 },
|
||||
[0x6C] = { INPUT_PAGE_KEY, INPUT_KEY_F21 },
|
||||
[0x6D] = { INPUT_PAGE_KEY, INPUT_KEY_F22 },
|
||||
[0x6E] = { INPUT_PAGE_KEY, INPUT_KEY_F23 },
|
||||
[0x70] = { INPUT_PAGE_KEY, INPUT_KEY_I10L_2 },
|
||||
/* The following two keys (0x71, 0x72) are release-only. */
|
||||
[0x71] = { INPUT_PAGE_KEY, INPUT_KEY_LANG_2 },
|
||||
[0x72] = { INPUT_PAGE_KEY, INPUT_KEY_LANG_1 },
|
||||
[0x73] = { INPUT_PAGE_KEY, INPUT_KEY_I10L_1 },
|
||||
/* The following key (0x76) can be either F24 or LANG_5. */
|
||||
[0x76] = { INPUT_PAGE_KEY, INPUT_KEY_F24 },
|
||||
[0x77] = { INPUT_PAGE_KEY, INPUT_KEY_LANG_4 },
|
||||
[0x78] = { INPUT_PAGE_KEY, INPUT_KEY_LANG_3 },
|
||||
[0x79] = { INPUT_PAGE_KEY, INPUT_KEY_I10L_4 },
|
||||
[0x7B] = { INPUT_PAGE_KEY, INPUT_KEY_I10L_5 },
|
||||
[0x7D] = { INPUT_PAGE_KEY, INPUT_KEY_I10L_3 },
|
||||
[0x7E] = { INPUT_PAGE_KEY, INPUT_KEY_EQUAL_SIGN },
|
||||
};
|
||||
|
||||
const struct scanmap scanmap_escaped[KBD_SCAN_CODES] = {
|
||||
[0x10] = { INPUT_PAGE_CONS, INPUT_CONS_SCAN_PREVIOUS_TRACK },
|
||||
[0x19] = { INPUT_PAGE_CONS, INPUT_CONS_SCAN_NEXT_TRACK },
|
||||
[0x1C] = { INPUT_PAGE_KEY, INPUT_KEY_KP_ENTER },
|
||||
[0x1D] = { INPUT_PAGE_KEY, INPUT_KEY_RIGHT_CTRL },
|
||||
[0x20] = { INPUT_PAGE_CONS, INPUT_CONS_MUTE },
|
||||
[0x21] = { INPUT_PAGE_CONS, INPUT_CONS_AL_CALCULATOR },
|
||||
[0x22] = { INPUT_PAGE_CONS, INPUT_CONS_PLAY_PAUSE },
|
||||
[0x24] = { INPUT_PAGE_CONS, INPUT_CONS_STOP },
|
||||
[0x2E] = { INPUT_PAGE_CONS, INPUT_CONS_VOLUME_DOWN },
|
||||
[0x30] = { INPUT_PAGE_CONS, INPUT_CONS_VOLUME_UP },
|
||||
[0x32] = { INPUT_PAGE_CONS, INPUT_CONS_AC_HOME },
|
||||
[0x35] = { INPUT_PAGE_KEY, INPUT_KEY_KP_SLASH },
|
||||
[0x37] = { INPUT_PAGE_KEY, INPUT_KEY_PRINT_SCREEN },
|
||||
[0x38] = { INPUT_PAGE_KEY, INPUT_KEY_RIGHT_ALT },
|
||||
[0x46] = { INPUT_PAGE_KEY, INPUT_KEY_PAUSE },
|
||||
[0x47] = { INPUT_PAGE_KEY, INPUT_KEY_HOME },
|
||||
[0x48] = { INPUT_PAGE_KEY, INPUT_KEY_UP_ARROW },
|
||||
[0x49] = { INPUT_PAGE_KEY, INPUT_KEY_PAGE_UP },
|
||||
[0x4B] = { INPUT_PAGE_KEY, INPUT_KEY_LEFT_ARROW },
|
||||
[0x4D] = { INPUT_PAGE_KEY, INPUT_KEY_RIGHT_ARROW },
|
||||
[0x4F] = { INPUT_PAGE_KEY, INPUT_KEY_END },
|
||||
[0x50] = { INPUT_PAGE_KEY, INPUT_KEY_DOWN_ARROW },
|
||||
[0x51] = { INPUT_PAGE_KEY, INPUT_KEY_PAGE_DOWN },
|
||||
[0x52] = { INPUT_PAGE_KEY, INPUT_KEY_INSERT },
|
||||
[0x53] = { INPUT_PAGE_KEY, INPUT_KEY_DELETE },
|
||||
[0x5B] = { INPUT_PAGE_KEY, INPUT_KEY_LEFT_GUI },
|
||||
[0x5C] = { INPUT_PAGE_KEY, INPUT_KEY_RIGHT_GUI },
|
||||
[0x5D] = { INPUT_PAGE_KEY, INPUT_KEY_APPLICATION },
|
||||
/* The following extended key (0x5E) may also be INPUT_KEY_POWER. */
|
||||
[0x5E] = { INPUT_PAGE_GD, INPUT_GD_SYSTEM_POWER_DOWN },
|
||||
[0x5F] = { INPUT_PAGE_GD, INPUT_GD_SYSTEM_SLEEP },
|
||||
[0x63] = { INPUT_PAGE_GD, INPUT_GD_SYSTEM_WAKE_UP },
|
||||
[0x65] = { INPUT_PAGE_CONS, INPUT_CONS_AC_SEARCH },
|
||||
[0x66] = { INPUT_PAGE_CONS, INPUT_CONS_AC_BOOKMARKS },
|
||||
[0x67] = { INPUT_PAGE_CONS, INPUT_CONS_AC_REFRESH },
|
||||
[0x68] = { INPUT_PAGE_CONS, INPUT_CONS_AC_STOP },
|
||||
[0x69] = { INPUT_PAGE_CONS, INPUT_CONS_AC_FORWARD },
|
||||
[0x6A] = { INPUT_PAGE_CONS, INPUT_CONS_AC_BACK },
|
||||
[0x6B] = { INPUT_PAGE_CONS, INPUT_CONS_AL_LOCAL_BROWSER },
|
||||
[0x6C] = { INPUT_PAGE_CONS, INPUT_CONS_AL_EMAIL_READER },
|
||||
[0x6D] = { INPUT_PAGE_CONS, INPUT_CONS_AL_MEDIA_SELECT },
|
||||
};
|
|
@ -32,7 +32,7 @@ EXTRA= rc
|
|||
PROTO_FILES= proto.common.etc proto.common.dynamic proto.dev
|
||||
PROG_DRIVERS=
|
||||
PROG_COMMANDS= mount umount grep fsck.mfs sh service loadramdisk sysenv
|
||||
PROG_SERVERS= mfs procfs
|
||||
PROG_SERVERS= input mfs procfs
|
||||
PROG_BIN=
|
||||
PROG_SBIN=
|
||||
PROG_USR.BIN=
|
||||
|
@ -45,7 +45,7 @@ RAMDISK_SMALL= 1
|
|||
.if ${MACHINE_ARCH} == "i386"
|
||||
ETC+= rs.single
|
||||
EXTRA+=
|
||||
PROG_DRIVERS+= at_wini floppy pci
|
||||
PROG_DRIVERS+= at_wini floppy pci pckbd
|
||||
PROG_COMMANDS+= cdprobe
|
||||
PROG_USR.SBIN+= pwd_mkdb
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ d--755 0 0
|
|||
ahci ---755 0 0 ahci
|
||||
virtio_blk ---755 0 0 virtio_blk
|
||||
at_wini ---755 0 0 at_wini
|
||||
pckbd ---755 0 0 pckbd
|
||||
#if RAMDISK_SMALL == 1
|
||||
ext2 ---755 0 0 ext2
|
||||
#endif
|
||||
|
@ -30,6 +31,7 @@ d--755 0 0
|
|||
#endif
|
||||
mfs ---755 0 0 mfs
|
||||
procfs ---755 0 0 procfs
|
||||
input ---755 0 0 input
|
||||
$
|
||||
usr d--755 0 0
|
||||
bin d--755 0 0
|
||||
|
|
|
@ -355,14 +355,21 @@
|
|||
imgrd b--600 0 8 1 6
|
||||
ip c--600 0 0 7 2
|
||||
ip0 c--600 0 0 7 2
|
||||
kbd c--660 0 0 4 127
|
||||
kbdaux c--660 0 0 4 126
|
||||
kbdmux c--600 0 0 64 0
|
||||
kbd0 c--600 0 0 64 1
|
||||
kbd1 c--600 0 0 64 2
|
||||
kbd2 c--600 0 0 64 3
|
||||
kbd3 c--600 0 0 64 4
|
||||
klog c--600 0 0 15 0
|
||||
kmem c--640 0 8 1 2
|
||||
log c--222 0 0 4 15
|
||||
lp c--200 1 1 6 0
|
||||
mem c--640 0 8 1 1
|
||||
mouse s--777 0 0 /dev/kbdaux
|
||||
mousemux c--600 0 0 64 64
|
||||
mouse0 c--600 0 0 64 65
|
||||
mouse1 c--600 0 0 64 66
|
||||
mouse2 c--600 0 0 64 67
|
||||
mouse3 c--600 0 0 64 68
|
||||
null c--666 0 8 1 3
|
||||
ptyp0 c--666 0 4 4 192
|
||||
ptyp1 c--666 0 4 4 193
|
||||
|
|
|
@ -15,6 +15,9 @@ then if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
|||
fi
|
||||
/bin/service -c up /usr/sbin/pci
|
||||
|
||||
/bin/service -c up /sbin/input -dev /dev/kbdmux
|
||||
/bin/service -c up /sbin/pckbd
|
||||
|
||||
# Start procfs so we can access /proc/pci
|
||||
mount -t procfs none /proc >/dev/null
|
||||
|
||||
|
|
|
@ -18,9 +18,13 @@ cons_stop(void)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
beep_x(unsigned int freq, clock_t dur)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
con_loadfont(endpoint_t endpt, cp_grant_id_t grant)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,23 +3,13 @@
|
|||
#include <termios.h>
|
||||
#include "tty.h"
|
||||
|
||||
void
|
||||
kbd_interrupt(message *m)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
do_fkey_ctl(message *m)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
do_kb_inject(message *m)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
do_kbd(message *m, int ipc_status)
|
||||
do_input(message *m)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -649,7 +649,7 @@ rs_read(tty_t *tp, int try)
|
|||
if (count > icount) count = icount;
|
||||
|
||||
/* Perform input processing on (part of) the input buffer. */
|
||||
if ((count = in_process(tp, rs->itail, count, -1)) == 0) break;
|
||||
if ((count = in_process(tp, rs->itail, count)) == 0) break;
|
||||
rs->icount -= count;
|
||||
if (!rs->idevready && rs->icount < RS_ILOWWATER) istart(rs);
|
||||
if ((rs->itail += count) == bufend(rs->ibuf))
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -588,7 +588,7 @@ static int rs_read(tty_t *tp, int try)
|
|||
if (count > icount) count = icount;
|
||||
|
||||
/* Perform input processing on (part of) the input buffer. */
|
||||
if ((count = in_process(tp, rs->itail, count, -1)) == 0) break;
|
||||
if ((count = in_process(tp, rs->itail, count)) == 0) break;
|
||||
|
||||
rs->icount -= count;
|
||||
if (!rs->idevready && rs->icount < RS_ILOWWATER) istart(rs);
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
.include <bsd.own.mk>
|
||||
|
||||
FILES= dvorak.map french.map german.map italian.map japanese.map \
|
||||
latin-america.map olivetti.map polish.map russian-cp866.map \
|
||||
latin-america.map polish.map russian-cp866.map \
|
||||
russian.map scandinavian.map spanish.map uk.map \
|
||||
us-std-esc.map us-std.map us-swap.map russian-cp1251.map \
|
||||
us-std.map us-swap.map russian-cp1251.map \
|
||||
ukraine-koi8-u.map portuguese.map abnt2.map
|
||||
|
||||
.include "Makefile.inc"
|
||||
|
|
|
@ -2,131 +2,108 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), 63, A('W'),C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - ''' */ 0x027,0x060,A(0x027),A(0x027),A(0x060),C(0x027),
|
||||
/* 27 - '[' */ 91,123, A(91),A(166),A(123),C(91),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ L(135), 128, A(135), A(135), A(128), C(135),
|
||||
/* 40 - '~' */ 126, 94, A(126), A(126), A(94), C(126),
|
||||
/* 41 - '´' */ '\'', '"', A('\''),A('\''),A('"'),C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - ']' */ ']', '}', A(']'),167 ,A('}'), C(']'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ 59, 58, A(59), A(58), A(59), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '\\', '|', A('\\'),A('|'),A('\\'),C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - '?' */ '?', 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), 63, A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '@', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(EQUAL) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(OPEN_BRACKET) = { 0x027,0x060,A(0x027),A(0x027),A(0x060),C(0x027) },
|
||||
K(CLOSE_BRACKET) = { 91, 123, A(91), A(166), A(123), C(91) },
|
||||
K(BACKSLASH) = { ']', '}', A(']'), 167 , A('}'), C(']') },
|
||||
K(SEMICOLON) = { L(135), 128, A(135), A(135), A(128), C(135) },
|
||||
K(APOSTROPH) = { 126, 94, A(126), A(126), A(94), C(126) },
|
||||
K(GRAVE_ACCENT) = { '\'', '"', A('\''),A('\''),A('"'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(PERIOD) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(SLASH) = { 59, 58, A(59), A(58), A(59), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { 59, 59, A(59), A(58), A(59), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '\\', '|', A('\\'),A('|'), A('\\'),C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_EQUAL) = { '?', 0, 0, 0, 0, 0 },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -5,131 +5,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '[', '{', A('['), A('['), A('}'), C(']'),
|
||||
/* 13 - '=' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ '\'', '"', A('\''),A('\''),A('"'), C('@'),
|
||||
/* 17 - 'w' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 18 - 'e' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 19 - 'r' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 20 - 't' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 21 - 'y' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 22 - 'u' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 23 - 'i' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 24 - 'o' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 25 - 'p' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 26 - '[' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 27 - ']' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 32 - 'd' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 33 - 'f' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 34 - 'g' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 35 - 'h' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 36 - 'j' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 37 - 'k' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 38 - 'l' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 39 - ';' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 40 - '\'' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ ';', ':', A(';'), A(';'), A(':'), C('@'),
|
||||
/* 45 - 'x' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 46 - 'c' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 47 - 'v' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 48 - 'b' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 49 - 'n' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 52 - '.' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 53 - '/' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('|'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(C) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(D) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(E) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(F) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(G) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(H) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(I) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(J) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(K) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(L) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(O) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(P) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(Q) = { '\'', '"', A('\''),A('\''),A('"'), C('@') },
|
||||
K(R) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(S) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(T) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(U) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(V) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(W) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(X) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(Y) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(Z) = { ';', ':', A(';'), A(';'), A(':'), C('@') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '@', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '[', '{', A('['), A('['), A('}'), C(']') },
|
||||
K(EQUAL) = { ']', '}', A(']'), A(']'), A('}'), C(']') },
|
||||
K(OPEN_BRACKET) = { '/', '?', A('/'), A('/'), A('?'), C('@') },
|
||||
K(CLOSE_BRACKET) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(BACKSLASH) = { '\\', '|', A('\\'),A('\\'),A('|'), C('\\') },
|
||||
K(SEMICOLON) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(APOSTROPH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A('`'), A('`'), A('~'), C('@') },
|
||||
K(COMMA) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(PERIOD) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(SLASH) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { L('z'), L('z'), A('z'), A('z'), A('z'), C('Z') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), A('|'), A('>'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -2,131 +2,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),C('['), C('['), C('['),
|
||||
/* 02 - '1' */ '&', '1', A('1'), '&', '1', C('A'),
|
||||
/* 03 - '2' */ 0202, '2', A('2'), '~', '2', C('B'),
|
||||
/* 04 - '3' */ '"', '3', A('3'), '#', '3', C('C'),
|
||||
/* 05 - '4' */ '\'', '4', A('4'), '{', '4', C('D'),
|
||||
/* 06 - '5' */ '(', '5', A('5'), '[', '5', C('E'),
|
||||
/* 07 - '6' */ '-', '6', A('6'), '|', '6', C('F'),
|
||||
/* 08 - '7' */ 0212, '7', A('7'), '`', '7', C('G'),
|
||||
/* 09 - '8' */ '_', '8', A('8'), '\\', '8', C('H'),
|
||||
/* 10 - '9' */ 0207, '9', A('9'), '^', '9', C('I'),
|
||||
/* 11 - '0' */ 0205, '0', A('0'), '@', '0', C('J'),
|
||||
/* 12 - '-' */ ')', 0370, A(')'), ']', '-', C('K'),
|
||||
/* 13 - '=' */ '=', '+', A('='), '}', '=', C('L'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),C('H'), C('H'), 0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),C('I'), C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('a'), 'A', A('a'), 'a', 'Q', C('A'),
|
||||
/* 17 - 'w' */ L('z'), 'Z', A('z'), 'z', 'W', C('Z'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), 'e', 'E', C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), 'r', 'R', C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), 't', 'T', C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), 'y', 'Y', C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), 'u', 'U', C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), 'i', 'I', C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), 'o', 'O', C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), 'p', 'P', C('P'),
|
||||
/* 26 - '[' */ '^', '"', A('^'), '^', '[', C('^'),
|
||||
/* 27 - ']' */ '$', 0234, A('$'), '$', ']', C('$'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('q'), 'Q', A('q'), 'q', 'A', C('Q'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), 's', 'S', C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), 'd', 'D', C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), 'f', 'F', C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), 'g', 'G', C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), 'h', 'H', C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), 'j', 'J', C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), 'k', 'K', C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), 'l', 'L', C('L'),
|
||||
/* 39 - ';' */ L('m'), 'M', A('m'), 'm', 'M', C('M'),
|
||||
/* 40 - '\'' */ 0227, '%', A('%'), 0227, '\\', C('G'),
|
||||
/* 41 - '`' */ 0375, 0375, 0375, 0375, '`', C('['),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '`' */ '*', 0346, A('*'), '*', '`', C('*'),
|
||||
/* 44 - 'z' */ L('w'), 'W', A('w'), 'w', 'Z', C('W'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), 'x', 'X', C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), 'c', 'C', C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), 'v', 'V', C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), 'b', 'B', C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), 'n', 'N', C('N'),
|
||||
/* 50 - 'm' */ ',', '?', A(','), ',', 'm', C('@'),
|
||||
/* 51 - ',' */ ';', '.', A(';'), ';', ',', C('@'),
|
||||
/* 52 - '.' */ ':', '/', A(':'), ':', '.', C('@'),
|
||||
/* 53 - '/' */ '!', '$'/*025*/,A('!'), '!', '/', C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), '*', '*', C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), ' ', ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),0177, '.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), '<', '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('q'), 'Q', A('q'), 'q', 'A', C('Q') },
|
||||
K(B) = { L('b'), 'B', A('b'), 'b', 'B', C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), 'c', 'C', C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), 'd', 'D', C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), 'e', 'E', C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), 'f', 'F', C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), 'g', 'G', C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), 'h', 'H', C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), 'i', 'I', C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), 'j', 'J', C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), 'k', 'K', C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), 'l', 'L', C('L') },
|
||||
K(M) = { ',', '?', A(','), ',', 'm', C('@') },
|
||||
K(N) = { L('n'), 'N', A('n'), 'n', 'N', C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), 'o', 'O', C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), 'p', 'P', C('P') },
|
||||
K(Q) = { L('a'), 'A', A('a'), 'a', 'Q', C('A') },
|
||||
K(R) = { L('r'), 'R', A('r'), 'r', 'R', C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), 's', 'S', C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), 't', 'T', C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), 'u', 'U', C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), 'v', 'V', C('V') },
|
||||
K(W) = { L('z'), 'Z', A('z'), 'z', 'W', C('Z') },
|
||||
K(X) = { L('x'), 'X', A('x'), 'x', 'X', C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), 'y', 'Y', C('Y') },
|
||||
K(Z) = { L('w'), 'W', A('w'), 'w', 'Z', C('W') },
|
||||
K(1) = { '&', '1', A('1'), '&', '1', C('A') },
|
||||
K(2) = { 0202, '2', A('2'), '~', '2', C('B') },
|
||||
K(3) = { '"', '3', A('3'), '#', '3', C('C') },
|
||||
K(4) = { '\'', '4', A('4'), '{', '4', C('D') },
|
||||
K(5) = { '(', '5', A('5'), '[', '5', C('E') },
|
||||
K(6) = { '-', '6', A('6'), '|', '6', C('F') },
|
||||
K(7) = { 0212, '7', A('7'), '`', '7', C('G') },
|
||||
K(8) = { '_', '8', A('8'), '\\', '8', C('H') },
|
||||
K(9) = { 0207, '9', A('9'), '^', '9', C('I') },
|
||||
K(0) = { 0205, '0', A('0'), '@', '0', C('J') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),C('['), C('['), C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),C('H'), C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),C('I'), C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), ' ', ' ', C('@') },
|
||||
K(DASH) = { ')', 0370, A(')'), ']', '-', C('K') },
|
||||
K(EQUAL) = { '=', '+', A('='), '}', '=', C('L') },
|
||||
K(OPEN_BRACKET) = { '^', '"', A('^'), '^', '[', C('^') },
|
||||
K(CLOSE_BRACKET) = { '$', 0234, A('$'), '$', ']', C('$') },
|
||||
K(BACKSLASH) = { '*', 0346, A('*'), '*', '`', C('*') },
|
||||
K(SEMICOLON) = { L('m'), 'M', A('m'), 'm', 'M', C('M') },
|
||||
K(APOSTROPH) = { 0227, '%', A('%'), 0227, '\\', C('G') },
|
||||
K(GRAVE_ACCENT) = { 0375, 0375, 0375, 0375, '`', C('[') },
|
||||
K(COMMA) = { ';', '.', A(';'), ';', ',', C('@') },
|
||||
K(PERIOD) = { ':', '/', A(':'), ':', '.', C('@') },
|
||||
K(SLASH) = { '!', '$', A('!'), '!', '/', C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), DEL, A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '!', '!', A('!'), '!', A('!'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), '*', '*', C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),C('M'), CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), DEL, '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), '<', '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -1,77 +1,37 @@
|
|||
/* genmap - output binary keymap Author: Marcus Hampel
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#ifdef __minix
|
||||
#include <minix/keymap.h>
|
||||
#else
|
||||
#include "../../../include/minix/keymap.h"
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* if we crosscompile those might not be defined,
|
||||
*/
|
||||
#ifndef u16_t
|
||||
#include <stdint.h>
|
||||
typedef uint16_t u16_t;
|
||||
#ifdef __minix
|
||||
#include <minix/input.h>
|
||||
#include <minix/keymap.h>
|
||||
#else
|
||||
#include "../../../include/minix/input.h"
|
||||
#include "../../../include/minix/keymap.h"
|
||||
#endif
|
||||
|
||||
#ifndef u8_t
|
||||
#include <stdint.h>
|
||||
typedef uint8_t u8_t;
|
||||
#endif
|
||||
|
||||
u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
|
||||
keymap_t keymap = {
|
||||
#include KEYSRC
|
||||
};
|
||||
|
||||
u8_t comprmap[4 + NR_SCAN_CODES * MAP_COLS * 9/8 * 2 + 1];
|
||||
|
||||
void tell(const char *s)
|
||||
{
|
||||
write(2, s, strlen(s));
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
u8_t *cm, *fb;
|
||||
u16_t *km;
|
||||
int n;
|
||||
|
||||
/* Compress the keymap. */
|
||||
memcpy(comprmap, KEY_MAGIC, 4);
|
||||
cm = comprmap + 4;
|
||||
n = 8;
|
||||
for (km = keymap; km < keymap + NR_SCAN_CODES * MAP_COLS; km++) {
|
||||
if (n == 8) {
|
||||
/* Allocate a new flag byte. */
|
||||
fb = cm;
|
||||
*cm++ = 0;
|
||||
n= 0;
|
||||
}
|
||||
*cm++ = (*km & 0x00FF); /* Low byte. */
|
||||
if (*km & 0xFF00) {
|
||||
*cm++ = (*km >> 8); /* High byte only when set. */
|
||||
*fb |= (1 << n); /* Set a flag if so. */
|
||||
}
|
||||
n++;
|
||||
/* This utility used to do compression, but the entire keymap fits in a
|
||||
* single 4K file system block now anyway, so who cares anymore?
|
||||
*/
|
||||
if (write(1, KEY_MAGIC, 4) != 4) {
|
||||
perror("write");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (write(1, keymap, sizeof(keymap)) != sizeof(keymap)) {
|
||||
perror("write");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Don't store trailing zeros. */
|
||||
while (cm > comprmap && cm[-1] == 0) cm--;
|
||||
|
||||
/* Emit the compressed keymap. */
|
||||
if (write(1, comprmap, cm - comprmap) < 0) {
|
||||
int err = errno;
|
||||
|
||||
tell("genmap: ");
|
||||
tell(strerror(err));
|
||||
tell("\n");
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -2,131 +2,107 @@
|
|||
|
||||
/* scan-code unsh Shift Alt AltGr Alt+Sh Strg */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),C('['), C('['), C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), '1', '!', C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), 0375, '@', C('@'),
|
||||
/* 04 - '3' */ '3', 025, A('3'), 0374, '#', C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), '4', '$', C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), '5', '%', C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), '6', '^', C('^'),
|
||||
/* 08 - '7' */ '7', '/', A('7'), '{', '&', C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), '[', '*', C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), ']', '(', C('I'),
|
||||
/* 11 - '0' */ '0', '=', A('0'), '}', ')', C('@'),
|
||||
/* 12 - '-' */ 0341, '?', 0341, '\\', '_', C('_'),
|
||||
/* 13 - '=' */ '\'', '`', A('\''),'=', '+', C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),C('H'), C('H'), 0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),C('I'), C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), '@', 'Q', C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), 'w', 'W', C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), 'e', 'E', C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), 'r', 'R', C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), 't', 'T', C('T'),
|
||||
/* 21 - 'y' */ L('z'), 'Z', A('z'), 'z', 'Z', C('Z'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), 'u', 'U', C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), 'i', 'I', C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), 'o', 'O', C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), 'p', 'P', C('P'),
|
||||
/* 26 - '[' */ L(0201),0232, 0201, '[', '{', C('['),
|
||||
/* 27 - ']' */ '+', '*', A('+'), '~', ']', C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 29 - Strg;-) */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), 'a', 'A', C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), 's', 'S', C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), 'd', 'D', C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), 'f', 'F', C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), 'g', 'G', C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), 'h', 'H', C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), 'j', 'J', C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), 'k', 'K', C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), 'l', 'L', C('L'),
|
||||
/* 39 - ';' */ L(0224),0231, 0224, ';', ':', C('@'),
|
||||
/* 40 - '\'' */ L(0204),0216, 0204, '\'', '"', C('@'),
|
||||
/* 41 - '`' */ '^', 0370, A('^'), '`', '~', C('^'),
|
||||
/* 42 - SHIFT */ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '#', '\'', A('#'), '\\', '|', C('\\'),
|
||||
/* 44 - 'z' */ L('y'), 'Y', A('y'), 'y', 'Y', C('Y'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), 'x', 'X', C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), 'c', 'C', C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), 'v', 'V', C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), 'b', 'B', C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), 'n', 'N', C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), 0346, 'M', C('M'),
|
||||
/* 51 - ',' */ ',', ';', A(','), ',', '<', C('@'),
|
||||
/* 52 - '.' */ '.', ':', A('.'), '.', '>', C('@'),
|
||||
/* 53 - '/' */ '-', '_', A('-'), '/', '?', C('_'),
|
||||
/* 54 - SHIFT */ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), '*', '*', C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), ' ', ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),0177, '.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), '|', '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), 'a', 'A', C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), 'b', 'B', C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), 'c', 'C', C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), 'd', 'D', C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), 'e', 'E', C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), 'f', 'F', C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), 'g', 'G', C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), 'h', 'H', C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), 'i', 'I', C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), 'j', 'J', C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), 'k', 'K', C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), 'l', 'L', C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), 0346, 'M', C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), 'n', 'N', C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), 'o', 'O', C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), 'p', 'P', C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), '@', 'Q', C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), 'r', 'R', C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), 's', 'S', C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), 't', 'T', C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), 'u', 'U', C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), 'v', 'V', C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), 'w', 'W', C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), 'x', 'X', C('X') },
|
||||
K(Y) = { L('z'), 'Z', A('z'), 'z', 'Z', C('Z') },
|
||||
K(Z) = { L('y'), 'Y', A('y'), 'y', 'Y', C('Y') },
|
||||
K(1) = { '1', '!', A('1'), '1', '!', C('A') },
|
||||
K(2) = { '2', '"', A('2'), 0375, '@', C('@') },
|
||||
K(3) = { '3', 025, A('3'), 0374, '#', C('C') },
|
||||
K(4) = { '4', '$', A('4'), '4', '$', C('D') },
|
||||
K(5) = { '5', '%', A('5'), '5', '%', C('E') },
|
||||
K(6) = { '6', '&', A('6'), '6', '^', C('^') },
|
||||
K(7) = { '7', '/', A('7'), '{', '&', C('G') },
|
||||
K(8) = { '8', '(', A('8'), '[', '*', C('H') },
|
||||
K(9) = { '9', ')', A('9'), ']', '(', C('I') },
|
||||
K(0) = { '0', '=', A('0'), '}', ')', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),C('['), C('['), C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),C('H'), C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),C('I'), C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), ' ', ' ', C('@') },
|
||||
K(DASH) = { 0341, '?', 0341, '\\', '_', C('_') },
|
||||
K(EQUAL) = { '\'', '`', A('\''),'=', '+', C('@') },
|
||||
K(OPEN_BRACKET) = { L(0201),0232, 0201, '[', '{', C('[') },
|
||||
K(CLOSE_BRACKET) = { '+', '*', A('+'), '~', ']', C(']') },
|
||||
K(BACKSLASH) = { '#', '\'', A('#'), '\\', '|', C('\\') },
|
||||
K(SEMICOLON) = { L(0224),0231, 0224, ';', ':', C('@') },
|
||||
K(APOSTROPH) = { L(0204),0216, 0204, '\'', '"', C('@') },
|
||||
K(GRAVE_ACCENT) = { '^', 0370, A('^'), '`', '~', C('^') },
|
||||
K(COMMA) = { ',', ';', A(','), ',', '<', C('@') },
|
||||
K(PERIOD) = { '.', ':', A('.'), '.', '>', C('@') },
|
||||
K(SLASH) = { '-', '_', A('-'), '/', '?', C('_') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), DEL, A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '-', '-', A('-'), '/', A('-'), C('_') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), '*', '*', C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),C('M'), CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), DEL, '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), '|', '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -4,131 +4,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),C('['), C('['), C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), '1', '!', C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), '2', '@', C('@'),
|
||||
/* 04 - '3' */ '3', 0234, A('3'), '3', 0234, C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), '4', '$', C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), '5', '%', C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), '6', '&', C('F'),
|
||||
/* 08 - '7' */ '7', '/', A('7'), '7', '/', C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), '8', '(', C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), '8', ')', C('I'),
|
||||
/* 11 - '0' */ '0', '=', A('0'), '0', '=', C('@'),
|
||||
/* 12 - '-' */ '\'', '?', A('\''),'`', '?', C('@'),
|
||||
/* 13 - '=' */ 0215, '^', A('|'), 0215, '^', C('^'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),C('H'), C('H'), 0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),C('I'), C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), 'q', 'Q', C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), 'w', 'W', C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), 'e', 'E', C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), 'r', 'R', C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), 't', 'T', C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), 'y', 'Y', C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), 'u', 'U', C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), 'i', 'I', C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), 'o', 'O', C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), 'p', 'P', C('P'),
|
||||
/* 26 - '[' */ 0212, 0202, 0212, '[', '{', C('['),
|
||||
/* 27 - ']' */ '+', '*', A('+'), ']', '}', C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), 'a', 'A', C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), 's', 'S', C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), 'd', 'D', C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), 'f', 'F', C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), 'g', 'G', C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), 'h', 'H', C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), 'j', 'J', C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), 'k', 'K', C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), 'l', 'L', C('L'),
|
||||
/* 39 - ';' */ 0225, 0207, 0225, '@', '@', C('@'),
|
||||
/* 40 - '\'' */ 0205, 0370, 0205, '#', 0276, C('@'),
|
||||
/* 41 - '`' */ '\\', '|', A('\\'),0176, '|', C('\\'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ 0227, 025, 0227, 0227, 025, C('@'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), 'z', 'Z', C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), 'x', 'X', C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), 'c', 'C', C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), 'v', 'V', C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), 'b', 'B', C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), 'n', 'N', C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), 'm', 'M', C('M'),
|
||||
/* 51 - ',' */ ',', ';', A(','), ',', ';', C('@'),
|
||||
/* 52 - '.' */ '.', ':', A('.'), '.', ':', C('@'),
|
||||
/* 53 - '/' */ '-', '_', A('-'), '-', '_', C('_'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), '*', '*', C('M'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), ' ', ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),0177, '.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), '|', '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), 'a', 'A', C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), 'b', 'B', C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), 'c', 'C', C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), 'd', 'D', C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), 'e', 'E', C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), 'f', 'F', C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), 'g', 'G', C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), 'h', 'H', C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), 'i', 'I', C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), 'j', 'J', C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), 'k', 'K', C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), 'l', 'L', C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), 'm', 'M', C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), 'n', 'N', C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), 'o', 'O', C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), 'p', 'P', C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), 'q', 'Q', C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), 'r', 'R', C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), 's', 'S', C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), 't', 'T', C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), 'u', 'U', C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), 'v', 'V', C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), 'w', 'W', C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), 'x', 'X', C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), 'y', 'Y', C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), 'z', 'Z', C('Z') },
|
||||
K(1) = { '1', '!', A('1'), '1', '!', C('A') },
|
||||
K(2) = { '2', '"', A('2'), '2', '@', C('@') },
|
||||
K(3) = { '3', 0234, A('3'), '3', 0234, C('C') },
|
||||
K(4) = { '4', '$', A('4'), '4', '$', C('D') },
|
||||
K(5) = { '5', '%', A('5'), '5', '%', C('E') },
|
||||
K(6) = { '6', '&', A('6'), '6', '&', C('F') },
|
||||
K(7) = { '7', '/', A('7'), '7', '/', C('G') },
|
||||
K(8) = { '8', '(', A('8'), '8', '(', C('H') },
|
||||
K(9) = { '9', ')', A('9'), '8', ')', C('I') },
|
||||
K(0) = { '0', '=', A('0'), '0', '=', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),C('['), C('['), C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),C('H'), C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),C('I'), C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), ' ', ' ', C('@') },
|
||||
K(DASH) = { '\'', '?', A('\''),'`', '?', C('@') },
|
||||
K(EQUAL) = { 0215, '^', A('|'), 0215, '^', C('^') },
|
||||
K(OPEN_BRACKET) = { 0212, 0202, 0212, '[', '{', C('[') },
|
||||
K(CLOSE_BRACKET) = { '+', '*', A('+'), ']', '}', C(']') },
|
||||
K(BACKSLASH) = { 0227, 025, 0227, 0227, 025, C('@') },
|
||||
K(SEMICOLON) = { 0225, 0207, 0225, '@', '@', C('@') },
|
||||
K(APOSTROPH) = { 0205, 0370, 0205, '#', 0276, C('@') },
|
||||
K(GRAVE_ACCENT) = { '\\', '|', A('\\'),0176, '|', C('\\') },
|
||||
K(COMMA) = { ',', ';', A(','), ',', ';', C('@') },
|
||||
K(PERIOD) = { '.', ':', A('.'), '.', ':', C('@') },
|
||||
K(SLASH) = { '-', '_', A('-'), '-', '_', C('_') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), DEL, A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '-', '-', A('-'), '-', A('-'), C('_') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), '*', '*', C('M') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),C('M'), CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), DEL, '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), '|', '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -18,137 +18,109 @@
|
|||
* 125(0x7D) YEN mapped to '\\' and '|'
|
||||
*/
|
||||
|
||||
#if (NR_SCAN_CODES != 0x80)
|
||||
#error NR_SCAN_CODES mis-match
|
||||
#endif
|
||||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), A('2'), A('"'), C('B'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), A('6'), A('&'), C('F'),
|
||||
/* 08 - '7' */ '7', '\'', A('7'), A('7'), A('\''),C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), A('8'), A('('), C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), A('9'), A(')'), C('I'),
|
||||
/* 11 - '0' */ '0', '~', A('0'), A('0'), A('~'), C('@'),
|
||||
/* 12 - '-' */ '-', '=', A('-'), A('-'), A('='), C('@'),
|
||||
/* 13 - '^' */ '^', '~', A('^'), A('^'), A('~'), C('^'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '@' */ '@', '`', A('@'), A('@'), A('`'), C('@'),
|
||||
/* 27 - '[' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 28 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ ';', '+', A(';'), A(';'), A('+'), C('@'),
|
||||
/* 40 - ':' */ ':', '*', A(':'), A(':'), A('*'), C('@'),
|
||||
/* 41 - KANJI */ 0, 0, 0, 0, 0, 0,
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - ']' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - KANA */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - '\\' */ '\\', '_', A('\\'),A('\\'),A('_'), C('_'),
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - HENKAN */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - MU-HENKAN*/ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - YEN */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '"', A('2'), A('2'), A('"'), C('B') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '&', A('6'), A('6'), A('&'), C('F') },
|
||||
K(7) = { '7', '\'', A('7'), A('7'), A('\''),C('G') },
|
||||
K(8) = { '8', '(', A('8'), A('8'), A('('), C('H') },
|
||||
K(9) = { '9', ')', A('9'), A('9'), A(')'), C('I') },
|
||||
K(0) = { '0', '~', A('0'), A('0'), A('~'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '=', A('-'), A('-'), A('='), C('@') },
|
||||
K(EQUAL) = { '^', '~', A('^'), A('^'), A('~'), C('^') },
|
||||
K(OPEN_BRACKET) = { '@', '`', A('@'), A('@'), A('`'), C('@') },
|
||||
K(CLOSE_BRACKET) = { '[', '{', A('['), A('['), A('{'), C('[') },
|
||||
K(BACKSLASH) = { ']', '}', A(']'), A(']'), A('}'), C(']') },
|
||||
K(SEMICOLON) = { ';', '+', A(';'), A(';'), A('+'), C('@') },
|
||||
K(APOSTROPH) = { ':', '*', A(':'), A(':'), A('*'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(PERIOD) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(SLASH) = { '/', '?', A('/'), A('/'), A('?'), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', A('/'), A('/'), A('/'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(I10L_1) = { '\\', '_', A('\\'),A('\\'),A('_'), C('_') },
|
||||
K(I10L_3) = { '\\', '|', A('\\'),A('\\'),A('|'), C('\\') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -14,137 +14,109 @@
|
|||
in MINIX 1.7.2
|
||||
***/
|
||||
|
||||
#if (NR_SCAN_CODES != 0x80)
|
||||
#error NR_SCAN_CODES mis-match
|
||||
#endif
|
||||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), A('2'), A('"'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), A('6'), A('$'), C('^'),
|
||||
/* 08 - '7' */ '7', '/', A('7'), A('7'), A('/'), C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), A('8'), A('('), C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), A('9'), A(')'), C('I'),
|
||||
/* 11 - '0' */ '0', '=', A('0'), A('0'), A('='), C('@'),
|
||||
/* 12 - '-' */ '\'', '?', A('\''), 0x5c, A('?'), C('?'),
|
||||
/* 13 - '¨' */ 0xa8, 0xad, A(0xa8),A(0xa8),A(0xad), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), 0x40, A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - 'ï' */ 0xef, 0xf9, A(0xef),A(0xef),A(0xf9),C(0xef),
|
||||
/* 27 - '+' */ '+', '*', A('+'), 0x7e, A('*'), C('+'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - '¤' */ L(0xa4),0xa5, A(0xa4),A(0xa4),A(0xa5),C('@'),
|
||||
/* 40 - '{' */ '{', '[', A('{'), 0x5e, A('['), C('@'),
|
||||
/* 41 - '|' */ '|', 0xf8, A('|'), 0xaa, A('\''),C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '}' */ 0x7d, 0x5d, A('<'), 0x60, A('>'), C('<'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', ';', A(','), A(','), A(';'), C('@'),
|
||||
/* 52 - '.' */ '.', ':', A('.'), A('.'), A(':'), C('@'),
|
||||
/* 53 - '/' */ '-', '_', A('-'), A('-'), A('_'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ '-', '-', '-', '-', '-', '-',
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ '+', '+', '+', '+', '+', '+',
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('>'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), 0x40, A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '"', A('2'), A('2'), A('"'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '&', A('6'), A('6'), A('$'), C('^') },
|
||||
K(7) = { '7', '/', A('7'), A('7'), A('/'), C('G') },
|
||||
K(8) = { '8', '(', A('8'), A('8'), A('('), C('H') },
|
||||
K(9) = { '9', ')', A('9'), A('9'), A(')'), C('I') },
|
||||
K(0) = { '0', '=', A('0'), A('0'), A('='), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '\'', '?', A('\''),0x5c, A('?'), C('?') },
|
||||
K(EQUAL) = { 0xa8, 0xad, A(0xa8),A(0xa8),A(0xad),C('@') },
|
||||
K(OPEN_BRACKET) = { 0xef, 0xf9, A(0xef),A(0xef),A(0xf9),C(0xef) },
|
||||
K(CLOSE_BRACKET) = { '+', '*', A('+'), 0x7e, A('*'), C('+') },
|
||||
K(BACKSLASH) = { 0x7d, 0x5d, A('<'), 0x60, A('>'), C('<') },
|
||||
K(SEMICOLON) = { L(0xa4),0xa5, A(0xa4),A(0xa4),A(0xa5),C('@') },
|
||||
K(APOSTROPH) = { '{', '[', A('{'), 0x5e, A('['), C('@') },
|
||||
K(GRAVE_ACCENT) = { '|', 0xf8, A('|'), 0xaa, A('\''),C('@') },
|
||||
K(COMMA) = { ',', ';', A(','), A(','), A(';'), C('@') },
|
||||
K(PERIOD) = { '.', ':', A('.'), A('.'), A(':'), C('@') },
|
||||
K(SLASH) = { '-', '_', A('-'), A('-'), A('_'), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '-', '-', A('-'), A('-'), A('-'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', '-', '-', '-', '-' },
|
||||
K(KP_PLUS) = { '+', '+', '+', '+', '+', '+' },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), A('>'), A('>'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
/* Keymap for the Olivetti M24. */
|
||||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), A('2'), A('"'), C('B'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), A('6'), A('&'), C('F'),
|
||||
/* 08 - '7' */ '7', '\'', A('7'), A('7'), A('\''),C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), A('8'), A('('), C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), A('9'), A(')'), C('I'),
|
||||
/* 11 - '0' */ '0', '_', A('0'), A('0'), A('_'), C('@'),
|
||||
/* 12 - '-' */ '-', '=', A('-'), A('-'), A('='), C('@'),
|
||||
/* 13 - '=' */ '^', '~', A('^'), A('^'), A('~'), C('^'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '[' */ '@', '`', A('@'), A('@'), A('`'), C('@'),
|
||||
/* 27 - ']' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ ';', '+', A(';'), A(';'), A('+'), C('@'),
|
||||
/* 40 - '\'' */ ':', '*', A(':'), A(':'), A('*'), C('@'),
|
||||
/* 41 - '`' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ C('S'), C('S'), C('S'), C('S'), C('S'), C('S'),
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 85 - ??? */ LEFT, 014, A(014), A(014), A(014), 014,
|
||||
/* 86 - ??? */ 0212, 0212, 0212, 0212, 0212, 0212,
|
||||
/* 87 - F11 */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ DOWN, DOWN, DOWN, DOWN, DOWN, DOWN,
|
||||
/* 90 - ??? */ RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT,
|
||||
/* 91 - ??? */ UP, UP, UP, UP, UP, UP,
|
||||
/* 92 - ??? */ LEFT, LEFT, LEFT, LEFT, LEFT, LEFT,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
|
@ -6,131 +6,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A(0xea),A(0xea),A(0xca),C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A(0xf3),A(0xf3),A(0xd3),C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A(0xb1),A(0xb1),A(0xa1),C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A(0xb6),A(0xb6),A(0xa6),C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A(0xb3),A(0xb3),A(0xa3),C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(';'), A(';'), A(':'), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A('\''),A('\''),A('"'), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A(0xbf),A(0xbf),A(0xaf),C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A(0xbc),A(0xbc),A(0xac),C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A(0xe6),A(0xe6),A(0xc6),C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A(0xf1),A(0xf1),A(0xd1),C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('|'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A(0xb1),A(0xb1),A(0xa1),C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A(0xe6),A(0xe6),A(0xc6),C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A(0xea),A(0xea),A(0xca),C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A(0xb3),A(0xb3),A(0xa3),C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A(0xf1),A(0xf1),A(0xd1),C('N') },
|
||||
K(O) = { L('o'), 'O', A(0xf3),A(0xf3),A(0xd3),C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A(0xb6),A(0xb6),A(0xa6),C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A(0xbc),A(0xbc),A(0xac),C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A(0xbf),A(0xbf),A(0xaf),C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '@', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(EQUAL) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A('['), A('['), A('{'), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(']'), A(']'), A('}'), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', A('\\'),A('\\'),A('|'), C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(';'), A(';'), A(':'), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A('\''),A('\''),A('"'), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A('`'), A('`'), A('~'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(PERIOD) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(SLASH) = { '/', '?', A('/'), A('/'), A('?'), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', A('/'), A('/'), A('/'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), A('|'), A('>'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -1,134 +1,108 @@
|
|||
/* Keymap for Portuguese keyboards */
|
||||
|
||||
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
|
||||
/*
|
||||
====================================================================
|
||||
*/
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),C('['), C('['), C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), '|', '!', C('A'),
|
||||
/* 03 - '2' */ '2', '"', '@', '@', '"', C('@'),
|
||||
/* 04 - '3' */ '3', '#', A(156), 156, 0372, C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), 0x15, '$', C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), '5', '%', C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), 0252, '&', C('F'),
|
||||
/* 08 - '7' */ '7', '/', '{', '{', '/', C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), '[', '(', C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), ']', ')', C('I'),
|
||||
/* 11 - '0' */ '0', '=', 125, 125, '=', C('@'),
|
||||
/* 12 - '-' */ '\'', '?', A('\''),'?', '?', C('_'),
|
||||
/* 13 - '=' */ 174, 175, 174, 174, 0250, C('@'),
|
||||
/* 14 - BS */ 127, 127, 127, 127, 127, C(127),
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),C('I'), C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), 'q', 'Q', C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), 'w', 'W', C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', 128, 128, 'E', C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), 'r', 'R', C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), 't', 'T', C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), 'y', 'Y', C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), 'u', 'U', C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), 'i', 'I', C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), 'o', 'O', C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), 'p', 'P', C('P'),
|
||||
/* 26 - '[' */ '+', '*', A('`'),'[', '^', C('['),
|
||||
/* 27 - ']' */ '\'', 96, '\'', '\'', '*', C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), 'a', 'A', C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), 's', 'S', C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), 'd', 'D', C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), 'f', 'F', C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), 'g', 'G', C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), 'h', 'H', C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), 'j', 'J', C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), 'k', 'K', C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), 'l', 'L', C('L'),
|
||||
/* 39 - ';' */ 135, 128, 135,135, 135, 135,
|
||||
/* 40 - '\'' */ 167, 166, 167, 167, 167, C('@'),
|
||||
/* 41 - '`' */ '\\', '|', A(0247),'\\', 0246, C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '~' */ '~', '^', A(0207),'}', 000, C('@'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), 'z', 'Z', C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), 'x', 'X', C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), 'c', 'C', C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), 'v', 'V', C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), 'b', 'B', C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), 'n', 'N', C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), 'm', 'M', C('M'),
|
||||
/* 51 - ',' */ ',', ';', A(','), ',', ';', C('@'),
|
||||
/* 52 - '.' */ '.', ':', A('.'), '.', ':', C('@'),
|
||||
/* 53 - '/' */ '-', '_', '-' , '-', '_', C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), '*', '*', C('M'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), ' ', ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),0177, '.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), '<', '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
/* ==================================================================== */
|
||||
K(A) = { L('a'), 'A', A('a'), 'a', 'A', C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), 'b', 'B', C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), 'c', 'C', C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), 'd', 'D', C('D') },
|
||||
K(E) = { L('e'), 'E', 128, 128, 'E', C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), 'f', 'F', C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), 'g', 'G', C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), 'h', 'H', C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), 'i', 'I', C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), 'j', 'J', C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), 'k', 'K', C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), 'l', 'L', C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), 'm', 'M', C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), 'n', 'N', C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), 'o', 'O', C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), 'p', 'P', C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), 'q', 'Q', C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), 'r', 'R', C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), 's', 'S', C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), 't', 'T', C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), 'u', 'U', C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), 'v', 'V', C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), 'w', 'W', C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), 'x', 'X', C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), 'y', 'Y', C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), 'z', 'Z', C('Z') },
|
||||
K(1) = { '1', '!', A('1'), '|', '!', C('A') },
|
||||
K(2) = { '2', '"', '@', '@', '"', C('@') },
|
||||
K(3) = { '3', '#', A(156), 156, 0372, C('C') },
|
||||
K(4) = { '4', '$', A('4'), 0x15, '$', C('D') },
|
||||
K(5) = { '5', '%', A('5'), '5', '%', C('E') },
|
||||
K(6) = { '6', '&', A('6'), 0252, '&', C('F') },
|
||||
K(7) = { '7', '/', '{', '{', '/', C('G') },
|
||||
K(8) = { '8', '(', A('8'), '[', '(', C('H') },
|
||||
K(9) = { '9', ')', A('9'), ']', ')', C('I') },
|
||||
K(0) = { '0', '=', 125, 125, '=', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),C('['), C('['), C('[') },
|
||||
K(BACKSPACE) = { 127, 127, 127, 127, 127, C(127) },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),C('I'), C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), ' ', ' ', C('@') },
|
||||
K(DASH) = { '\'', '?', A('\''),'?', '?', C('_') },
|
||||
K(EQUAL) = { 174, 175, 174, 174, 0250, C('@') },
|
||||
K(OPEN_BRACKET) = { '+', '*', A('`'), '[', '^', C('[') },
|
||||
K(CLOSE_BRACKET) = { '\'', 96, '\'', '\'', '*', C(']') },
|
||||
K(BACKSLASH) = { '~', '^', A(0207),'}', 000, C('@') },
|
||||
K(SEMICOLON) = { 135, 128, 135, 135, 135, 135 },
|
||||
K(APOSTROPH) = { 167, 166, 167, 167, 167, C('@') },
|
||||
K(GRAVE_ACCENT) = { '\\', '|', A(0247),'\\', 0246, C('@') },
|
||||
K(COMMA) = { ',', ';', A(','), ',', ';', C('@') },
|
||||
K(PERIOD) = { '.', ':', A('.'), '.', ':', C('@') },
|
||||
K(SLASH) = { '-', '_', '-' , '-', '_', C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), DEL, A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '-', '-', '-' , '-', '-' , C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), '*', '*', C('M') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),C('M'), CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), DEL, '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), '<', '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -7,131 +7,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A(233), A('q'), A(201), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A(246), A('w'), A(214), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A(243), A('e'), A(211), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A(234), A('r'), A(202), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A(229), A('t'), A(197), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A(237), A('y'), A(205), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A(227), A('u'), A(195), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A(248), A('i'), A(216), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A(249), A('o'), A(217), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A(231), A('p'), A(199), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A(245), A('['), A(213), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(250), A(']'), A(218), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A(244), A('a'), A(212), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A(251), A('s'), A(219), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A(226), A('d'), A(194), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A(224), A('f'), A(192), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A(239), A('g'), A(207), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A(240), A('h'), A(208), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A(238), A('j'), A(206), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A(235), A('k'), A(203), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A(228), A('l'), A(196), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(230), A(';'), A(198), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A(253),A('\''),A(221), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A(255), A('z'), A(223), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A(247), A('x'), A(215), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A(241), A('c'), A(209), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A(236), A('v'), A(204), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A(232), A('b'), A(200), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A(242), A('n'), A(210), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A(252), A('m'), A(220), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(225), A(','), A(193), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A(254), A('.'), A(222), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A(46), A('/'), A(44), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('|'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A(244), A('a'), A(212), C('A') },
|
||||
K(B) = { L('b'), 'B', A(232), A('b'), A(200), C('B') },
|
||||
K(C) = { L('c'), 'C', A(241), A('c'), A(209), C('C') },
|
||||
K(D) = { L('d'), 'D', A(226), A('d'), A(194), C('D') },
|
||||
K(E) = { L('e'), 'E', A(243), A('e'), A(211), C('E') },
|
||||
K(F) = { L('f'), 'F', A(224), A('f'), A(192), C('F') },
|
||||
K(G) = { L('g'), 'G', A(239), A('g'), A(207), C('G') },
|
||||
K(H) = { L('h'), 'H', A(240), A('h'), A(208), C('H') },
|
||||
K(I) = { L('i'), 'I', A(248), A('i'), A(216), C('I') },
|
||||
K(J) = { L('j'), 'J', A(238), A('j'), A(206), C('J') },
|
||||
K(K) = { L('k'), 'K', A(235), A('k'), A(203), C('K') },
|
||||
K(L) = { L('l'), 'L', A(228), A('l'), A(196), C('L') },
|
||||
K(M) = { L('m'), 'M', A(252), A('m'), A(220), C('M') },
|
||||
K(N) = { L('n'), 'N', A(242), A('n'), A(210), C('N') },
|
||||
K(O) = { L('o'), 'O', A(249), A('o'), A(217), C('O') },
|
||||
K(P) = { L('p'), 'P', A(231), A('p'), A(199), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A(233), A('q'), A(201), C('Q') },
|
||||
K(R) = { L('r'), 'R', A(234), A('r'), A(202), C('R') },
|
||||
K(S) = { L('s'), 'S', A(251), A('s'), A(219), C('S') },
|
||||
K(T) = { L('t'), 'T', A(229), A('t'), A(197), C('T') },
|
||||
K(U) = { L('u'), 'U', A(227), A('u'), A(195), C('U') },
|
||||
K(V) = { L('v'), 'V', A(236), A('v'), A(204), C('V') },
|
||||
K(W) = { L('w'), 'W', A(246), A('w'), A(214), C('W') },
|
||||
K(X) = { L('x'), 'X', A(247), A('x'), A(215), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A(237), A('y'), A(205), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A(255), A('z'), A(223), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '@', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(EQUAL) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A(245), A('['), A(213), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(250), A(']'), A(218), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', A('\\'),A('\\'),A('|'), C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(230), A(';'), A(198), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A(253), A('\''),A(221), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A('`'), A('`'), A('~'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(225), A(','), A(193), C('@') },
|
||||
K(PERIOD) = { '.', '>', A(254), A('.'), A(222), C('@') },
|
||||
K(SLASH) = { '/', '?', A(46), A('/'), A(44), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', A(46), A('/'), A(46), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), A('|'), A('>'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -6,131 +6,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', '1', A('1'), '!', C('A'),
|
||||
/* 03 - '2' */ '2', '@', '2', A('2'), '"', C('@'),
|
||||
/* 04 - '3' */ '3', '#', '3', A('3'), 'N', C('C'),
|
||||
/* 05 - '4' */ '4', '$', '4', A('4'), ';', C('D'),
|
||||
/* 06 - '5' */ '5', '%', '5', A('5'), '%', C('E'),
|
||||
/* 07 - '6' */ '6', '^', '6', A('6'), ':', C('^'),
|
||||
/* 08 - '7' */ '7', '&', '7', A('7'), '?', C('G'),
|
||||
/* 09 - '8' */ '8', '*', '8', A('8'), '*', C('H'),
|
||||
/* 10 - '9' */ '9', '(', '9', A('9'), '(', C('I'),
|
||||
/* 11 - '0' */ '0', ')', '0', A('0'), ')', C('@'),
|
||||
/* 12 - '-' */ '-', '_', '-', A('-'), '_', C('_'),
|
||||
/* 13 - '=' */ '=', '+', '=', A('='), '+', C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), C('H'), CA('H'), C('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), C('I'), CA('I'),C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A(169), A('q'), A(137), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A(230), A('w'), A(150), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A(227), A('e'), A(147), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A(170), A('r'), A(138), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A(165), A('t'), A(133), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A(173), A('y'), A(141), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A(163), A('u'), A(131), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A(232), A('i'), A(152), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A(233), A('o'), A(153), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A(167), A('p'), A(135), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A(229), A('['), A(149), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(234), A(']'), A(154), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), C('M'), CA('M'), C('M') ,C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A(228), A('a'), A(148), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A(235), A('s'), A(155), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A(162), A('d'), A(130), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A(160), A('f'), A(128), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A(175), A('g'), A(143), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A(224), A('h'), A(144), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A(174), A('j'), A(142), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A(171), A('k'), A(139), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A(164), A('l'), A(132), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(166), A(';'), A(134), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A(237), A('\''),A(157), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A(241), A('`'), A(240), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', '\\', A('\\'), '|', C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A(239), A('z'), A(159), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A(231), A('x'), A(151), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A(225), A('c'), A(145), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A(172), A('v'), A(140), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A(168), A('b'), A(136), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A(226), A('n'), A(146), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A(236), A('m'), A(156), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(161), A(','), A(129), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A(238), A('.'), A(158), C('@'),
|
||||
/* 53 - '/' */ '/', '?', '.', A('/'), ',', C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', '*', A('*'), '*', C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', ' ', A(' '), ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, F1, AF1, SF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, F2, AF2, SF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, F3, AF3, SF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, F4, AF4, SF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, F5, AF5, SF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, F6, AF6, SF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, F7, AF7, SF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, F8, AF8, SF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, F9, AF9, SF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, F10, AF10, SF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', HOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', UP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', PGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', NMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', LEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', MID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', RIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', PLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', END, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', DOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', PGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', INSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', 0177, A(0177),'.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), C('M'), CA('M'), C('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', '<', A('|'), '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, F11, AF11, SF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, F12, AF12, SF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A(228), A('a'), A(148), C('A') },
|
||||
K(B) = { L('b'), 'B', A(168), A('b'), A(136), C('B') },
|
||||
K(C) = { L('c'), 'C', A(225), A('c'), A(145), C('C') },
|
||||
K(D) = { L('d'), 'D', A(162), A('d'), A(130), C('D') },
|
||||
K(E) = { L('e'), 'E', A(227), A('e'), A(147), C('E') },
|
||||
K(F) = { L('f'), 'F', A(160), A('f'), A(128), C('F') },
|
||||
K(G) = { L('g'), 'G', A(175), A('g'), A(143), C('G') },
|
||||
K(H) = { L('h'), 'H', A(224), A('h'), A(144), C('H') },
|
||||
K(I) = { L('i'), 'I', A(232), A('i'), A(152), C('I') },
|
||||
K(J) = { L('j'), 'J', A(174), A('j'), A(142), C('J') },
|
||||
K(K) = { L('k'), 'K', A(171), A('k'), A(139), C('K') },
|
||||
K(L) = { L('l'), 'L', A(164), A('l'), A(132), C('L') },
|
||||
K(M) = { L('m'), 'M', A(236), A('m'), A(156), C('M') },
|
||||
K(N) = { L('n'), 'N', A(226), A('n'), A(146), C('N') },
|
||||
K(O) = { L('o'), 'O', A(233), A('o'), A(153), C('O') },
|
||||
K(P) = { L('p'), 'P', A(167), A('p'), A(135), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A(169), A('q'), A(137), C('Q') },
|
||||
K(R) = { L('r'), 'R', A(170), A('r'), A(138), C('R') },
|
||||
K(S) = { L('s'), 'S', A(235), A('s'), A(155), C('S') },
|
||||
K(T) = { L('t'), 'T', A(165), A('t'), A(133), C('T') },
|
||||
K(U) = { L('u'), 'U', A(163), A('u'), A(131), C('U') },
|
||||
K(V) = { L('v'), 'V', A(172), A('v'), A(140), C('V') },
|
||||
K(W) = { L('w'), 'W', A(230), A('w'), A(150), C('W') },
|
||||
K(X) = { L('x'), 'X', A(231), A('x'), A(151), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A(173), A('y'), A(141), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A(239), A('z'), A(159), C('Z') },
|
||||
K(1) = { '1', '!', '1', A('1'), '!', C('A') },
|
||||
K(2) = { '2', '@', '2', A('2'), '"', C('@') },
|
||||
K(3) = { '3', '#', '3', A('3'), 'N', C('C') },
|
||||
K(4) = { '4', '$', '4', A('4'), ';', C('D') },
|
||||
K(5) = { '5', '%', '5', A('5'), '%', C('E') },
|
||||
K(6) = { '6', '^', '6', A('6'), ':', C('^') },
|
||||
K(7) = { '7', '&', '7', A('7'), '?', C('G') },
|
||||
K(8) = { '8', '*', '8', A('8'), '*', C('H') },
|
||||
K(9) = { '9', '(', '9', A('9'), '(', C('I') },
|
||||
K(0) = { '0', ')', '0', A('0'), ')', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), C('M'), CA('M'),C('M') ,C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), C('H'), CA('H'),C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), C('I'), CA('I'),C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', ' ', A(' '), ' ', C('@') },
|
||||
K(DASH) = { '-', '_', '-', A('-'), '_', C('_') },
|
||||
K(EQUAL) = { '=', '+', '=', A('='), '+', C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A(229), A('['), A(149), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(234), A(']'), A(154), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', '\\', A('\\'),'|', C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(166), A(';'), A(134), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A(237), A('\''),A(157), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A(241), A('`'), A(240), C('@') },
|
||||
K(COMMA) = { ',', '<', A(161), A(','), A(129), C('@') },
|
||||
K(PERIOD) = { '.', '>', A(238), A('.'), A(158), C('@') },
|
||||
K(SLASH) = { '/', '?', '.', A('/'), ',', C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, F1, AF1, SF1, CF1 },
|
||||
K(F2) = { F2, SF2, F2, AF2, SF2, CF2 },
|
||||
K(F3) = { F3, SF3, F3, AF3, SF3, CF3 },
|
||||
K(F4) = { F4, SF4, F4, AF4, SF4, CF4 },
|
||||
K(F5) = { F5, SF5, F5, AF5, SF5, CF5 },
|
||||
K(F6) = { F6, SF6, F6, AF6, SF6, CF6 },
|
||||
K(F7) = { F7, SF7, F7, AF7, SF7, CF7 },
|
||||
K(F8) = { F8, SF8, F8, AF8, SF8, CF8 },
|
||||
K(F9) = { F9, SF9, F9, AF9, SF9, CF9 },
|
||||
K(F10) = { F10, SF10, F10, AF10, SF10, CF10 },
|
||||
K(F11) = { F11, SF11, F11, AF11, SF11, CF11 },
|
||||
K(F12) = { F12, SF12, F12, AF12, SF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, INSRT, AINSRT, INSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, HOME, AHOME, HOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, PGUP, APGUP, PGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, DEL, A(DEL), DEL, DEL },
|
||||
K(END) = { END, END, END, AEND, END, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, PGDN, APGDN, PGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, RIGHT, ARIGHT, RIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, LEFT, ALEFT, LEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, DOWN, ADOWN, DOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, UP, AUP, UP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', '.', A('/'), '.', C('@') },
|
||||
K(KP_STAR) = { '*', '*', '*', A('*'), '*', C('@') },
|
||||
K(KP_DASH) = { '-', '-', '-', AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', '+', APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), C('M'), CA('M'),C('M'), C('J') },
|
||||
K(KP_1) = { NEND, '1', END, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', DOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', PGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', LEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', MID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', RIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', HOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', UP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', PGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', INSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', DEL, A(DEL), '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', '<', A('|'), '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), C('M'), CA('M'),C('M') ,C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), C('M'), CA('M'),C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -6,131 +6,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', '1', A('1'), '!', C('A'),
|
||||
/* 03 - '2' */ '2', '@', '2', A('2'), '"', C('@'),
|
||||
/* 04 - '3' */ '3', '#', '3', A('3'), 'N', C('C'),
|
||||
/* 05 - '4' */ '4', '$', '4', A('4'), ';', C('D'),
|
||||
/* 06 - '5' */ '5', '%', '5', A('5'), '%', C('E'),
|
||||
/* 07 - '6' */ '6', '^', '6', A('6'), ':', C('^'),
|
||||
/* 08 - '7' */ '7', '&', '7', A('7'), '?', C('G'),
|
||||
/* 09 - '8' */ '8', '*', '8', A('8'), '*', C('H'),
|
||||
/* 10 - '9' */ '9', '(', '9', A('9'), '(', C('I'),
|
||||
/* 11 - '0' */ '0', ')', '0', A('0'), ')', C('@'),
|
||||
/* 12 - '-' */ '-', '_', '-', A('-'), '_', C('_'),
|
||||
/* 13 - '=' */ '=', '+', '=', A('='), '+', C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), C('H'), CA('H'), C('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), C('I'), CA('I'),C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('J'), A('q'), A('j'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A(195), A('w'), A(227), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A(213), A('e'), A(245), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A(203), A('r'), A(235), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A(197), A('t'), A(229), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A(206), A('y'), A(238), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A(199), A('u'), A(231), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A(219), A('i'), A(251), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A(221), A('o'), A(253), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A(218), A('p'), A(250), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A(200), A('['), A(232), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(223), A(']'), A(255), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), C('M'), CA('M'), C('M') ,C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A(198), A('a'), A(230), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A(217), A('s'), A(249), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A(215), A('d'), A(247), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A(193), A('f'), A(225), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A(208), A('g'), A(240), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A(210), A('h'), A(242), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A(207), A('j'), A(239), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A(204), A('k'), A(236), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A(196), A('l'), A(228), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(214), A(';'), A(246), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A(220), A('\''),A(252), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A(163), A('`'), A(179), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', '\\', A('\\'), '|', C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A(209), A('z'), A(241), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A(222), A('x'), A(254), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A(211), A('c'), A(243), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A(205), A('v'), A(237), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A(201), A('b'), A(233), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A(212), A('n'), A(244), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A(216), A('m'), A(248), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(194), A(','), A(226), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A(192), A('.'), A(224), C('@'),
|
||||
/* 53 - '/' */ '/', '?', '.', A('/'), ',', C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', '*', A('*'), '*', C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', ' ', A(' '), ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, F1, AF1, SF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, F2, AF2, SF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, F3, AF3, SF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, F4, AF4, SF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, F5, AF5, SF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, F6, AF6, SF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, F7, AF7, SF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, F8, AF8, SF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, F9, AF9, SF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, F10, AF10, SF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', HOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', UP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', PGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', NMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', LEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', MID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', RIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', PLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', END, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', DOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', PGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', INSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', 0177, A(0177),'.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), C('M'), CA('M'), C('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', '<', A('|'), '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, F11, AF11, SF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, F12, AF12, SF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A(198), A('a'), A(230), C('A') },
|
||||
K(B) = { L('b'), 'B', A(201), A('b'), A(233), C('B') },
|
||||
K(C) = { L('c'), 'C', A(211), A('c'), A(243), C('C') },
|
||||
K(D) = { L('d'), 'D', A(215), A('d'), A(247), C('D') },
|
||||
K(E) = { L('e'), 'E', A(213), A('e'), A(245), C('E') },
|
||||
K(F) = { L('f'), 'F', A(193), A('f'), A(225), C('F') },
|
||||
K(G) = { L('g'), 'G', A(208), A('g'), A(240), C('G') },
|
||||
K(H) = { L('h'), 'H', A(210), A('h'), A(242), C('H') },
|
||||
K(I) = { L('i'), 'I', A(219), A('i'), A(251), C('I') },
|
||||
K(J) = { L('j'), 'J', A(207), A('j'), A(239), C('J') },
|
||||
K(K) = { L('k'), 'K', A(204), A('k'), A(236), C('K') },
|
||||
K(L) = { L('l'), 'L', A(196), A('l'), A(228), C('L') },
|
||||
K(M) = { L('m'), 'M', A(216), A('m'), A(248), C('M') },
|
||||
K(N) = { L('n'), 'N', A(212), A('n'), A(244), C('N') },
|
||||
K(O) = { L('o'), 'O', A(221), A('o'), A(253), C('O') },
|
||||
K(P) = { L('p'), 'P', A(218), A('p'), A(250), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('J'), A('q'), A('j'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A(203), A('r'), A(235), C('R') },
|
||||
K(S) = { L('s'), 'S', A(217), A('s'), A(249), C('S') },
|
||||
K(T) = { L('t'), 'T', A(197), A('t'), A(229), C('T') },
|
||||
K(U) = { L('u'), 'U', A(199), A('u'), A(231), C('U') },
|
||||
K(V) = { L('v'), 'V', A(205), A('v'), A(237), C('V') },
|
||||
K(W) = { L('w'), 'W', A(195), A('w'), A(227), C('W') },
|
||||
K(X) = { L('x'), 'X', A(222), A('x'), A(254), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A(206), A('y'), A(238), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A(209), A('z'), A(241), C('Z') },
|
||||
K(1) = { '1', '!', '1', A('1'), '!', C('A') },
|
||||
K(2) = { '2', '@', '2', A('2'), '"', C('@') },
|
||||
K(3) = { '3', '#', '3', A('3'), 'N', C('C') },
|
||||
K(4) = { '4', '$', '4', A('4'), ';', C('D') },
|
||||
K(5) = { '5', '%', '5', A('5'), '%', C('E') },
|
||||
K(6) = { '6', '^', '6', A('6'), ':', C('^') },
|
||||
K(7) = { '7', '&', '7', A('7'), '?', C('G') },
|
||||
K(8) = { '8', '*', '8', A('8'), '*', C('H') },
|
||||
K(9) = { '9', '(', '9', A('9'), '(', C('I') },
|
||||
K(0) = { '0', ')', '0', A('0'), ')', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), C('M'), CA('M'),C('M') ,C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), C('H'), CA('H'),C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), C('I'), CA('I'),C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', ' ', A(' '), ' ', C('@') },
|
||||
K(DASH) = { '-', '_', '-', A('-'), '_', C('_') },
|
||||
K(EQUAL) = { '=', '+', '=', A('='), '+', C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A(200), A('['), A(232), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(223), A(']'), A(255), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', '\\', A('\\'),'|', C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(214), A(';'), A(246), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A(220), A('\''),A(252), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A(163), A('`'), A(179), C('@') },
|
||||
K(COMMA) = { ',', '<', A(194), A(','), A(226), C('@') },
|
||||
K(PERIOD) = { '.', '>', A(192), A('.'), A(224), C('@') },
|
||||
K(SLASH) = { '/', '?', '.', A('/'), ',', C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, F1, AF1, SF1, CF1 },
|
||||
K(F2) = { F2, SF2, F2, AF2, SF2, CF2 },
|
||||
K(F3) = { F3, SF3, F3, AF3, SF3, CF3 },
|
||||
K(F4) = { F4, SF4, F4, AF4, SF4, CF4 },
|
||||
K(F5) = { F5, SF5, F5, AF5, SF5, CF5 },
|
||||
K(F6) = { F6, SF6, F6, AF6, SF6, CF6 },
|
||||
K(F7) = { F7, SF7, F7, AF7, SF7, CF7 },
|
||||
K(F8) = { F8, SF8, F8, AF8, SF8, CF8 },
|
||||
K(F9) = { F9, SF9, F9, AF9, SF9, CF9 },
|
||||
K(F10) = { F10, SF10, F10, AF10, SF10, CF10 },
|
||||
K(F11) = { F11, SF11, F11, AF11, SF11, CF11 },
|
||||
K(F12) = { F12, SF12, F12, AF12, SF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, INSRT, AINSRT, INSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, HOME, AHOME, HOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, PGUP, APGUP, PGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, DEL, A(DEL), DEL, DEL },
|
||||
K(END) = { END, END, END, AEND, END, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, PGDN, APGDN, PGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, RIGHT, ARIGHT, RIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, LEFT, ALEFT, LEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, DOWN, ADOWN, DOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, UP, AUP, UP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', '.', A('/'), '.', C('@') },
|
||||
K(KP_STAR) = { '*', '*', '*', A('*'), '*', C('@') },
|
||||
K(KP_DASH) = { '-', '-', '-', AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', '+', APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), C('M'), CA('M'),C('M'), C('J') },
|
||||
K(KP_1) = { NEND, '1', END, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', DOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', PGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', LEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', MID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', RIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', HOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', UP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', PGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', INSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', DEL, A(DEL), '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', '<', A('|'), '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), C('M'), CA('M'),C('M') ,C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), C('M'), CA('M'),C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -5,131 +5,107 @@
|
|||
|
||||
/* scan-code unsh Shift Alt AltGr Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),C('['), C('['), C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), '1', '!', C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), '@', '@', C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), 156, '#', C('C'),
|
||||
/* 05 - '4' */ '4', ' ', A('4'), '$', '$', C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), '5', '%', C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), '6', '^', C('^'),
|
||||
/* 08 - '7' */ '7', '/', A('7'), '{', '&', C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), '[', '*', C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), ']', '(', C('I'),
|
||||
/* 11 - '0' */ '0', '=', A('0'), '}', ')', C('@'),
|
||||
/* 12 - '_' */ '+', '?', 0341, '\\', '_', C('_'),
|
||||
/* 13 - '=' */ '\'', '`', A('\''),'=', '+', C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),C('H'), C('H'), 0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),C('I'), C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), '@', 'Q', C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), 'w', 'W', C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), 'e', 'E', C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), 'r', 'R', C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), 't', 'T', C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), 'y', 'Y', C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), 'u', 'U', C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), 'i', 'I', C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), 'o', 'O', C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), 'p', 'P', C('P'),
|
||||
/* 26 - '[' */ L(134), 143, 0201, '[', '{', C('['),
|
||||
/* 27 - ']' */ '\"', '^', A('+'), '~', ']', C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), 'a', 'A', C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), 's', 'S', C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), 'd', 'D', C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), 'f', 'F', C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), 'g', 'G', C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), 'h', 'H', C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), 'j', 'J', C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), 'k', 'K', C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), 'l', 'L', C('L'),
|
||||
/* 39 - ';' */ L(0224),0231, 0224, ';', ':', C('@'),
|
||||
/* 40 - '\'' */ L(0204),0216, 0204, '\'', '"', C('@'),
|
||||
/* 41 - '`' */ L(21), 171, A('^'), '`', '~', C('^'),
|
||||
/* 42 - SHIFT */ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ 39, '*', A('#'), '\\', '|', C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), 'z', 'Z', C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), 'x', 'X', C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), 'c', 'C', C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), 'v', 'V', C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), 'b', 'B', C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), 'n', 'N', C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), 0346, 'M', C('M'),
|
||||
/* 51 - ',' */ ',', ';', A(','), ',', '<', C('@'),
|
||||
/* 52 - '.' */ '.', ':', A('.'), '.', '>', C('@'),
|
||||
/* 53 - '/' */ '-', '_', A('-'), '/', '?', C('_'),
|
||||
/* 54 - SHIFT */ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), '*', '*', C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), ' ', ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),0177, '.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), '|', '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), 'a', 'A', C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), 'b', 'B', C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), 'c', 'C', C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), 'd', 'D', C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), 'e', 'E', C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), 'f', 'F', C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), 'g', 'G', C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), 'h', 'H', C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), 'i', 'I', C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), 'j', 'J', C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), 'k', 'K', C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), 'l', 'L', C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), 0346, 'M', C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), 'n', 'N', C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), 'o', 'O', C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), 'p', 'P', C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), '@', 'Q', C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), 'r', 'R', C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), 's', 'S', C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), 't', 'T', C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), 'u', 'U', C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), 'v', 'V', C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), 'w', 'W', C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), 'x', 'X', C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), 'y', 'Y', C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), 'z', 'Z', C('Z') },
|
||||
K(1) = { '1', '!', A('1'), '1', '!', C('A') },
|
||||
K(2) = { '2', '"', A('2'), '@', '@', C('@') },
|
||||
K(3) = { '3', '#', A('3'), 156, '#', C('C') },
|
||||
K(4) = { '4', ' ', A('4'), '$', '$', C('D') },
|
||||
K(5) = { '5', '%', A('5'), '5', '%', C('E') },
|
||||
K(6) = { '6', '&', A('6'), '6', '^', C('^') },
|
||||
K(7) = { '7', '/', A('7'), '{', '&', C('G') },
|
||||
K(8) = { '8', '(', A('8'), '[', '*', C('H') },
|
||||
K(9) = { '9', ')', A('9'), ']', '(', C('I') },
|
||||
K(0) = { '0', '=', A('0'), '}', ')', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),C('['), C('['), C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),C('H'), C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),C('I'), C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), ' ', ' ', C('@') },
|
||||
K(DASH) = { '+', '?', 0341, '\\', '_', C('_') },
|
||||
K(EQUAL) = { '\'', '`', A('\''),'=', '+', C('@') },
|
||||
K(OPEN_BRACKET) = { L(134), 143, 0201, '[', '{', C('[') },
|
||||
K(CLOSE_BRACKET) = { '\"', '^', A('+'), '~', ']', C(']') },
|
||||
K(BACKSLASH) = { 39, '*', A('#'), '\\', '|', C('\\') },
|
||||
K(SEMICOLON) = { L(0224),0231, 0224, ';', ':', C('@') },
|
||||
K(APOSTROPH) = { L(0204),0216, 0204, '\'', '"', C('@') },
|
||||
K(GRAVE_ACCENT) = { L(21), 171, A('^'), '`', '~', C('^') },
|
||||
K(COMMA) = { ',', ';', A(','), ',', '<', C('@') },
|
||||
K(PERIOD) = { '.', ':', A('.'), '.', '>', C('@') },
|
||||
K(SLASH) = { '-', '_', A('-'), '/', '?', C('_') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), DEL, A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '-', '-', A('-'), '/', A('-'), C('_') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), '*', '*', C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),C('M'), CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), DEL, '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), '|', '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -2,134 +2,108 @@
|
|||
/* Modified by Javier Garcia Martin jawa@inf.deusto.es */
|
||||
|
||||
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
|
||||
/*
|
||||
====================================================================
|
||||
*/
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),C('['), C('['), C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), '|', '!', C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), '@', '"', C('@'),
|
||||
/* 04 - '3' */ '3', 0372, A('3'), '#', 0372, C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), '~', '$', C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), 0317, '%', C('E'),
|
||||
/* 07 - '6' */ '6', '&', A('6'), 0252, '&', C('^'),
|
||||
/* 08 - '7' */ '7', '/', A('7'), '{', '/', C('G'),
|
||||
/* 09 - '8' */ '8', '(', A('8'), '(', '(', C('H'),
|
||||
/* 10 - '9' */ '9', ')', A('9'), ')', ')', C('I'),
|
||||
/* 11 - '0' */ '0', '=', A('0'), '=', '=', C('_'),
|
||||
/* 12 - '-' */ '\'', '?', A('\''),'?', '?', C('^'),
|
||||
/* 13 - '=' */ 0255, 0250, A(0255),0250, 0250, C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),C('H'), C('H'), 0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),C('I'), C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), 'q', 'Q', C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), 'w', 'W', C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), 'e', 'E', C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), 'r', 'R', C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), 't', 'T', C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), 'y', 'Y', C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), 'u', 'U', C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), 'i', 'I', C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), 'o', 'O', C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), 'p', 'P', C('P'),
|
||||
/* 26 - '[' */ '`', '^', A('`'),'[', '^', C('['),
|
||||
/* 27 - ']' */ '+', '*', A('+'), ']', '*', C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), 'a', 'A', C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), 's', 'S', C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), 'd', 'D', C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), 'f', 'F', C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), 'g', 'G', C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), 'h', 'H', C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), 'j', 'J', C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), 'k', 'K', C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), 'l', 'L', C('L'),
|
||||
/* 39 - ';' */ L(0244),0245, A(0244),0244, 0245, C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A('\''),'{', '"', C('['),
|
||||
/* 41 - '`' */ 0247, 0246, A(0247),'\\', 0246, C('\\'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ L(0207),0200, A(0207),'}', 0200, C(']'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), 'z', 'Z', C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), 'x', 'X', C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), 'c', 'C', C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), 'v', 'V', C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), 'b', 'B', C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), 'n', 'N', C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), 'm', 'M', C('M'),
|
||||
/* 51 - ',' */ ',', ';', A(','), ',', ';', C('@'),
|
||||
/* 52 - '.' */ '.', ':', A('.'), '.', ':', C('@'),
|
||||
/* 53 - '/' */ '-', '_', A('-'), '-', '_', C('_'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), '*', '*', C('M'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), ' ', ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, C('S'),
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, C('C'),
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),0177, '.', 0177,
|
||||
/* 84 - Enter? SysRq?*/ C('M'), C('M'), CA('M'),C('M'), C('M'), C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), '<', '>', C('\\'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
/* ==================================================================== */
|
||||
K(A) = { L('a'), 'A', A('a'), 'a', 'A', C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), 'b', 'B', C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), 'c', 'C', C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), 'd', 'D', C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), 'e', 'E', C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), 'f', 'F', C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), 'g', 'G', C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), 'h', 'H', C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), 'i', 'I', C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), 'j', 'J', C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), 'k', 'K', C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), 'l', 'L', C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), 'm', 'M', C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), 'n', 'N', C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), 'o', 'O', C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), 'p', 'P', C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), 'q', 'Q', C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), 'r', 'R', C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), 's', 'S', C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), 't', 'T', C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), 'u', 'U', C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), 'v', 'V', C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), 'w', 'W', C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), 'x', 'X', C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), 'y', 'Y', C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), 'z', 'Z', C('Z') },
|
||||
K(1) = { '1', '!', A('1'), '|', '!', C('A') },
|
||||
K(2) = { '2', '"', A('2'), '@', '"', C('@') },
|
||||
K(3) = { '3', 0372, A('3'), '#', 0372, C('C') },
|
||||
K(4) = { '4', '$', A('4'), '~', '$', C('D') },
|
||||
K(5) = { '5', '%', A('5'), 0317, '%', C('E') },
|
||||
K(6) = { '6', '&', A('6'), 0252, '&', C('^') },
|
||||
K(7) = { '7', '/', A('7'), '{', '/', C('G') },
|
||||
K(8) = { '8', '(', A('8'), '(', '(', C('H') },
|
||||
K(9) = { '9', ')', A('9'), ')', ')', C('I') },
|
||||
K(0) = { '0', '=', A('0'), '=', '=', C('_') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),C('['), C('['), C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),C('H'), C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),C('I'), C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), ' ', ' ', C('@') },
|
||||
K(DASH) = { '\'', '?', A('\''),'?', '?', C('^') },
|
||||
K(EQUAL) = { 0255, 0250, A(0255),0250, 0250, C('@') },
|
||||
K(OPEN_BRACKET) = { '`', '^', A('`'), '[', '^', C('[') },
|
||||
K(CLOSE_BRACKET) = { '+', '*', A('+'), ']', '*', C(']') },
|
||||
K(BACKSLASH) = { L(0207),0200, A(0207),'}', 0200, C(']') },
|
||||
K(SEMICOLON) = { L(0244),0245, A(0244),0244, 0245, C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A('\''),'{', '"', C('[') },
|
||||
K(GRAVE_ACCENT) = { 0247, 0246, A(0247),'\\', 0246, C('\\') },
|
||||
K(COMMA) = { ',', ';', A(','), ',', ';', C('@') },
|
||||
K(PERIOD) = { '.', ':', A('.'), '.', ':', C('@') },
|
||||
K(SLASH) = { '-', '_', A('-'), '-', '_', C('_') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, C('C') },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), DEL, A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, C('S') },
|
||||
K(KP_SLASH) = { '-', '-', A('-'), '-', A('-'), C('_') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), '*', '*', C('M') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),C('M'), CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), DEL, '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), '<', '>', C('\\') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),C('M'), C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -2,131 +2,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '"', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', 156, A('3'), A('3'), A(156), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(';'), A(';'), A(':'), C('@'),
|
||||
/* 40 - '\'' */ '\'', '@', A('\''),A('\''),A('"'), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '#' */ '#', '~', A('#'), A('#'), A('~'), C('#'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '\\', '|', A('\\'),A('|'), A('|'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '"', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', 156, A('3'), A('3'), A(156), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(EQUAL) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A('['), A('['), A('{'), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(']'), A(']'), A('}'), C(']') },
|
||||
K(BACKSLASH) = { '#', '~', A('#'), A('#'), A('~'), C('#') },
|
||||
K(SEMICOLON) = { ';', ':', A(';'), A(';'), A(':'), C('@') },
|
||||
K(APOSTROPH) = { '\'', '@', A('\''),A('\''),A('"'), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A('`'), A('`'), A('~'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(PERIOD) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(SLASH) = { '/', '?', A('/'), A('/'), A('?'), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', A('/'), A('/'), A('/'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '\\', '|', A('\\'),A('|'), A('|'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -6,131 +6,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', '1', A('1'), '!', C('A'),
|
||||
/* 03 - '2' */ '2', '@', '2', A('2'), '"', C('@'),
|
||||
/* 04 - '3' */ '3', '#', '3', A('3'), 'N', C('C'),
|
||||
/* 05 - '4' */ '4', '$', '4', A('4'), ';', C('D'),
|
||||
/* 06 - '5' */ '5', '%', '5', A('5'), '%', C('E'),
|
||||
/* 07 - '6' */ '6', '^', '6', A('6'), ':', C('^'),
|
||||
/* 08 - '7' */ '7', '&', '7', A('7'), '?', C('G'),
|
||||
/* 09 - '8' */ '8', '*', '8', A('8'), '*', C('H'),
|
||||
/* 10 - '9' */ '9', '(', '9', A('9'), '(', C('I'),
|
||||
/* 11 - '0' */ '0', ')', '0', A('0'), ')', C('@'),
|
||||
/* 12 - '-' */ '-', '_', '-', A('-'), '_', C('_'),
|
||||
/* 13 - '=' */ '=', '+', '=', A('='), '+', C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), C('H'), CA('H'), C('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), C('I'), CA('I'),C('I'), C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('J'), A('q'), A('j'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A(195), A('w'), A(227), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A(213), A('e'), A(245), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A(203), A('r'), A(235), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A(197), A('t'), A(229), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A(206), A('y'), A(238), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A(199), A('u'), A(231), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A(219), A('i'), A(251), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A(221), A('o'), A(253), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A(218), A('p'), A(250), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A(200), A('['), A(232), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(167), A(']'), A(183), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), C('M'), CA('M'), C('M') ,C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A(198), A('a'), A(230), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A(166), A('s'), A(182), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A(215), A('d'), A(247), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A(193), A('f'), A(225), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A(208), A('g'), A(240), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A(210), A('h'), A(242), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A(207), A('j'), A(239), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A(204), A('k'), A(236), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A(196), A('l'), A(228), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(214), A(';'), A(246), C('@'),
|
||||
/* 40 - '\'' */ '\'','"', A(164), A('\''),A(180), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A(163), A('`'), A(179), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', '\\', A('\\'), '|', C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A(209), A('z'), A(241), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A(222), A('x'), A(254), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A(211), A('c'), A(243), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A(205), A('v'), A(237), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A(201), A('b'), A(233), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A(212), A('n'), A(244), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A(216), A('m'), A(248), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(194), A(','), A(226), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A(192), A('.'), A(224), C('@'),
|
||||
/* 53 - '/' */ '/', '?', '.', A('/'), ',', C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', '*', A('*'), '*', C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', ' ', A(' '), ' ', C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, F1, AF1, SF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, F2, AF2, SF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, F3, AF3, SF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, F4, AF4, SF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, F5, AF5, SF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, F6, AF6, SF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, F7, AF7, SF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, F8, AF8, SF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, F9, AF9, SF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, F10, AF10, SF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', HOME, AHOME, '7', CHOME,
|
||||
/* 72 - CurUp */ UP, '8', UP, AUP, '8', CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', PGUP, APGUP, '9', CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', NMIN, ANMIN, '-', CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', LEFT, ALEFT, '4', CLEFT,
|
||||
/* 76 - MID */ MID, '5', MID, AMID, '5', CMID,
|
||||
/* 77 - Right */ RIGHT, '6', RIGHT, ARIGHT, '6', CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', PLUS, APLUS, '+', CPLUS,
|
||||
/* 79 - End */ END, '1', END, AEND, '1', CEND,
|
||||
/* 80 - Down */ DOWN, '2', DOWN, ADOWN, '2', CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', PGDN, APGDN, '3', CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', INSRT, AINSRT, '0', CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', 0177, A(0177),'.', 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), C('M'), CA('M'), C('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', '<', A('|'), '>', C('@'),
|
||||
/* 87 - F11 */ F11, SF11, F11, AF11, SF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, F12, AF12, SF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A(198), A('a'), A(230), C('A') },
|
||||
K(B) = { L('b'), 'B', A(201), A('b'), A(233), C('B') },
|
||||
K(C) = { L('c'), 'C', A(211), A('c'), A(243), C('C') },
|
||||
K(D) = { L('d'), 'D', A(215), A('d'), A(247), C('D') },
|
||||
K(E) = { L('e'), 'E', A(213), A('e'), A(245), C('E') },
|
||||
K(F) = { L('f'), 'F', A(193), A('f'), A(225), C('F') },
|
||||
K(G) = { L('g'), 'G', A(208), A('g'), A(240), C('G') },
|
||||
K(H) = { L('h'), 'H', A(210), A('h'), A(242), C('H') },
|
||||
K(I) = { L('i'), 'I', A(219), A('i'), A(251), C('I') },
|
||||
K(J) = { L('j'), 'J', A(207), A('j'), A(239), C('J') },
|
||||
K(K) = { L('k'), 'K', A(204), A('k'), A(236), C('K') },
|
||||
K(L) = { L('l'), 'L', A(196), A('l'), A(228), C('L') },
|
||||
K(M) = { L('m'), 'M', A(216), A('m'), A(248), C('M') },
|
||||
K(N) = { L('n'), 'N', A(212), A('n'), A(244), C('N') },
|
||||
K(O) = { L('o'), 'O', A(221), A('o'), A(253), C('O') },
|
||||
K(P) = { L('p'), 'P', A(218), A('p'), A(250), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('J'), A('q'), A('j'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A(203), A('r'), A(235), C('R') },
|
||||
K(S) = { L('s'), 'S', A(166), A('s'), A(182), C('S') },
|
||||
K(T) = { L('t'), 'T', A(197), A('t'), A(229), C('T') },
|
||||
K(U) = { L('u'), 'U', A(199), A('u'), A(231), C('U') },
|
||||
K(V) = { L('v'), 'V', A(205), A('v'), A(237), C('V') },
|
||||
K(W) = { L('w'), 'W', A(195), A('w'), A(227), C('W') },
|
||||
K(X) = { L('x'), 'X', A(222), A('x'), A(254), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A(206), A('y'), A(238), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A(209), A('z'), A(241), C('Z') },
|
||||
K(1) = { '1', '!', '1', A('1'), '!', C('A') },
|
||||
K(2) = { '2', '@', '2', A('2'), '"', C('@') },
|
||||
K(3) = { '3', '#', '3', A('3'), 'N', C('C') },
|
||||
K(4) = { '4', '$', '4', A('4'), ';', C('D') },
|
||||
K(5) = { '5', '%', '5', A('5'), '%', C('E') },
|
||||
K(6) = { '6', '^', '6', A('6'), ':', C('^') },
|
||||
K(7) = { '7', '&', '7', A('7'), '?', C('G') },
|
||||
K(8) = { '8', '*', '8', A('8'), '*', C('H') },
|
||||
K(9) = { '9', '(', '9', A('9'), '(', C('I') },
|
||||
K(0) = { '0', ')', '0', A('0'), ')', C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), C('M'), CA('M'),C('M') ,C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), C('H'), CA('H'),C('H'), DEL },
|
||||
K(TAB) = { C('I'), C('I'), C('I'), CA('I'),C('I'), C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', ' ', A(' '), ' ', C('@') },
|
||||
K(DASH) = { '-', '_', '-', A('-'), '_', C('_') },
|
||||
K(EQUAL) = { '=', '+', '=', A('='), '+', C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A(200), A('['), A(232), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(167), A(']'), A(183), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', '\\', A('\\'),'|', C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(214), A(';'), A(246), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A(164), A('\''),A(180), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A(163), A('`'), A(179), C('@') },
|
||||
K(COMMA) = { ',', '<', A(194), A(','), A(226), C('@') },
|
||||
K(PERIOD) = { '.', '>', A(192), A('.'), A(224), C('@') },
|
||||
K(SLASH) = { '/', '?', '.', A('/'), ',', C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, F1, AF1, SF1, CF1 },
|
||||
K(F2) = { F2, SF2, F2, AF2, SF2, CF2 },
|
||||
K(F3) = { F3, SF3, F3, AF3, SF3, CF3 },
|
||||
K(F4) = { F4, SF4, F4, AF4, SF4, CF4 },
|
||||
K(F5) = { F5, SF5, F5, AF5, SF5, CF5 },
|
||||
K(F6) = { F6, SF6, F6, AF6, SF6, CF6 },
|
||||
K(F7) = { F7, SF7, F7, AF7, SF7, CF7 },
|
||||
K(F8) = { F8, SF8, F8, AF8, SF8, CF8 },
|
||||
K(F9) = { F9, SF9, F9, AF9, SF9, CF9 },
|
||||
K(F10) = { F10, SF10, F10, AF10, SF10, CF10 },
|
||||
K(F11) = { F11, SF11, F11, AF11, SF11, CF11 },
|
||||
K(F12) = { F12, SF12, F12, AF12, SF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, INSRT, AINSRT, INSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, HOME, AHOME, HOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, PGUP, APGUP, PGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, DEL, A(DEL), DEL, DEL },
|
||||
K(END) = { END, END, END, AEND, END, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, PGDN, APGDN, PGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, RIGHT, ARIGHT, RIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, LEFT, ALEFT, LEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, DOWN, ADOWN, DOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, UP, AUP, UP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', '.', A('/'), '.', C('@') },
|
||||
K(KP_STAR) = { '*', '*', '*', A('*'), '*', C('@') },
|
||||
K(KP_DASH) = { '-', '-', '-', AMIN, '-', CMIN },
|
||||
K(KP_PLUS) = { '+', '+', '+', APLUS, '+', CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), C('M'), CA('M'),C('M'), C('J') },
|
||||
K(KP_1) = { NEND, '1', END, AEND, '1', CEND },
|
||||
K(KP_2) = { NDOWN, '2', DOWN, ADOWN, '2', CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', PGDN, APGDN, '3', CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', LEFT, ALEFT, '4', CLEFT },
|
||||
K(KP_5) = { NMID, '5', MID, AMID, '5', CMID },
|
||||
K(KP_6) = { NRIGHT, '6', RIGHT, ARIGHT, '6', CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', HOME, AHOME, '7', CHOME },
|
||||
K(KP_8) = { NUP, '8', UP, AUP, '8', CUP },
|
||||
K(KP_9) = { NPGUP, '9', PGUP, APGUP, '9', CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', INSRT, AINSRT, '0', CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', DEL, A(DEL), '.', DEL },
|
||||
K(EUROPE_2) = { '<', '>', '<', A('|'), '>', C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), C('M'), CA('M'),C('M') ,C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), C('M'), CA('M'),C('M'), C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
/* Keymap for US MF-2 keyboard. */
|
||||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ 0, 0, 0, 0, 0, 0,
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(';'), A(';'), A(':'), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A('\''),A('\''),A('"'), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ 0, 0, 0, 0, 0, 0,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ 0, 0, 0, 0, 0, C('S'),
|
||||
/* 70 - ScrLock */ 0, 0, 0, 0, 0, C('C'),
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('|'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - LGUI */ LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT,
|
||||
/* 92 - RGUI */ RIGHT, '>', ARIGHT, ARIGHT, A('>'), ARIGHT,
|
||||
/* 93 - MENU */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 94 - Power */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - Sleep */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - Make */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - SRCH */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - FAV */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - STOP */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - FWD */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - BACK */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - MyComp */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - MAIL */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
|
@ -2,131 +2,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(';'), A(';'), A(':'), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A('\''),A('\''),A('"'), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('|'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '@', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(EQUAL) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A('['), A('['), A('{'), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(']'), A(']'), A('}'), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', A('\\'),A('\\'),A('|'), C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(';'), A(';'), A(':'), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A('\''),A('\''),A('"'), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A('`'), A('`'), A('~'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(PERIOD) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(SLASH) = { '/', '?', A('/'), A('/'), A('?'), C('@') },
|
||||
K(CAPS_LOCK) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', A('/'), A('/'), A('/'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), A('|'), A('>'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -2,131 +2,107 @@
|
|||
|
||||
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
|
||||
/* ==================================================================== */
|
||||
/* 00 - none */ 0, 0, 0, 0, 0, 0,
|
||||
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
|
||||
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
|
||||
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
|
||||
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
|
||||
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
|
||||
/* 06 - '5' */ '5', '%', A('5'), A('5'), A('%'), C('E'),
|
||||
/* 07 - '6' */ '6', '^', A('6'), A('6'), A('^'), C('^'),
|
||||
/* 08 - '7' */ '7', '&', A('7'), A('7'), A('&'), C('G'),
|
||||
/* 09 - '8' */ '8', '*', A('8'), A('8'), A('*'), C('H'),
|
||||
/* 10 - '9' */ '9', '(', A('9'), A('9'), A('('), C('I'),
|
||||
/* 11 - '0' */ '0', ')', A('0'), A('0'), A(')'), C('@'),
|
||||
/* 12 - '-' */ '-', '_', A('-'), A('-'), A('_'), C('_'),
|
||||
/* 13 - '=' */ '=', '+', A('='), A('='), A('+'), C('@'),
|
||||
/* 14 - BS */ C('H'), C('H'), CA('H'),CA('H'),CA('H'),0177,
|
||||
/* 15 - TAB */ C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I'),
|
||||
/* 16 - 'q' */ L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q'),
|
||||
/* 17 - 'w' */ L('w'), 'W', A('w'), A('w'), A('W'), C('W'),
|
||||
/* 18 - 'e' */ L('e'), 'E', A('e'), A('e'), A('E'), C('E'),
|
||||
/* 19 - 'r' */ L('r'), 'R', A('r'), A('r'), A('R'), C('R'),
|
||||
/* 20 - 't' */ L('t'), 'T', A('t'), A('t'), A('T'), C('T'),
|
||||
/* 21 - 'y' */ L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y'),
|
||||
/* 22 - 'u' */ L('u'), 'U', A('u'), A('u'), A('U'), C('U'),
|
||||
/* 23 - 'i' */ L('i'), 'I', A('i'), A('i'), A('I'), C('I'),
|
||||
/* 24 - 'o' */ L('o'), 'O', A('o'), A('o'), A('O'), C('O'),
|
||||
/* 25 - 'p' */ L('p'), 'P', A('p'), A('p'), A('P'), C('P'),
|
||||
/* 26 - '[' */ '[', '{', A('['), A('['), A('{'), C('['),
|
||||
/* 27 - ']' */ ']', '}', A(']'), A(']'), A('}'), C(']'),
|
||||
/* 28 - CR/LF */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 29 - Ctrl */ CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK,
|
||||
/* 30 - 'a' */ L('a'), 'A', A('a'), A('a'), A('A'), C('A'),
|
||||
/* 31 - 's' */ L('s'), 'S', A('s'), A('s'), A('S'), C('S'),
|
||||
/* 32 - 'd' */ L('d'), 'D', A('d'), A('d'), A('D'), C('D'),
|
||||
/* 33 - 'f' */ L('f'), 'F', A('f'), A('f'), A('F'), C('F'),
|
||||
/* 34 - 'g' */ L('g'), 'G', A('g'), A('g'), A('G'), C('G'),
|
||||
/* 35 - 'h' */ L('h'), 'H', A('h'), A('h'), A('H'), C('H'),
|
||||
/* 36 - 'j' */ L('j'), 'J', A('j'), A('j'), A('J'), C('J'),
|
||||
/* 37 - 'k' */ L('k'), 'K', A('k'), A('k'), A('K'), C('K'),
|
||||
/* 38 - 'l' */ L('l'), 'L', A('l'), A('l'), A('L'), C('L'),
|
||||
/* 39 - ';' */ ';', ':', A(';'), A(';'), A(':'), C('@'),
|
||||
/* 40 - '\'' */ '\'', '"', A('\''),A('\''),A('"'), C('@'),
|
||||
/* 41 - '`' */ '`', '~', A('`'), A('`'), A('~'), C('@'),
|
||||
/* 42 - l. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 43 - '\\' */ '\\', '|', A('\\'),A('\\'),A('|'), C('\\'),
|
||||
/* 44 - 'z' */ L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z'),
|
||||
/* 45 - 'x' */ L('x'), 'X', A('x'), A('x'), A('X'), C('X'),
|
||||
/* 46 - 'c' */ L('c'), 'C', A('c'), A('c'), A('C'), C('C'),
|
||||
/* 47 - 'v' */ L('v'), 'V', A('v'), A('v'), A('V'), C('V'),
|
||||
/* 48 - 'b' */ L('b'), 'B', A('b'), A('b'), A('B'), C('B'),
|
||||
/* 49 - 'n' */ L('n'), 'N', A('n'), A('n'), A('N'), C('N'),
|
||||
/* 50 - 'm' */ L('m'), 'M', A('m'), A('m'), A('M'), C('M'),
|
||||
/* 51 - ',' */ ',', '<', A(','), A(','), A('<'), C('@'),
|
||||
/* 52 - '.' */ '.', '>', A('.'), A('.'), A('>'), C('@'),
|
||||
/* 53 - '/' */ '/', '?', A('/'), A('/'), A('?'), C('@'),
|
||||
/* 54 - r. SHIFT*/ SHIFT, SHIFT, SHIFT, SHIFT, SHIFT, SHIFT,
|
||||
/* 55 - '*' */ '*', '*', A('*'), A('*'), A('*'), C('@'),
|
||||
/* 56 - ALT */ ALT, ALT, ALT, ALT, ALT, ALT,
|
||||
/* 57 - ' ' */ ' ', ' ', A(' '), A(' '), A(' '), C('@'),
|
||||
/* 58 - CapsLck */ CTRL, CTRL, CTRL, CTRL, CTRL, CTRL,
|
||||
/* 59 - F1 */ F1, SF1, AF1, AF1, ASF1, CF1,
|
||||
/* 60 - F2 */ F2, SF2, AF2, AF2, ASF2, CF2,
|
||||
/* 61 - F3 */ F3, SF3, AF3, AF3, ASF3, CF3,
|
||||
/* 62 - F4 */ F4, SF4, AF4, AF4, ASF4, CF4,
|
||||
/* 63 - F5 */ F5, SF5, AF5, AF5, ASF5, CF5,
|
||||
/* 64 - F6 */ F6, SF6, AF6, AF6, ASF6, CF6,
|
||||
/* 65 - F7 */ F7, SF7, AF7, AF7, ASF7, CF7,
|
||||
/* 66 - F8 */ F8, SF8, AF8, AF8, ASF8, CF8,
|
||||
/* 67 - F9 */ F9, SF9, AF9, AF9, ASF9, CF9,
|
||||
/* 68 - F10 */ F10, SF10, AF10, AF10, ASF10, CF10,
|
||||
/* 69 - NumLock */ NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK,
|
||||
/* 70 - ScrLock */ SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK,
|
||||
/* 71 - Home */ HOME, '7', AHOME, AHOME, A('7'), CHOME,
|
||||
/* 72 - CurUp */ UP, '8', AUP, AUP, A('8'), CUP,
|
||||
/* 73 - PgUp */ PGUP, '9', APGUP, APGUP, A('9'), CPGUP,
|
||||
/* 74 - '-' */ NMIN, '-', ANMIN, ANMIN, A('-'), CNMIN,
|
||||
/* 75 - Left */ LEFT, '4', ALEFT, ALEFT, A('4'), CLEFT,
|
||||
/* 76 - MID */ MID, '5', AMID, AMID, A('5'), CMID,
|
||||
/* 77 - Right */ RIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT,
|
||||
/* 78 - '+' */ PLUS, '+', APLUS, APLUS, A('+'), CPLUS,
|
||||
/* 79 - End */ END, '1', AEND, AEND, A('1'), CEND,
|
||||
/* 80 - Down */ DOWN, '2', ADOWN, ADOWN, A('2'), CDOWN,
|
||||
/* 81 - PgDown */ PGDN, '3', APGDN, APGDN, A('3'), CPGDN,
|
||||
/* 82 - Insert */ INSRT, '0', AINSRT, AINSRT, A('0'), CINSRT,
|
||||
/* 83 - Delete */ 0177, '.', A(0177),A(0177),A('.'), 0177,
|
||||
/* 84 - Enter */ C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J'),
|
||||
/* 85 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 86 - ??? */ '<', '>', A('<'), A('|'), A('>'), C('@'),
|
||||
/* 87 - F11 */ F11, SF11, AF11, AF11, ASF11, CF11,
|
||||
/* 88 - F12 */ F12, SF12, AF12, AF12, ASF12, CF12,
|
||||
/* 89 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 90 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 91 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 92 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 93 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 94 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 95 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 96 - EXT_KEY */ EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY, EXTKEY,
|
||||
/* 97 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 98 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/* 99 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*100 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*101 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*102 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*103 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*104 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*105 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*106 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*107 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*108 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*109 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*110 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*111 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*112 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*113 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*114 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*115 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*116 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*117 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*118 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*119 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*120 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*121 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*122 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*123 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*124 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
|
||||
/*127 - ??? */ 0, 0, 0, 0, 0, 0
|
||||
K(A) = { L('a'), 'A', A('a'), A('a'), A('A'), C('A') },
|
||||
K(B) = { L('b'), 'B', A('b'), A('b'), A('B'), C('B') },
|
||||
K(C) = { L('c'), 'C', A('c'), A('c'), A('C'), C('C') },
|
||||
K(D) = { L('d'), 'D', A('d'), A('d'), A('D'), C('D') },
|
||||
K(E) = { L('e'), 'E', A('e'), A('e'), A('E'), C('E') },
|
||||
K(F) = { L('f'), 'F', A('f'), A('f'), A('F'), C('F') },
|
||||
K(G) = { L('g'), 'G', A('g'), A('g'), A('G'), C('G') },
|
||||
K(H) = { L('h'), 'H', A('h'), A('h'), A('H'), C('H') },
|
||||
K(I) = { L('i'), 'I', A('i'), A('i'), A('I'), C('I') },
|
||||
K(J) = { L('j'), 'J', A('j'), A('j'), A('J'), C('J') },
|
||||
K(K) = { L('k'), 'K', A('k'), A('k'), A('K'), C('K') },
|
||||
K(L) = { L('l'), 'L', A('l'), A('l'), A('L'), C('L') },
|
||||
K(M) = { L('m'), 'M', A('m'), A('m'), A('M'), C('M') },
|
||||
K(N) = { L('n'), 'N', A('n'), A('n'), A('N'), C('N') },
|
||||
K(O) = { L('o'), 'O', A('o'), A('o'), A('O'), C('O') },
|
||||
K(P) = { L('p'), 'P', A('p'), A('p'), A('P'), C('P') },
|
||||
K(Q) = { L('q'), 'Q', A('q'), A('q'), A('Q'), C('Q') },
|
||||
K(R) = { L('r'), 'R', A('r'), A('r'), A('R'), C('R') },
|
||||
K(S) = { L('s'), 'S', A('s'), A('s'), A('S'), C('S') },
|
||||
K(T) = { L('t'), 'T', A('t'), A('t'), A('T'), C('T') },
|
||||
K(U) = { L('u'), 'U', A('u'), A('u'), A('U'), C('U') },
|
||||
K(V) = { L('v'), 'V', A('v'), A('v'), A('V'), C('V') },
|
||||
K(W) = { L('w'), 'W', A('w'), A('w'), A('W'), C('W') },
|
||||
K(X) = { L('x'), 'X', A('x'), A('x'), A('X'), C('X') },
|
||||
K(Y) = { L('y'), 'Y', A('y'), A('y'), A('Y'), C('Y') },
|
||||
K(Z) = { L('z'), 'Z', A('z'), A('z'), A('Z'), C('Z') },
|
||||
K(1) = { '1', '!', A('1'), A('1'), A('!'), C('A') },
|
||||
K(2) = { '2', '@', A('2'), A('2'), A('@'), C('@') },
|
||||
K(3) = { '3', '#', A('3'), A('3'), A('#'), C('C') },
|
||||
K(4) = { '4', '$', A('4'), A('4'), A('$'), C('D') },
|
||||
K(5) = { '5', '%', A('5'), A('5'), A('%'), C('E') },
|
||||
K(6) = { '6', '^', A('6'), A('6'), A('^'), C('^') },
|
||||
K(7) = { '7', '&', A('7'), A('7'), A('&'), C('G') },
|
||||
K(8) = { '8', '*', A('8'), A('8'), A('*'), C('H') },
|
||||
K(9) = { '9', '(', A('9'), A('9'), A('('), C('I') },
|
||||
K(0) = { '0', ')', A('0'), A('0'), A(')'), C('@') },
|
||||
K(ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(ESCAPE) = { C('['), C('['), CA('['),CA('['),CA('['),C('[') },
|
||||
K(BACKSPACE) = { C('H'), C('H'), CA('H'),CA('H'),CA('H'),DEL },
|
||||
K(TAB) = { C('I'), C('I'), CA('I'),CA('I'),CA('I'),C('I') },
|
||||
K(SPACEBAR) = { ' ', ' ', A(' '), A(' '), A(' '), C('@') },
|
||||
K(DASH) = { '-', '_', A('-'), A('-'), A('_'), C('_') },
|
||||
K(EQUAL) = { '=', '+', A('='), A('='), A('+'), C('@') },
|
||||
K(OPEN_BRACKET) = { '[', '{', A('['), A('['), A('{'), C('[') },
|
||||
K(CLOSE_BRACKET) = { ']', '}', A(']'), A(']'), A('}'), C(']') },
|
||||
K(BACKSLASH) = { '\\', '|', A('\\'),A('\\'),A('|'), C('\\') },
|
||||
K(SEMICOLON) = { ';', ':', A(';'), A(';'), A(':'), C('@') },
|
||||
K(APOSTROPH) = { '\'', '"', A('\''),A('\''),A('"'), C('@') },
|
||||
K(GRAVE_ACCENT) = { '`', '~', A('`'), A('`'), A('~'), C('@') },
|
||||
K(COMMA) = { ',', '<', A(','), A(','), A('<'), C('@') },
|
||||
K(PERIOD) = { '.', '>', A('.'), A('.'), A('>'), C('@') },
|
||||
K(SLASH) = { '/', '?', A('/'), A('/'), A('?'), C('@') },
|
||||
K(CAPS_LOCK) = { LCTRL, LCTRL, LCTRL, LCTRL, LCTRL, LCTRL },
|
||||
K(F1) = { F1, SF1, AF1, AF1, ASF1, CF1 },
|
||||
K(F2) = { F2, SF2, AF2, AF2, ASF2, CF2 },
|
||||
K(F3) = { F3, SF3, AF3, AF3, ASF3, CF3 },
|
||||
K(F4) = { F4, SF4, AF4, AF4, ASF4, CF4 },
|
||||
K(F5) = { F5, SF5, AF5, AF5, ASF5, CF5 },
|
||||
K(F6) = { F6, SF6, AF6, AF6, ASF6, CF6 },
|
||||
K(F7) = { F7, SF7, AF7, AF7, ASF7, CF7 },
|
||||
K(F8) = { F8, SF8, AF8, AF8, ASF8, CF8 },
|
||||
K(F9) = { F9, SF9, AF9, AF9, ASF9, CF9 },
|
||||
K(F10) = { F10, SF10, AF10, AF10, ASF10, CF10 },
|
||||
K(F11) = { F11, SF11, AF11, AF11, ASF11, CF11 },
|
||||
K(F12) = { F12, SF12, AF12, AF12, ASF12, CF12 },
|
||||
K(SCROLL_LOCK) = { SLOCK, SLOCK, SLOCK, SLOCK, SLOCK, SLOCK },
|
||||
K(INSERT) = { INSRT, INSRT, AINSRT, AINSRT, AINSRT, CINSRT },
|
||||
K(HOME) = { HOME, HOME, AHOME, AHOME, AHOME, CHOME },
|
||||
K(PAGE_UP) = { PGUP, PGUP, APGUP, APGUP, APGUP, CPGUP },
|
||||
K(DELETE) = { DEL, DEL, A(DEL), A(DEL), A(DEL), DEL },
|
||||
K(END) = { END, END, AEND, AEND, AEND, CEND },
|
||||
K(PAGE_DOWN) = { PGDN, PGDN, APGDN, APGDN, APGDN, CPGDN },
|
||||
K(RIGHT_ARROW) = { RIGHT, RIGHT, ARIGHT, ARIGHT, ARIGHT, CRIGHT },
|
||||
K(LEFT_ARROW) = { LEFT, LEFT, ALEFT, ALEFT, ALEFT, CLEFT },
|
||||
K(DOWN_ARROW) = { DOWN, DOWN, ADOWN, ADOWN, ADOWN, CDOWN },
|
||||
K(UP_ARROW) = { UP, UP, AUP, AUP, AUP, CUP },
|
||||
K(NUM_LOCK) = { NLOCK, NLOCK, NLOCK, NLOCK, NLOCK, NLOCK },
|
||||
K(KP_SLASH) = { '/', '/', A('/'), A('/'), A('/'), C('@') },
|
||||
K(KP_STAR) = { '*', '*', A('*'), A('*'), A('*'), C('@') },
|
||||
K(KP_DASH) = { '-', '-', AMIN, AMIN, A('-'), CMIN },
|
||||
K(KP_PLUS) = { '+', '+', APLUS, APLUS, A('+'), CPLUS },
|
||||
K(KP_ENTER) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(KP_1) = { NEND, '1', AEND, AEND, A('1'), CEND },
|
||||
K(KP_2) = { NDOWN, '2', ADOWN, ADOWN, A('2'), CDOWN },
|
||||
K(KP_3) = { NPGDN, '3', APGDN, APGDN, A('3'), CPGDN },
|
||||
K(KP_4) = { NLEFT, '4', ALEFT, ALEFT, A('4'), CLEFT },
|
||||
K(KP_5) = { NMID, '5', AMID, AMID, A('5'), CMID },
|
||||
K(KP_6) = { NRIGHT, '6', ARIGHT, ARIGHT, A('6'), CRIGHT },
|
||||
K(KP_7) = { NHOME, '7', AHOME, AHOME, A('7'), CHOME },
|
||||
K(KP_8) = { NUP, '8', AUP, AUP, A('8'), CUP },
|
||||
K(KP_9) = { NPGUP, '9', APGUP, APGUP, A('9'), CPGUP },
|
||||
K(KP_0) = { NINSRT, '0', AINSRT, AINSRT, A('0'), CINSRT },
|
||||
K(KP_PERIOD) = { NDEL, '.', A(DEL), A(DEL), A('.'), DEL },
|
||||
K(EUROPE_2) = { '<', '>', A('<'), A('|'), A('>'), C('@') },
|
||||
K(APPLICATION) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(SYSREQ) = { C('M'), C('M'), CA('M'),CA('M'),CA('M'),C('J') },
|
||||
K(LEFT_CTRL) = { CALOCK, CALOCK, CALOCK, CALOCK, CALOCK, CALOCK },
|
||||
K(LEFT_SHIFT) = { LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT, LSHIFT },
|
||||
K(LEFT_ALT) = { LALT, LALT, LALT, LALT, LALT, LALT },
|
||||
K(LEFT_GUI) = { LEFT, '<', ALEFT, ALEFT, A('<'), CLEFT },
|
||||
K(RIGHT_CTRL) = { RCTRL, RCTRL, RCTRL, RCTRL, RCTRL, RCTRL },
|
||||
K(RIGHT_SHIFT) = { RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT, RSHIFT },
|
||||
K(RIGHT_ALT) = { RALT, RALT, RALT, RALT, RALT, RALT },
|
||||
K(RIGHT_GUI) = { RIGHT, '>', ARIGHT, ARIGHT, A('>'), CRIGHT }
|
||||
|
|
|
@ -516,7 +516,7 @@ static int pty_slave_read(tty_t *tp, int try)
|
|||
}
|
||||
|
||||
/* Input processing. */
|
||||
if (in_process(tp, &c, 1, -1) == 0) break;
|
||||
if (in_process(tp, &c, 1) == 0) break;
|
||||
|
||||
/* PTY writer bookkeeping. */
|
||||
pp->wrcum++;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <minix/driver.h>
|
||||
#include <termios.h>
|
||||
#include <sys/ioc_tty.h>
|
||||
#include <sys/kbdio.h>
|
||||
#include <signal.h>
|
||||
#include <minix/keymap.h>
|
||||
#include "tty.h"
|
||||
|
@ -34,7 +35,6 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
unsigned long kbd_irq_set = 0;
|
||||
unsigned long rs_irq_set = 0;
|
||||
|
||||
/* Address of a tty structure. */
|
||||
|
@ -172,9 +172,6 @@ int main(void)
|
|||
case HARDWARE:
|
||||
/* hardware interrupt notification */
|
||||
|
||||
/* fetch chars from keyboard */
|
||||
if (tty_mess.NOTIFY_ARG & kbd_irq_set)
|
||||
kbd_interrupt(&tty_mess);
|
||||
#if NR_RS_LINES > 0
|
||||
/* serial I/O */
|
||||
if (tty_mess.NOTIFY_ARG & rs_irq_set)
|
||||
|
@ -196,8 +193,9 @@ int main(void)
|
|||
case TTY_FKEY_CONTROL: /* (un)register a fkey observer */
|
||||
do_fkey_ctl(&tty_mess);
|
||||
continue;
|
||||
case INPUT_EVENT:
|
||||
do_kb_inject(&tty_mess);
|
||||
case TTY_INPUT_UP:
|
||||
case TTY_INPUT_EVENT:
|
||||
do_input(&tty_mess);
|
||||
continue;
|
||||
default: /* should be a driver request */
|
||||
; /* do nothing; end switch */
|
||||
|
@ -212,10 +210,7 @@ int main(void)
|
|||
* All requests have a minor device number.
|
||||
*/
|
||||
line = tty_mess.CDEV_MINOR;
|
||||
if (line == KBD_MINOR || line == KBDAUX_MINOR) {
|
||||
do_kbd(&tty_mess, ipc_status);
|
||||
continue;
|
||||
} else if (line == VIDEO_MINOR) {
|
||||
if (line == VIDEO_MINOR) {
|
||||
do_video(&tty_mess, ipc_status);
|
||||
continue;
|
||||
} else if (line - PTYPX_MINOR < NR_PTYS &&
|
||||
|
@ -270,7 +265,7 @@ line2tty(devminor_t line)
|
|||
if (line == CONS_MINOR || line == LOG_MINOR)
|
||||
line = consoleline;
|
||||
|
||||
if (line == KBD_MINOR || line == KBDAUX_MINOR || line == VIDEO_MINOR) {
|
||||
if (line == VIDEO_MINOR) {
|
||||
return(NULL);
|
||||
} else if ((line - CONS_MINOR) < NR_CONS) {
|
||||
tp = tty_addr(line - CONS_MINOR);
|
||||
|
@ -595,53 +590,20 @@ static int do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
|||
/* Perform an IOCTL on this terminal. POSIX termios calls are handled
|
||||
* by the IOCTL system call.
|
||||
*/
|
||||
kio_bell_t bell;
|
||||
clock_t ticks;
|
||||
tty_t *tp;
|
||||
int i, r;
|
||||
size_t size;
|
||||
|
||||
if ((tp = line2tty(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
/* Size of the ioctl parameter. */
|
||||
switch (request) {
|
||||
case TCGETS: /* Posix tcgetattr function */
|
||||
case TCSETS: /* Posix tcsetattr function, TCSANOW option */
|
||||
case TCSETSW: /* Posix tcsetattr function, TCSADRAIN option */
|
||||
case TCSETSF: /* Posix tcsetattr function, TCSAFLUSH option */
|
||||
size = sizeof(struct termios);
|
||||
break;
|
||||
|
||||
case TCSBRK: /* Posix tcsendbreak function */
|
||||
case TCFLOW: /* Posix tcflow function */
|
||||
case TCFLSH: /* Posix tcflush function */
|
||||
case TIOCGPGRP: /* Posix tcgetpgrp function */
|
||||
case TIOCSPGRP: /* Posix tcsetpgrp function */
|
||||
size = sizeof(int);
|
||||
break;
|
||||
|
||||
case TIOCGWINSZ: /* get window size (not Posix) */
|
||||
case TIOCSWINSZ: /* set window size (not Posix) */
|
||||
size = sizeof(struct winsize);
|
||||
break;
|
||||
|
||||
case KIOCSMAP: /* load keymap (Minix extension) */
|
||||
size = sizeof(keymap_t);
|
||||
break;
|
||||
|
||||
case TIOCSFON: /* load font (Minix extension) */
|
||||
size = sizeof(u8_t [8192]);
|
||||
break;
|
||||
|
||||
case TCDRAIN: /* Posix tcdrain function -- no parameter */
|
||||
default: size = 0;
|
||||
}
|
||||
|
||||
r = OK;
|
||||
switch (request) {
|
||||
case TCGETS:
|
||||
/* Get the termios attributes. */
|
||||
r = sys_safecopyto(endpt, grant, 0, (vir_bytes) &tp->tty_termios,
|
||||
size);
|
||||
sizeof(struct termios));
|
||||
break;
|
||||
|
||||
case TCSETSW:
|
||||
|
@ -663,13 +625,13 @@ static int do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
|||
case TCSETS:
|
||||
/* Set the termios attributes. */
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &tp->tty_termios,
|
||||
size);
|
||||
sizeof(struct termios));
|
||||
if (r != OK) break;
|
||||
setattr(tp);
|
||||
break;
|
||||
|
||||
case TCFLSH:
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &i, size);
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &i, sizeof(i));
|
||||
if (r != OK) break;
|
||||
switch (i) {
|
||||
case TCIFLUSH: tty_icancel(tp); break;
|
||||
|
@ -680,7 +642,7 @@ static int do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
|||
break;
|
||||
|
||||
case TCFLOW:
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &i, size);
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &i, sizeof(i));
|
||||
if (r != OK) break;
|
||||
switch (i) {
|
||||
case TCOOFF:
|
||||
|
@ -705,15 +667,29 @@ static int do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
|||
|
||||
case TIOCGWINSZ:
|
||||
r = sys_safecopyto(endpt, grant, 0, (vir_bytes) &tp->tty_winsize,
|
||||
size);
|
||||
sizeof(struct winsize));
|
||||
break;
|
||||
|
||||
case TIOCSWINSZ:
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &tp->tty_winsize,
|
||||
size);
|
||||
sizeof(struct winsize));
|
||||
sigchar(tp, SIGWINCH, 0);
|
||||
break;
|
||||
|
||||
case KIOCBELL:
|
||||
/* Sound bell (only /dev/console). */
|
||||
if (!isconsole(tp))
|
||||
break;
|
||||
r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &bell, sizeof(bell));
|
||||
if (r != OK)
|
||||
break;
|
||||
ticks = bell.kb_duration.tv_usec * system_hz / 1000000;
|
||||
ticks += bell.kb_duration.tv_sec * system_hz;
|
||||
if (!ticks)
|
||||
ticks++;
|
||||
beep_x(bell.kb_pitch, ticks);
|
||||
break;
|
||||
|
||||
case KIOCSMAP:
|
||||
/* Load a new keymap (only /dev/console). */
|
||||
if (isconsole(tp)) r = kbd_loadmap(endpt, grant);
|
||||
|
@ -1034,27 +1010,10 @@ register tty_t *tp; /* pointer to terminal to read from */
|
|||
/*===========================================================================*
|
||||
* in_process *
|
||||
*===========================================================================*/
|
||||
static void in_process_send_byte(
|
||||
tty_t *tp, /* terminal on which character has arrived */
|
||||
int ch /* input character */
|
||||
)
|
||||
{
|
||||
/* Save the character in the input queue. */
|
||||
*tp->tty_inhead++ = ch;
|
||||
if (tp->tty_inhead == bufend(tp->tty_inbuf))
|
||||
tp->tty_inhead = tp->tty_inbuf;
|
||||
tp->tty_incount++;
|
||||
if (ch & IN_EOT) tp->tty_eotct++;
|
||||
|
||||
/* Try to finish input if the queue threatens to overflow. */
|
||||
if (tp->tty_incount == buflen(tp->tty_inbuf)) in_transfer(tp);
|
||||
}
|
||||
|
||||
int in_process(tp, buf, count, scode)
|
||||
int in_process(tp, buf, count)
|
||||
register tty_t *tp; /* terminal on which character has arrived */
|
||||
char *buf; /* buffer with input characters */
|
||||
int count; /* number of input characters */
|
||||
int scode; /* scan code */
|
||||
{
|
||||
/* Characters have just been typed in. Process, save, and echo them. Return
|
||||
* the number of characters processed.
|
||||
|
@ -1063,11 +1022,6 @@ int scode; /* scan code */
|
|||
int ch, sig, ct;
|
||||
int timeset = FALSE;
|
||||
|
||||
/* Send scancode if requested */
|
||||
if (tp->tty_termios.c_iflag & SCANCODES) {
|
||||
in_process_send_byte(tp, (scode & BYTE) | IN_EOT);
|
||||
}
|
||||
|
||||
for (ct = 0; ct < count; ct++) {
|
||||
/* Take one character. */
|
||||
ch = *buf++ & BYTE;
|
||||
|
@ -1200,10 +1154,15 @@ int scode; /* scan code */
|
|||
/* Perform the intricate function of echoing. */
|
||||
if (tp->tty_termios.c_lflag & (ECHO|ECHONL)) ch = tty_echo(tp, ch);
|
||||
|
||||
/* Send processed byte of input unless scancodes sent instead */
|
||||
if (!(tp->tty_termios.c_iflag & SCANCODES)) {
|
||||
in_process_send_byte(tp, ch);
|
||||
}
|
||||
/* Save the character in the input queue. */
|
||||
*tp->tty_inhead++ = ch;
|
||||
if (tp->tty_inhead == bufend(tp->tty_inbuf))
|
||||
tp->tty_inhead = tp->tty_inbuf;
|
||||
tp->tty_incount++;
|
||||
if (ch & IN_EOT) tp->tty_eotct++;
|
||||
|
||||
/* Try to finish input if the queue threatens to overflow. */
|
||||
if (tp->tty_incount == buflen(tp->tty_inbuf)) in_transfer(tp);
|
||||
}
|
||||
return ct;
|
||||
}
|
||||
|
@ -1510,9 +1469,6 @@ tty_t *tp;
|
|||
/* Setting the output speed to zero hangs up the phone. */
|
||||
if (tp->tty_termios.c_ospeed == B0) sigchar(tp, SIGHUP, 1);
|
||||
|
||||
/* SCANCODES is supported only for the console */
|
||||
if (!isconsole(tp)) tp->tty_termios.c_iflag &= ~SCANCODES;
|
||||
|
||||
/* Set new line speed, character size, etc at the device level. */
|
||||
(*tp->tty_ioctl)(tp, 0);
|
||||
}
|
||||
|
|
|
@ -3,15 +3,10 @@
|
|||
#include <minix/chardriver.h>
|
||||
#include <minix/timers.h>
|
||||
|
||||
#undef lock
|
||||
#undef unlock
|
||||
|
||||
/* First minor numbers for the various classes of TTY devices. */
|
||||
#define CONS_MINOR 0
|
||||
#define LOG_MINOR 15
|
||||
#define RS232_MINOR 16
|
||||
#define KBD_MINOR 127
|
||||
#define KBDAUX_MINOR 126
|
||||
#define VIDEO_MINOR 125
|
||||
#define TTYPX_MINOR 128
|
||||
#define PTYPX_MINOR 192
|
||||
|
@ -132,7 +127,7 @@ void handle_events(struct tty *tp);
|
|||
void sigchar(struct tty *tp, int sig, int mayflush);
|
||||
void tty_task(void);
|
||||
tty_t *line2tty(devminor_t minor);
|
||||
int in_process(struct tty *tp, char *buf, int count, int scode);
|
||||
int in_process(struct tty *tp, char *buf, int count);
|
||||
void out_process(struct tty *tp, char *bstart, char *bpos, char *bend,
|
||||
int *icount, int *ocount);
|
||||
void tty_wakeup(clock_t now);
|
||||
|
@ -158,9 +153,7 @@ void kb_init(struct tty *tp);
|
|||
void kb_init_once(void);
|
||||
int kbd_loadmap(endpoint_t endpt, cp_grant_id_t grant);
|
||||
void do_fkey_ctl(message *m);
|
||||
void kbd_interrupt(message *m);
|
||||
void do_kbd(message *m, int ipc_status);
|
||||
void do_kb_inject(message *m);
|
||||
void do_input(message *m);
|
||||
|
||||
/* pty.c */
|
||||
void do_pty(message *m_ptr, int ipc_status);
|
||||
|
|
|
@ -303,7 +303,6 @@ CONFIGSYMLINKS+= \
|
|||
/usr/tmp /var/tmp \
|
||||
/usr/pkg/bin/clang /usr/bin/cc \
|
||||
/usr/pkg/bin/strip /usr/bin/strip \
|
||||
/dev/kbdaux /dev/mouse \
|
||||
/proc/mounts /etc/mtab
|
||||
|
||||
.endif # !defined(__MINIX)
|
||||
|
|
|
@ -181,7 +181,7 @@ service tty
|
|||
io ALL; # ALL I/O ranges allowed
|
||||
irq NONE; # No IRQ allowed
|
||||
sigmgr rs; # Signal manager is RS
|
||||
scheduler sched; # Scheduler is sched
|
||||
scheduler KERNEL; # Scheduler is KERNEL (prevents console stalls)
|
||||
priority 1; # priority queue 1
|
||||
quantum 50; # default driver quantum
|
||||
};
|
||||
|
@ -514,6 +514,28 @@ service filter
|
|||
;
|
||||
};
|
||||
|
||||
service input
|
||||
{
|
||||
ipc SYSTEM pm vfs rs ds tty vm;
|
||||
priority 1;
|
||||
};
|
||||
|
||||
|
||||
service pckbd
|
||||
{
|
||||
system
|
||||
IRQCTL # 19
|
||||
DEVIO # 21
|
||||
;
|
||||
io 60:8; # Keyboard, keyboard command/status
|
||||
irq
|
||||
1 # Keyboard
|
||||
12 # Auxiliary input (mouse)
|
||||
;
|
||||
ipc SYSTEM pm rs ds vm input;
|
||||
priority 1;
|
||||
};
|
||||
|
||||
service hello
|
||||
{
|
||||
system
|
||||
|
|
|
@ -11,7 +11,8 @@ INCS+= acpi.h audio_fw.h bitmap.h \
|
|||
debug.h devio.h devman.h dmap.h \
|
||||
driver.h drivers.h drvlib.h ds.h \
|
||||
endpoint.h fb.h fslib.h gpio.h gcov.h hash.h \
|
||||
hgfs.h i2c.h i2cdriver.h ioctl.h input.h ipc.h ipcconst.h \
|
||||
hgfs.h i2c.h i2cdriver.h ioctl.h input.h \
|
||||
inputdriver.h ipc.h ipcconst.h \
|
||||
keymap.h log.h mmio.h mount.h mthread.h minlib.h \
|
||||
netdriver.h optset.h padconf.h partition.h portio.h \
|
||||
priv.h procfs.h profile.h queryparam.h \
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
* 0x1000 - 0x10FF Notify messages
|
||||
* 0x1100 - 0x11FF USB
|
||||
* 0x1200 - 0x12FF Devman
|
||||
* 0x1300 - 0x13FF TTY Requests
|
||||
* 0x1300 - 0x13FF TTY requests
|
||||
* 0x1400 - 0x14FF VFS-FS transaction IDs
|
||||
* 0x1500 - 0x15FF (unused)
|
||||
* 0x1500 - 0x15FF Input server messages
|
||||
* 0x1600 - 0x16FF VirtualBox (VBOX) requests (see vboxif.h)
|
||||
* 0x1700 - 0x17FF Real Time Clock requests and responses
|
||||
*
|
||||
|
@ -1229,18 +1229,11 @@
|
|||
# define DEVMAN_RESULT m4_l1
|
||||
|
||||
/*===========================================================================*
|
||||
* TTY REQUESTS *
|
||||
* Messages for TTY *
|
||||
*===========================================================================*/
|
||||
|
||||
#define TTY_RQ_BASE 0x1300
|
||||
|
||||
#define INPUT_EVENT (TTY_RQ_BASE + 0)
|
||||
|
||||
# define INPUT_TYPE m4_l1
|
||||
# define INPUT_CODE m4_l2
|
||||
# define INPUT_VALUE m4_l3
|
||||
|
||||
|
||||
#define TTY_FKEY_CONTROL (TTY_RQ_BASE + 1) /* control an F-key at TTY */
|
||||
# define FKEY_REQUEST m2_i1 /* request to perform at TTY */
|
||||
# define FKEY_MAP 10 /* observe function key */
|
||||
|
@ -1249,7 +1242,35 @@
|
|||
# define FKEY_FKEYS m2_l1 /* F1-F12 keys pressed */
|
||||
# define FKEY_SFKEYS m2_l2 /* Shift-F1-F12 keys pressed */
|
||||
|
||||
#endif
|
||||
#define TTY_INPUT_UP (TTY_RQ_BASE + 2) /* input server is up */
|
||||
/* This message uses no message fields. */
|
||||
|
||||
#define TTY_INPUT_EVENT (TTY_RQ_BASE + 3) /* relayed input event */
|
||||
/* This message shares its message fields with INPUT_EVENT. */
|
||||
|
||||
/*===========================================================================*
|
||||
* Messages for input server and drivers *
|
||||
*===========================================================================*/
|
||||
|
||||
/* The input protocol has no real replies. All messages are one-way. */
|
||||
#define INPUT_RQ_BASE 0x1500 /* from TTY to server, or server to driver */
|
||||
#define INPUT_RS_BASE 0x1580 /* from input driver to input server */
|
||||
|
||||
#define INPUT_CONF (INPUT_RQ_BASE + 0) /* configure driver */
|
||||
# define INPUT_KBD_ID m7_i1 /* keyboard device ID */
|
||||
# define INPUT_MOUSE_ID m7_i2 /* mouse device ID */
|
||||
# define INPUT_RSVD1_ID m7_i3 /* ID for as yet unallocated type */
|
||||
# define INPUT_RSVD2_ID m7_i4 /* ID for as yet unallocated type */
|
||||
|
||||
#define INPUT_SETLEDS (INPUT_RQ_BASE + 1) /* set keyboard LEDs */
|
||||
# define INPUT_LED_MASK m7_i1 /* status mask of LEDs */
|
||||
|
||||
#define INPUT_EVENT (INPUT_RS_BASE + 0) /* send input event */
|
||||
# define INPUT_ID m7_i1 /* device ID */
|
||||
# define INPUT_PAGE m7_i2 /* usage page */
|
||||
# define INPUT_CODE m7_i3 /* usage code */
|
||||
# define INPUT_VALUE m7_i4 /* event value */
|
||||
# define INPUT_FLAGS m7_i5 /* flags associated with value */
|
||||
|
||||
/*===========================================================================*
|
||||
* VFS-FS TRANSACTION IDs *
|
||||
|
@ -1403,4 +1424,4 @@
|
|||
|
||||
#define SUSPEND -998 /* status to suspend caller, reply later */
|
||||
|
||||
/* _MINIX_COM_H */
|
||||
#endif /* !_MINIX_COM_H */
|
||||
|
|
|
@ -11,9 +11,6 @@ enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_TTY, STYLE_CTTY };
|
|||
* Major and minor device numbers *
|
||||
*===========================================================================*/
|
||||
|
||||
/* Total number of different devices. */
|
||||
#define NR_DEVICES NR_SYS_PROCS /* number of (major) devices */
|
||||
|
||||
/* Major device numbers. */
|
||||
#define NONE_MAJOR 0 /* 0 = not used */
|
||||
#define MEMORY_MAJOR 1 /* 1 = /dev/mem (memory devices) */
|
||||
|
@ -72,6 +69,9 @@ enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_TTY, STYLE_CTTY };
|
|||
#define BMP085B2S77_MAJOR 54 /* 54 = /dev/bmp085b2s77 (bmp085) */
|
||||
#define BMP085B3S77_MAJOR 55 /* 55 = /dev/bmp085b3s77 (bmp085) */
|
||||
/* 56-63 = /dev/vnd[0-7] (vnd) */
|
||||
#define INPUT_MAJOR 64 /* 64 = /dev/input (input) */
|
||||
|
||||
#define NR_DEVICES 65 /* number of (major) devices */
|
||||
|
||||
/* Minor device numbers for memory driver. */
|
||||
# define RAM_DEV_OLD 0 /* minor device for /dev/ram */
|
||||
|
|
|
@ -1,8 +1,333 @@
|
|||
#ifndef _MINIX_INPUT_H
|
||||
#define _MINIX_INPUT_H
|
||||
|
||||
#define INPUT_EV_KEY 0x1
|
||||
#define INPUT_EV_REL 0x2
|
||||
#define INPUT_EV_ABS 0x3
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef _SYSTEM
|
||||
|
||||
/* Device type. */
|
||||
#define INPUT_DEV_KBD 0x01 /* keyboard device */
|
||||
#define INPUT_DEV_MOUSE 0x02 /* mouse device */
|
||||
|
||||
/* Known-invalid input device ID. */
|
||||
#define INVALID_INPUT_ID (-1)
|
||||
|
||||
#endif /* _SYSTEM */
|
||||
|
||||
/*
|
||||
* The input server heavily draws on the USB HID specification for events.
|
||||
* Every driver should convert its event codes into this format. This also
|
||||
* implies that we use the U.S. keyboard layout for key events. The mapping to
|
||||
* localized keyboard layouts will be done at a different place (TTY, Xserver).
|
||||
*/
|
||||
|
||||
/* A single event, as read from one of the input devices. */
|
||||
struct input_event {
|
||||
uint16_t page; /* event page (INPUT_PAGE_) */
|
||||
uint16_t code; /* page-specific event code */
|
||||
int32_t value; /* event value */
|
||||
uint16_t flags; /* event flags (INPUT_FLAG_) */
|
||||
uint16_t devid; /* identifier of source device */
|
||||
uint32_t rsvd[2]; /* reserved for a future timestamp */
|
||||
};
|
||||
|
||||
/* Event pages. */
|
||||
#define INPUT_PAGE_GD 0x0001 /* General Desktop page */
|
||||
#define INPUT_PAGE_KEY 0x0007 /* Keyboard/Keypad page */
|
||||
#define INPUT_PAGE_LED 0x0008 /* LED page */
|
||||
#define INPUT_PAGE_BUTTON 0x0009 /* Button page */
|
||||
#define INPUT_PAGE_CONS 0x000C /* Consumer page */
|
||||
|
||||
/* Event values. Not exhaustive. */
|
||||
#define INPUT_RELEASE 0
|
||||
#define INPUT_PRESS 1
|
||||
|
||||
/* Event flags. */
|
||||
#define INPUT_FLAG_ABS 0x00 /* absolute value (the default) */
|
||||
#define INPUT_FLAG_REL 0x04 /* relative value */
|
||||
|
||||
/* Page-specific event codes. */
|
||||
enum {
|
||||
INPUT_GD_X = 0x0030,
|
||||
INPUT_GD_Y,
|
||||
|
||||
INPUT_GD_SYSTEM_POWER_DOWN = 0x0081,
|
||||
INPUT_GD_SYSTEM_SLEEP,
|
||||
INPUT_GD_SYSTEM_WAKE_UP
|
||||
};
|
||||
|
||||
enum {
|
||||
INPUT_KEY_A = 0x0004,
|
||||
INPUT_KEY_B,
|
||||
INPUT_KEY_C,
|
||||
INPUT_KEY_D,
|
||||
INPUT_KEY_E,
|
||||
INPUT_KEY_F,
|
||||
INPUT_KEY_G,
|
||||
INPUT_KEY_H,
|
||||
INPUT_KEY_I,
|
||||
INPUT_KEY_J,
|
||||
INPUT_KEY_K,
|
||||
INPUT_KEY_L,
|
||||
INPUT_KEY_M,
|
||||
INPUT_KEY_N,
|
||||
INPUT_KEY_O,
|
||||
INPUT_KEY_P,
|
||||
INPUT_KEY_Q,
|
||||
INPUT_KEY_R,
|
||||
INPUT_KEY_S,
|
||||
INPUT_KEY_T,
|
||||
INPUT_KEY_U,
|
||||
INPUT_KEY_V,
|
||||
INPUT_KEY_W,
|
||||
INPUT_KEY_X,
|
||||
INPUT_KEY_Y,
|
||||
INPUT_KEY_Z,
|
||||
INPUT_KEY_1,
|
||||
INPUT_KEY_2,
|
||||
INPUT_KEY_3,
|
||||
INPUT_KEY_4,
|
||||
INPUT_KEY_5,
|
||||
INPUT_KEY_6,
|
||||
INPUT_KEY_7,
|
||||
INPUT_KEY_8,
|
||||
INPUT_KEY_9,
|
||||
INPUT_KEY_0,
|
||||
|
||||
INPUT_KEY_ENTER,
|
||||
INPUT_KEY_ESCAPE,
|
||||
INPUT_KEY_BACKSPACE,
|
||||
INPUT_KEY_TAB,
|
||||
INPUT_KEY_SPACEBAR,
|
||||
INPUT_KEY_DASH,
|
||||
INPUT_KEY_EQUAL,
|
||||
INPUT_KEY_OPEN_BRACKET,
|
||||
INPUT_KEY_CLOSE_BRACKET,
|
||||
INPUT_KEY_BACKSLASH,
|
||||
INPUT_KEY_EUROPE_1,
|
||||
INPUT_KEY_SEMICOLON,
|
||||
INPUT_KEY_APOSTROPH,
|
||||
INPUT_KEY_GRAVE_ACCENT,
|
||||
INPUT_KEY_COMMA,
|
||||
INPUT_KEY_PERIOD,
|
||||
INPUT_KEY_SLASH,
|
||||
INPUT_KEY_CAPS_LOCK,
|
||||
|
||||
INPUT_KEY_F1,
|
||||
INPUT_KEY_F2,
|
||||
INPUT_KEY_F3,
|
||||
INPUT_KEY_F4,
|
||||
INPUT_KEY_F5,
|
||||
INPUT_KEY_F6,
|
||||
INPUT_KEY_F7,
|
||||
INPUT_KEY_F8,
|
||||
INPUT_KEY_F9,
|
||||
INPUT_KEY_F10,
|
||||
INPUT_KEY_F11,
|
||||
INPUT_KEY_F12,
|
||||
|
||||
INPUT_KEY_PRINT_SCREEN,
|
||||
INPUT_KEY_SCROLL_LOCK,
|
||||
INPUT_KEY_PAUSE,
|
||||
INPUT_KEY_INSERT,
|
||||
INPUT_KEY_HOME,
|
||||
INPUT_KEY_PAGE_UP,
|
||||
INPUT_KEY_DELETE,
|
||||
INPUT_KEY_END,
|
||||
INPUT_KEY_PAGE_DOWN,
|
||||
INPUT_KEY_RIGHT_ARROW,
|
||||
INPUT_KEY_LEFT_ARROW,
|
||||
INPUT_KEY_DOWN_ARROW,
|
||||
INPUT_KEY_UP_ARROW,
|
||||
INPUT_KEY_NUM_LOCK,
|
||||
|
||||
INPUT_KEY_KP_SLASH,
|
||||
INPUT_KEY_KP_STAR,
|
||||
INPUT_KEY_KP_DASH,
|
||||
INPUT_KEY_KP_PLUS,
|
||||
INPUT_KEY_KP_ENTER,
|
||||
INPUT_KEY_KP_1,
|
||||
INPUT_KEY_KP_2,
|
||||
INPUT_KEY_KP_3,
|
||||
INPUT_KEY_KP_4,
|
||||
INPUT_KEY_KP_5,
|
||||
INPUT_KEY_KP_6,
|
||||
INPUT_KEY_KP_7,
|
||||
INPUT_KEY_KP_8,
|
||||
INPUT_KEY_KP_9,
|
||||
INPUT_KEY_KP_0,
|
||||
INPUT_KEY_KP_PERIOD,
|
||||
|
||||
INPUT_KEY_EUROPE_2,
|
||||
INPUT_KEY_APPLICATION,
|
||||
INPUT_KEY_POWER,
|
||||
INPUT_KEY_KP_EQUAL,
|
||||
|
||||
INPUT_KEY_F13,
|
||||
INPUT_KEY_F14,
|
||||
INPUT_KEY_F15,
|
||||
INPUT_KEY_F16,
|
||||
INPUT_KEY_F17,
|
||||
INPUT_KEY_F18,
|
||||
INPUT_KEY_F19,
|
||||
INPUT_KEY_F20,
|
||||
INPUT_KEY_F21,
|
||||
INPUT_KEY_F22,
|
||||
INPUT_KEY_F23,
|
||||
INPUT_KEY_F24,
|
||||
|
||||
INPUT_KEY_EXECUTE,
|
||||
INPUT_KEY_HELP,
|
||||
INPUT_KEY_MENU,
|
||||
INPUT_KEY_SELECT,
|
||||
INPUT_KEY_STOP,
|
||||
INPUT_KEY_AGAIN,
|
||||
INPUT_KEY_UNDO,
|
||||
INPUT_KEY_CUT,
|
||||
INPUT_KEY_COPY,
|
||||
INPUT_KEY_PASTE,
|
||||
INPUT_KEY_FIND,
|
||||
INPUT_KEY_MUTE,
|
||||
INPUT_KEY_VOLUME_UP,
|
||||
INPUT_KEY_VOLUME_DOWN,
|
||||
INPUT_KEY_LOCKING_CAPS_LOCK,
|
||||
INPUT_KEY_LOCKING_NUM_LOCK,
|
||||
INPUT_KEY_LOCKING_SCROLL_LOCK,
|
||||
INPUT_KEY_KP_COMMA,
|
||||
INPUT_KEY_EQUAL_SIGN,
|
||||
INPUT_KEY_I10L_1,
|
||||
INPUT_KEY_I10L_2,
|
||||
INPUT_KEY_I10L_3,
|
||||
INPUT_KEY_I10L_4,
|
||||
INPUT_KEY_I10L_5,
|
||||
INPUT_KEY_I10L_6,
|
||||
INPUT_KEY_I10L_7,
|
||||
INPUT_KEY_I10L_8,
|
||||
INPUT_KEY_I10L_9,
|
||||
INPUT_KEY_LANG_1,
|
||||
INPUT_KEY_LANG_2,
|
||||
INPUT_KEY_LANG_3,
|
||||
INPUT_KEY_LANG_4,
|
||||
INPUT_KEY_LANG_5,
|
||||
INPUT_KEY_LANG_6,
|
||||
INPUT_KEY_LANG_7,
|
||||
INPUT_KEY_LANG_8,
|
||||
INPUT_KEY_LANG_9,
|
||||
INPUT_KEY_ALT_ERASE,
|
||||
INPUT_KEY_SYSREQ,
|
||||
INPUT_KEY_CANCEL,
|
||||
INPUT_KEY_CLEAR,
|
||||
INPUT_KEY_PRIOR,
|
||||
INPUT_KEY_RETURN,
|
||||
INPUT_KEY_SEPARATOR,
|
||||
INPUT_KEY_OUT,
|
||||
INPUT_KEY_OPER,
|
||||
INPUT_KEY_CLEAR_AGAIN,
|
||||
INPUT_KEY_CR_SEL,
|
||||
INPUT_KEY_EX_SEL,
|
||||
|
||||
/* 0x00A5 -- 0x00AF RESERVED */
|
||||
|
||||
INPUT_KEY_KP_00 = 0x00B0,
|
||||
INPUT_KEY_KP_000,
|
||||
INPUT_KEY_THOUSANDS_SEP,
|
||||
INPUT_KEY_DECIMAL_SEP,
|
||||
INPUT_KEY_CURRENCY_UNIT,
|
||||
INPUT_KEY_CURRENCY_SUBUNIT,
|
||||
INPUT_KEY_KP_OPEN_PARENTHESIS,
|
||||
INPUT_KEY_KP_CLOSE_PARENTHESIS,
|
||||
INPUT_KEY_KP_OPEN_BRACE,
|
||||
INPUT_KEY_KP_CLOSE_BRACE,
|
||||
INPUT_KEY_KP_TAB,
|
||||
INPUT_KEY_KP_BACKSPACE,
|
||||
INPUT_KEY_KP_A,
|
||||
INPUT_KEY_KP_B,
|
||||
INPUT_KEY_KP_C,
|
||||
INPUT_KEY_KP_D,
|
||||
INPUT_KEY_KP_E,
|
||||
INPUT_KEY_KP_F,
|
||||
INPUT_KEY_KP_XOR,
|
||||
INPUT_KEY_KP_CARET,
|
||||
INPUT_KEY_KP_PERCENT,
|
||||
INPUT_KEY_KP_SMALLER_THEN,
|
||||
INPUT_KEY_KP_GREATER_THEN,
|
||||
INPUT_KEY_KP_AMP,
|
||||
INPUT_KEY_KP_DOUBLE_AMP,
|
||||
INPUT_KEY_KP_PIPE,
|
||||
INPUT_KEY_KP_DOUBLE_PIPE,
|
||||
INPUT_KEY_KP_COLON,
|
||||
INPUT_KEY_KP_NUMBER,
|
||||
INPUT_KEY_KP_SPACE,
|
||||
INPUT_KEY_KP_AT,
|
||||
INPUT_KEY_KP_EXCLAMATION_MARK,
|
||||
INPUT_KEY_KP_MEM_STORE,
|
||||
INPUT_KEY_KP_MEM_RECALL,
|
||||
INPUT_KEY_KP_MEM_CLEAR,
|
||||
INPUT_KEY_KP_MEM_ADD,
|
||||
INPUT_KEY_KP_MEM_SUBTRACT,
|
||||
INPUT_KEY_KP_MEM_MULTIPLY,
|
||||
INPUT_KEY_KP_MEM_DIVIDE,
|
||||
INPUT_KEY_KP_PLUS_MINUS,
|
||||
INPUT_KEY_KP_CLEAR,
|
||||
INPUT_KEY_KP_CLEAR_ENTRY,
|
||||
INPUT_KEY_KP_BIN,
|
||||
INPUT_KEY_KP_OCT,
|
||||
INPUT_KEY_KP_DEC,
|
||||
INPUT_KEY_KP_HEX,
|
||||
|
||||
/* 0x00DE, 0x00DF RESERVED */
|
||||
|
||||
INPUT_KEY_LEFT_CTRL = 0x00E0,
|
||||
INPUT_KEY_LEFT_SHIFT,
|
||||
INPUT_KEY_LEFT_ALT,
|
||||
INPUT_KEY_LEFT_GUI,
|
||||
INPUT_KEY_RIGHT_CTRL,
|
||||
INPUT_KEY_RIGHT_SHIFT,
|
||||
INPUT_KEY_RIGHT_ALT,
|
||||
INPUT_KEY_RIGHT_GUI
|
||||
|
||||
/* 0x00E8 -- 0xFFFF RESERVED */
|
||||
};
|
||||
|
||||
enum {
|
||||
INPUT_LED_NUMLOCK = 0x0001,
|
||||
INPUT_LED_CAPSLOCK,
|
||||
INPUT_LED_SCROLLLOCK
|
||||
};
|
||||
|
||||
enum {
|
||||
INPUT_BUTTON_1 = 0x0001,
|
||||
};
|
||||
|
||||
enum {
|
||||
INPUT_CONS_SCAN_NEXT_TRACK = 0x00B5,
|
||||
INPUT_CONS_SCAN_PREVIOUS_TRACK,
|
||||
INPUT_CONS_STOP,
|
||||
|
||||
INPUT_CONS_PLAY_PAUSE = 0x00CD,
|
||||
|
||||
INPUT_CONS_MUTE = 0x00E2,
|
||||
|
||||
INPUT_CONS_VOLUME_UP = 0x00E9,
|
||||
INPUT_CONS_VOLUME_DOWN,
|
||||
|
||||
INPUT_CONS_AL_MEDIA_SELECT = 0x0183,
|
||||
|
||||
INPUT_CONS_AL_EMAIL_READER = 0x018A,
|
||||
|
||||
INPUT_CONS_AL_CALCULATOR = 0x0192,
|
||||
|
||||
INPUT_CONS_AL_LOCAL_BROWSER = 0x0194,
|
||||
|
||||
INPUT_CONS_AC_SEARCH = 0x0221,
|
||||
INPUT_CONS_AC_GO_TO,
|
||||
INPUT_CONS_AC_HOME,
|
||||
INPUT_CONS_AC_BACK,
|
||||
INPUT_CONS_AC_FORWARD,
|
||||
INPUT_CONS_AC_STOP,
|
||||
INPUT_CONS_AC_REFRESH,
|
||||
|
||||
INPUT_CONS_AC_BOOKMARKS = 0x022A
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
24
include/minix/inputdriver.h
Normal file
24
include/minix/inputdriver.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef _MINIX_INPUTDRIVER_H
|
||||
#define _MINIX_INPUTDRIVER_H
|
||||
|
||||
#include <minix/driver.h>
|
||||
#include <minix/input.h>
|
||||
|
||||
/* Entry points into the device dependent code of input drivers. */
|
||||
struct inputdriver {
|
||||
void (*idr_leds)(unsigned int leds);
|
||||
void (*idr_intr)(unsigned int mask);
|
||||
void (*idr_alarm)(clock_t stamp);
|
||||
void (*idr_other)(message *m_ptr, int ipc_status);
|
||||
};
|
||||
|
||||
/* Functions defined by libinputdriver. */
|
||||
void inputdriver_announce(unsigned int type);
|
||||
void inputdriver_send_event(int mouse, unsigned short page,
|
||||
unsigned short code, int value, int flags);
|
||||
void inputdriver_process(struct inputdriver *idp, message *m_ptr,
|
||||
int ipc_status);
|
||||
void inputdriver_terminate(void);
|
||||
void inputdriver_task(struct inputdriver *idp);
|
||||
|
||||
#endif /* !_MINIX_INPUTDRIVER_H */
|
|
@ -3,21 +3,31 @@
|
|||
#ifndef _SYS__KEYMAP_H
|
||||
#define _SYS__KEYMAP_H
|
||||
|
||||
#define K(k) [INPUT_KEY_ ## k] /* Map to key entry */
|
||||
|
||||
#define C(c) ((c) & 0x1F) /* Map to control code */
|
||||
#define A(c) ((c) | 0x80) /* Set eight bit (ALT) */
|
||||
#define CA(c) A(C(c)) /* Control-Alt */
|
||||
#define N(c) ((c) | HASNUM) /* Add "Num Lock has effect" attribute */
|
||||
#define L(c) ((c) | HASCAPS) /* Add "Caps Lock has effect" attribute */
|
||||
|
||||
#define EXT 0x0100 /* Normal function keys */
|
||||
#define CTRL 0x0200 /* Control key */
|
||||
#define SHIFT 0x0400 /* Shift key */
|
||||
#define ALT 0x0800 /* Alternate key */
|
||||
#define EXTKEY 0x1000 /* extended keycode */
|
||||
#define HASNUM 0x4000 /* Num Lock has effect */
|
||||
#define HASCAPS 0x8000 /* Caps Lock has effect */
|
||||
|
||||
/* Scan code conversion. */
|
||||
#define KEY_RELEASE 0200
|
||||
#define ASCII_MASK 0177
|
||||
/* The left and right versions for the actual keys in the keymap. */
|
||||
#define LCTRL CTRL
|
||||
#define RCTRL (CTRL | EXT)
|
||||
#define LSHIFT SHIFT
|
||||
#define RSHIFT (SHIFT | EXT)
|
||||
#define LALT ALT
|
||||
#define RALT (ALT | EXT)
|
||||
|
||||
/* Delete key */
|
||||
#define DEL 0177
|
||||
|
||||
/* Numeric keypad */
|
||||
#define HOME (0x01 + EXT)
|
||||
|
@ -29,10 +39,23 @@
|
|||
#define PGUP (0x07 + EXT)
|
||||
#define PGDN (0x08 + EXT)
|
||||
#define MID (0x09 + EXT)
|
||||
#define NMIN (0x0A + EXT)
|
||||
#define PLUS (0x0B + EXT)
|
||||
/* UNUSED (0x0A + EXT) */
|
||||
/* UNUSED (0x0B + EXT) */
|
||||
#define INSRT (0x0C + EXT)
|
||||
|
||||
/* Keys affected by Num Lock */
|
||||
#define NHOME N(HOME)
|
||||
#define NEND N(END)
|
||||
#define NUP N(UP)
|
||||
#define NDOWN N(DOWN)
|
||||
#define NLEFT N(LEFT)
|
||||
#define NRIGHT N(RIGHT)
|
||||
#define NPGUP N(PGUP)
|
||||
#define NPGDN N(PGDN)
|
||||
#define NMID N(MID)
|
||||
#define NINSRT N(INSRT)
|
||||
#define NDEL N(DEL)
|
||||
|
||||
/* Alt + Numeric keypad */
|
||||
#define AHOME (0x01 + ALT)
|
||||
#define AEND (0x02 + ALT)
|
||||
|
@ -43,7 +66,7 @@
|
|||
#define APGUP (0x07 + ALT)
|
||||
#define APGDN (0x08 + ALT)
|
||||
#define AMID (0x09 + ALT)
|
||||
#define ANMIN (0x0A + ALT)
|
||||
#define AMIN (0x0A + ALT)
|
||||
#define APLUS (0x0B + ALT)
|
||||
#define AINSRT (0x0C + ALT)
|
||||
|
||||
|
@ -57,7 +80,7 @@
|
|||
#define CPGUP (0x07 + CTRL)
|
||||
#define CPGDN (0x08 + CTRL)
|
||||
#define CMID (0x09 + CTRL)
|
||||
#define CNMIN (0x0A + CTRL)
|
||||
#define CMIN (0x0A + CTRL)
|
||||
#define CPLUS (0x0B + CTRL)
|
||||
#define CINSRT (0x0C + CTRL)
|
||||
|
||||
|
@ -137,9 +160,9 @@
|
|||
#define ASF12 (0x1B + ALT + SHIFT)
|
||||
|
||||
#define MAP_COLS 6 /* Number of columns in keymap */
|
||||
#define NR_SCAN_CODES 0x80 /* Number of scan codes (rows in keymap) */
|
||||
#define NR_SCAN_CODES 0xE8 /* Number of scan codes (rows in keymap) */
|
||||
|
||||
typedef unsigned short keymap_t[NR_SCAN_CODES * MAP_COLS];
|
||||
typedef uint16_t keymap_t[NR_SCAN_CODES][MAP_COLS];
|
||||
|
||||
#define KEY_MAGIC "KMAZ" /* Magic number of keymap file */
|
||||
|
||||
|
|
|
@ -137,7 +137,6 @@ int tcsetattr(int _filedes, int _opt_actions, const struct termios
|
|||
|
||||
/* Extensions to the termios c_iflag bit map. */
|
||||
#define IXANY 0x0800 /* allow any key to continue ouptut */
|
||||
#define SCANCODES 0x1000 /* send scancodes */
|
||||
|
||||
/* Extensions to the termios c_oflag bit map. They are only active iff
|
||||
* OPOST is enabled. */
|
||||
|
|
|
@ -43,7 +43,7 @@ SUBDIR+= libcompat_minix libblockdriver libchardriver \
|
|||
libexec libdevman libusb libasyn librmt \
|
||||
libddekit libminixfs libbdev libelf libminc libcrypt libterminfo \
|
||||
libutil libbz2 libprop \
|
||||
libpuffs libsffs
|
||||
libpuffs libsffs libinputdriver
|
||||
|
||||
.if (${MKLWIP} == "yes")
|
||||
SUBDIR += liblwip libnetsock
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This file contains the device independent character driver interface.
|
||||
*
|
||||
* Charaxter drivers support the following requests. Message format m10 is
|
||||
* Character drivers support the following requests. Message format m10 is
|
||||
* used. Field names are prefixed with CDEV_. Separate field names are used for
|
||||
* the "access", "ops", "user", and "request" fields.
|
||||
*
|
||||
|
@ -108,16 +108,16 @@ void chardriver_announce(void)
|
|||
*/
|
||||
#if USE_STATECTL
|
||||
if ((r = sys_statectl(SYS_STATE_CLEAR_IPC_REFS)) != OK)
|
||||
panic("chardriver_init: sys_statectl failed: %d", r);
|
||||
panic("chardriver_announce: sys_statectl failed: %d", r);
|
||||
#endif
|
||||
|
||||
/* Publish a driver up event. */
|
||||
if ((r = ds_retrieve_label_name(label, getprocnr())) != OK)
|
||||
panic("chardriver_init: unable to get own label: %d", r);
|
||||
panic("chardriver_announce: unable to get own label: %d", r);
|
||||
|
||||
snprintf(key, DS_MAX_KEYLEN, "%s%s", driver_prefix, label);
|
||||
if ((r = ds_publish_u32(key, DS_DRIVER_UP, DSF_OVERWRITE)) != OK)
|
||||
panic("chardriver_init: unable to publish driver up event: %d", r);
|
||||
panic("chardriver_announce: unable to publish driver up event: %d", r);
|
||||
|
||||
/* Expect an open for any device before serving regular driver requests. */
|
||||
clear_open_devs();
|
||||
|
@ -522,21 +522,21 @@ void chardriver_terminate(void)
|
|||
*===========================================================================*/
|
||||
void chardriver_task(struct chardriver *cdp)
|
||||
{
|
||||
/* Main program of any device driver task. */
|
||||
/* Main program of any character device driver task. */
|
||||
int r, ipc_status;
|
||||
message mess;
|
||||
|
||||
running = TRUE;
|
||||
|
||||
/* Here is the main loop of the disk task. It waits for a message, carries
|
||||
* it out, and sends a reply.
|
||||
/* Here is the main loop of the character driver task. It waits for a
|
||||
* message, carries it out, and sends a reply.
|
||||
*/
|
||||
while (running) {
|
||||
if ((r = sef_receive_status(ANY, &mess, &ipc_status)) != OK) {
|
||||
if (r == EINTR && !running)
|
||||
break;
|
||||
|
||||
panic("driver_receive failed: %d", r);
|
||||
panic("chardriver: sef_receive_status failed: %d", r);
|
||||
}
|
||||
|
||||
chardriver_process(cdp, &mess, ipc_status);
|
||||
|
|
8
lib/libinputdriver/Makefile
Normal file
8
lib/libinputdriver/Makefile
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Makefile for libinputdriver
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= inputdriver
|
||||
|
||||
SRCS= inputdriver.c
|
||||
|
||||
.include <bsd.lib.mk>
|
206
lib/libinputdriver/inputdriver.c
Normal file
206
lib/libinputdriver/inputdriver.c
Normal file
|
@ -0,0 +1,206 @@
|
|||
/* This file contains the device independent input driver interface. */
|
||||
/*
|
||||
* Changes:
|
||||
* Sep 22, 2013 created (D.C. van Moolenbroek)
|
||||
*/
|
||||
|
||||
#include <minix/drivers.h>
|
||||
#include <minix/inputdriver.h>
|
||||
#include <minix/ds.h>
|
||||
|
||||
static endpoint_t input_endpt = NONE;
|
||||
static int kbd_id = INVALID_INPUT_ID;
|
||||
static int mouse_id = INVALID_INPUT_ID;
|
||||
|
||||
static int running;
|
||||
|
||||
/*
|
||||
* Announce that we are up after a fresh start or restart.
|
||||
*/
|
||||
void
|
||||
inputdriver_announce(unsigned int type)
|
||||
{
|
||||
const char *driver_prefix = "drv.inp.";
|
||||
char key[DS_MAX_KEYLEN];
|
||||
char label[DS_MAX_KEYLEN];
|
||||
int r;
|
||||
|
||||
/* Publish a driver up event. */
|
||||
if ((r = ds_retrieve_label_name(label, getprocnr())) != OK)
|
||||
panic("libinputdriver: unable to retrieve own label: %d", r);
|
||||
|
||||
snprintf(key, sizeof(key), "%s%s", driver_prefix, label);
|
||||
if ((r = ds_publish_u32(key, type, DSF_OVERWRITE)) != OK)
|
||||
panic("libinputdriver: unable to publish up event: %d", r);
|
||||
|
||||
/* Now we wait for the input server to contact us. */
|
||||
}
|
||||
|
||||
/*
|
||||
* Send an event to the input server.
|
||||
*/
|
||||
void
|
||||
inputdriver_send_event(int mouse, unsigned short page, unsigned short code,
|
||||
int value, int flags)
|
||||
{
|
||||
message m;
|
||||
int id;
|
||||
|
||||
if (input_endpt == NONE)
|
||||
return;
|
||||
|
||||
id = mouse ? mouse_id : kbd_id;
|
||||
if (id == INVALID_INPUT_ID)
|
||||
return;
|
||||
|
||||
memset(&m, 0, sizeof(m));
|
||||
|
||||
m.m_type = INPUT_EVENT;
|
||||
m.INPUT_ID = id;
|
||||
m.INPUT_PAGE = page;
|
||||
m.INPUT_CODE = code;
|
||||
m.INPUT_VALUE = value;
|
||||
m.INPUT_FLAGS = flags;
|
||||
|
||||
/*
|
||||
* Use a blocking send call, for two reasons. First, this avoids the
|
||||
* situation that we ever end up queuing too many asynchronous messages
|
||||
* to the input server. Second, it allows us to detect trivially if
|
||||
* the input server has crashed, in which case we should stop sending
|
||||
* more messages to it.
|
||||
*/
|
||||
if (send(input_endpt, &m) != OK)
|
||||
input_endpt = NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* The input server requests that we configure the driver. This request should
|
||||
* be sent to us once, although it may be sent multiple times if the input
|
||||
* server crashes and recovers. The configuration consists of device IDs for
|
||||
* use in keyboard and/or mouse events, one per each device type.
|
||||
*/
|
||||
static void
|
||||
do_conf(message *m_ptr)
|
||||
{
|
||||
endpoint_t ep;
|
||||
int r;
|
||||
|
||||
/* Make sure that the sender is actually the input server. */
|
||||
if ((r = ds_retrieve_label_endpt("input", &ep)) != OK) {
|
||||
printf("libinputdriver: unable to get input endpoint (%d)\n",
|
||||
r);
|
||||
|
||||
return; /* ignore message */
|
||||
}
|
||||
|
||||
if (ep != m_ptr->m_source) {
|
||||
printf("libinputdriver: ignoring CONF request from %u\n",
|
||||
m_ptr->m_source);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Save the new state. */
|
||||
input_endpt = m_ptr->m_source;
|
||||
kbd_id = m_ptr->INPUT_KBD_ID;
|
||||
mouse_id = m_ptr->INPUT_MOUSE_ID;
|
||||
|
||||
/* If the input server is "full" there's nothing for us to do. */
|
||||
if (kbd_id == INVALID_INPUT_ID && mouse_id == INVALID_INPUT_ID)
|
||||
printf("libinputdriver: no IDs given, driver disabled\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* The input server is telling us to change the LEDs to a particular mask.
|
||||
* For now this is for keyboards only, so no device type is provided.
|
||||
* This approach was chosen over sending toggle events for the individual LEDs
|
||||
* for convenience reasons only.
|
||||
*/
|
||||
static void
|
||||
do_setleds(struct inputdriver *idp, message *m_ptr)
|
||||
{
|
||||
unsigned int mask;
|
||||
|
||||
if (m_ptr->m_source != input_endpt) {
|
||||
printf("libinputdriver: ignoring SETLEDS request from %u\n",
|
||||
m_ptr->m_source);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
mask = m_ptr->INPUT_LED_MASK;
|
||||
|
||||
if (idp->idr_leds)
|
||||
idp->idr_leds(mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Call the appropriate driver function, based on the type of message.
|
||||
* All messages in the input protocol are one-way, so we never send a reply.
|
||||
*/
|
||||
void
|
||||
inputdriver_process(struct inputdriver *idp, message *m_ptr, int ipc_status)
|
||||
{
|
||||
/* Check for notifications first. */
|
||||
if (is_ipc_notify(ipc_status)) {
|
||||
switch (_ENDPOINT_P(m_ptr->m_source)) {
|
||||
case HARDWARE:
|
||||
if (idp->idr_intr)
|
||||
idp->idr_intr(m_ptr->NOTIFY_ARG);
|
||||
break;
|
||||
|
||||
case CLOCK:
|
||||
if (idp->idr_alarm)
|
||||
idp->idr_alarm(m_ptr->NOTIFY_TIMESTAMP);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (idp->idr_other)
|
||||
idp->idr_other(m_ptr, ipc_status);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (m_ptr->m_type) {
|
||||
case INPUT_CONF: do_conf(m_ptr); break;
|
||||
case INPUT_SETLEDS: do_setleds(idp, m_ptr); break;
|
||||
default:
|
||||
if (idp->idr_other)
|
||||
idp->idr_other(m_ptr, ipc_status);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Break out of the main loop after finishing the current request.
|
||||
*/
|
||||
void
|
||||
inputdriver_terminate(void)
|
||||
{
|
||||
running = FALSE;
|
||||
|
||||
sef_cancel();
|
||||
}
|
||||
|
||||
/*
|
||||
* Main program of any input driver task.
|
||||
*/
|
||||
void
|
||||
inputdriver_task(struct inputdriver *idp)
|
||||
{
|
||||
message m;
|
||||
int r, ipc_status;
|
||||
|
||||
running = TRUE;
|
||||
|
||||
while (running) {
|
||||
if ((r = sef_receive_status(ANY, &m, &ipc_status)) != OK) {
|
||||
if (r == EINTR && !running)
|
||||
break;
|
||||
|
||||
panic("libinputdriver: receive failed: %d", r);
|
||||
}
|
||||
|
||||
inputdriver_process(idp, &m, ipc_status);
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@ SRCS+= \
|
|||
getticks.c \
|
||||
getsysinfo.c \
|
||||
getuptime.c \
|
||||
input.c \
|
||||
kernel_call.c \
|
||||
kprintf.c \
|
||||
kputc.c \
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#include "syslib.h"
|
||||
#include <minix/sysutil.h>
|
||||
/*****************************************************************************
|
||||
* tty_inject_event *
|
||||
*****************************************************************************/
|
||||
int tty_inject_event(type, code, val)
|
||||
int type;
|
||||
int code;
|
||||
int val;
|
||||
{
|
||||
message msg;
|
||||
msg.INPUT_TYPE = type;
|
||||
msg.INPUT_CODE = code;
|
||||
msg.INPUT_VALUE = val;
|
||||
|
||||
return send(TTY_PROC_NR, &msg);
|
||||
}
|
|
@ -20,7 +20,6 @@
|
|||
#include <minix/com.h>
|
||||
#include <minix/syslib.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/bitmap.h>
|
||||
#include <minix/vfsif.h>
|
||||
#include <minix/endpoint.h>
|
||||
|
|
|
@ -315,30 +315,6 @@ is set a break is input as a single '\e0', or if
|
|||
.B PARMRK
|
||||
is set as '\e377', '\e0', '\e0'.
|
||||
(Breaks are always ignored.)
|
||||
.TP
|
||||
.B SCANCODES
|
||||
Send input as keyboard scancodes rather than processed ASCII characters. This
|
||||
flag only applies to consoles; to check whether the flag is supported use the
|
||||
.B tcgetattr
|
||||
function after setting it and test whether
|
||||
.B c_iflag
|
||||
still contains the
|
||||
.B SCANCODES
|
||||
flag. Scancodes are provided directly and without any processing. As a
|
||||
consequence, the
|
||||
.B ISTRIP
|
||||
,
|
||||
.B IGNCR
|
||||
,
|
||||
.B ICRNL
|
||||
,
|
||||
.B INLCR
|
||||
,
|
||||
.B ICANON
|
||||
and
|
||||
.B IEXTEN
|
||||
flags no longer influence input if this flag is specified. However, they may
|
||||
still influence echoing if enabled. (MINIX 3 specific.)
|
||||
.SS "Output Modes"
|
||||
The
|
||||
.B c_oflag
|
||||
|
|
|
@ -9,8 +9,9 @@ is the compressed mapping from keyboard scan codes to ASCII.
|
|||
It is made from a keymap source file consisting of MAP_COLS columns
|
||||
(MINIX assigns the value 6 to MAX_COLS, corresponding to key pressed,
|
||||
key+SHIFT, key+LEFT_ALT, key+RIGHT_ALT, key+ALT+SHIFT and key+CTRL) and
|
||||
NR_SCAN_CODES rows (MINIX assigns the value 0x80 to NR_SCAN_CODES,
|
||||
corresponding to the number of scan codes to be provided by the keyboard),
|
||||
NR_SCAN_CODES rows (MINIX assigns the value 0xE8 to NR_SCAN_CODES,
|
||||
corresponding to the range of defined USB HID key codes, which is the
|
||||
set of key codes that is to be provided by all keyboard drivers),
|
||||
and each element is 2 bytes in length (see u16_t in type definitions).
|
||||
The low order byte corresponds to the character represented by the scan
|
||||
code, and the high order byte corresponds to the special meaning (when
|
||||
|
@ -25,8 +26,20 @@ utility.
|
|||
and
|
||||
.B u16_t
|
||||
types, corresponding to 8 and 16 bit values.
|
||||
.SS "Keys: <minix/input.h>"
|
||||
This header file contains the list of keys, prefixed by a
|
||||
.B INPUT_KEY_
|
||||
prefix. The
|
||||
.B K
|
||||
macro (see below) automatically adds the
|
||||
.B INPUT_KEY_
|
||||
prefix to the given key name. Input types from pages other than the key page
|
||||
are not supported by TTY.
|
||||
.SS "Macros: <minix/keymap.h>"
|
||||
.TP
|
||||
.BI "K(" k ") - Key"
|
||||
Maps to the entry for the key in the bitmap
|
||||
.TP
|
||||
.BI "C(" c ") - Control"
|
||||
Maps to control code
|
||||
.TP
|
||||
|
@ -49,17 +62,22 @@ The
|
|||
.BI "L(" c ")"
|
||||
macro is used in column 0 to tell that the Caps Lock key is active for this
|
||||
key. (Caps Lock should only have effect on letters.)
|
||||
Similarly, some keys in column 0 have a
|
||||
.B N
|
||||
prefix to indicate that they are affected by the Num Lock key.
|
||||
.SS "Definitions: <minix/keymap.h>"
|
||||
<minix/keymap.h> contains a large number of definitions for special keys,
|
||||
like function keys, and keys on the numeric keypad. They are:
|
||||
.PP
|
||||
Escape key and modifiers:
|
||||
.BR EXT ,
|
||||
.BR CTRL ,
|
||||
.BR SHIFT ,
|
||||
.BR ALT .
|
||||
Modifier keys:
|
||||
.BR LCTRL ,
|
||||
.BR RCTRL ,
|
||||
.BR LSHIFT ,
|
||||
.BR RSHIFT ,
|
||||
.BR LALT ,
|
||||
.BR RALT .
|
||||
.PP
|
||||
Numeric keypad keys:
|
||||
Special keys:
|
||||
.BR HOME ,
|
||||
.BR END ,
|
||||
.BR UP ,
|
||||
|
@ -69,8 +87,16 @@ Numeric keypad keys:
|
|||
.BR PGUP ,
|
||||
.BR PGDN ,
|
||||
.BR MID " (numeric '5'),"
|
||||
.BR MIN " (only with " A " or " C " prefix),"
|
||||
.BR PLUS ,
|
||||
.BR INSRT .
|
||||
.BR INSRT ,
|
||||
.BR DEL .
|
||||
.PP
|
||||
Special keys affected by Num Lock:
|
||||
.BR NHOME ,
|
||||
.BR NEND ", ..."
|
||||
.BR NINSRT ,
|
||||
.BR NDEL .
|
||||
.PP
|
||||
ALT + numpad key:
|
||||
.BR AHOME ,
|
||||
|
@ -107,15 +133,6 @@ ALT - SHIFT - function key:
|
|||
.BR ASF1 ", ...,"
|
||||
.BR ASF12 .
|
||||
.PP
|
||||
There is one key definition that isn't a key at all:
|
||||
.BR EXTKEY .
|
||||
This keycode is sent by the keyboard as an indicator that the next keycode
|
||||
is special. For instance both ALT keys have the same keycode, but the right
|
||||
ALT key is sent by the keyboard preceded by the EXTKEY keycode. The same is
|
||||
true for the '/' key on the numeric pad versus the other '/' key on the US
|
||||
keyboard. (On other keyboards this key may have a different symbol.) The
|
||||
keyboard driver knows that a different key is presses if it is preceded by
|
||||
EXTKEY.
|
||||
.SS "Creating/changing keyboard mapping"
|
||||
You can create your own keyboard mapping by copying one of the existing
|
||||
keymap source files (Standard Minix:
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
.if ${MKIMAGEONLY} == "yes"
|
||||
|
||||
SUBDIR= ds init mfs pfs pm rs sched vfs vm
|
||||
SUBDIR= ds init input mfs pfs pm rs sched vfs vm
|
||||
|
||||
.else
|
||||
|
||||
SUBDIR= ds ext2 inet init ipc is iso9660fs \
|
||||
SUBDIR= ds ext2 inet init input ipc is iso9660fs \
|
||||
mfs pfs pm procfs rs sched vfs vm devman
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <minix/syslib.h>
|
||||
#include <minix/sysinfo.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/bitmap.h>
|
||||
#include <minix/rs.h>
|
||||
|
||||
|
|
14
servers/input/Makefile
Normal file
14
servers/input/Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Makefile for the input server
|
||||
|
||||
PROG= input
|
||||
SRCS= input.c
|
||||
|
||||
DPADD+= ${LIBCHARDRIVER} ${LIBSYS}
|
||||
LDADD+= -lchardriver -lsys
|
||||
|
||||
MAN=
|
||||
|
||||
BINDIR?= /sbin
|
||||
|
||||
.include <minix.service.mk>
|
||||
|
696
servers/input/input.c
Normal file
696
servers/input/input.c
Normal file
|
@ -0,0 +1,696 @@
|
|||
/* Keyboard/mouse input server. */
|
||||
#include <minix/drivers.h>
|
||||
#include <minix/chardriver.h>
|
||||
#include <minix/ds.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/kbdio.h>
|
||||
|
||||
#include "input.h"
|
||||
|
||||
#define INPUT_DEBUG 0
|
||||
|
||||
static int input_open(devminor_t, int, endpoint_t);
|
||||
static int input_close(devminor_t);
|
||||
static ssize_t input_read(devminor_t, u64_t, endpoint_t, cp_grant_id_t, size_t,
|
||||
int, cdev_id_t);
|
||||
static int input_ioctl(devminor_t, unsigned long, endpoint_t, cp_grant_id_t,
|
||||
int, endpoint_t, cdev_id_t);
|
||||
static int input_cancel(devminor_t, endpoint_t, cdev_id_t);
|
||||
static int input_select(devminor_t, unsigned int, endpoint_t);
|
||||
static void input_other(message *, int);
|
||||
|
||||
static struct input_dev devs[INPUT_DEV_MAX];
|
||||
|
||||
#define input_dev_active(dev) ((dev)->owner != NONE || \
|
||||
(dev)->minor == KBDMUX_MINOR || \
|
||||
(dev)->minor == MOUSEMUX_MINOR)
|
||||
#define input_dev_buf_empty(dev) ((dev)->count == 0)
|
||||
#define input_dev_buf_full(dev) ((dev)->count == EVENTBUF_SIZE)
|
||||
|
||||
/* Entry points to the input driver. */
|
||||
static struct chardriver input_tab = {
|
||||
.cdr_open = input_open,
|
||||
.cdr_close = input_close,
|
||||
.cdr_read = input_read,
|
||||
.cdr_ioctl = input_ioctl,
|
||||
.cdr_cancel = input_cancel,
|
||||
.cdr_select = input_select,
|
||||
.cdr_other = input_other
|
||||
};
|
||||
|
||||
/*
|
||||
* Map a minor number to an input device structure.
|
||||
*/
|
||||
static struct input_dev *
|
||||
input_map(devminor_t minor)
|
||||
{
|
||||
/*
|
||||
* The minor device numbers were chosen not to be equal to the array
|
||||
* slots, so that more keyboards can be added without breaking backward
|
||||
* compatibility later.
|
||||
*/
|
||||
if (minor == KBDMUX_MINOR)
|
||||
return &devs[KBDMUX_DEV];
|
||||
else if (minor >= KBD0_MINOR && minor < KBD0_MINOR + KBD_MINORS)
|
||||
return &devs[FIRST_KBD_DEV + (minor - KBD0_MINOR)];
|
||||
else if (minor == MOUSEMUX_MINOR)
|
||||
return &devs[MOUSEMUX_DEV];
|
||||
else if (minor >= MOUSE0_MINOR && minor < MOUSE0_MINOR + MOUSE_MINORS)
|
||||
return &devs[FIRST_MOUSE_DEV + (minor - MOUSE0_MINOR)];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Map an input device structure index to a minor number.
|
||||
*/
|
||||
static devminor_t
|
||||
input_revmap(int id)
|
||||
{
|
||||
if (id == KBDMUX_DEV)
|
||||
return KBDMUX_MINOR;
|
||||
else if (id >= FIRST_KBD_DEV && id <= LAST_KBD_DEV)
|
||||
return KBD0_MINOR + (id - FIRST_KBD_DEV);
|
||||
else if (id == MOUSEMUX_DEV)
|
||||
return MOUSEMUX_MINOR;
|
||||
else if (id >= FIRST_MOUSE_DEV && id <= LAST_MOUSE_DEV)
|
||||
return MOUSE0_MINOR + (id - FIRST_MOUSE_DEV);
|
||||
else
|
||||
panic("reverse-mapping invalid ID %d", id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Open an input device.
|
||||
*/
|
||||
static int
|
||||
input_open(devminor_t minor, int UNUSED(access), endpoint_t UNUSED(user_endpt))
|
||||
{
|
||||
struct input_dev *input_dev;
|
||||
|
||||
if ((input_dev = input_map(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
if (!input_dev_active(input_dev))
|
||||
return ENXIO;
|
||||
|
||||
if (input_dev->opened)
|
||||
return EBUSY;
|
||||
|
||||
input_dev->opened = TRUE;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close an input device.
|
||||
*/
|
||||
static int
|
||||
input_close(devminor_t minor)
|
||||
{
|
||||
struct input_dev *input_dev;
|
||||
|
||||
if ((input_dev = input_map(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
if (!input_dev->opened) {
|
||||
printf("INPUT: closing already-closed device %d\n", minor);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
input_dev->opened = FALSE;
|
||||
input_dev->tail = 0;
|
||||
input_dev->count = 0;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy input events to a reader.
|
||||
*/
|
||||
static ssize_t
|
||||
input_copy_events(endpoint_t endpt, cp_grant_id_t grant,
|
||||
unsigned int event_count, struct input_dev *input_dev)
|
||||
{
|
||||
int r, nbytes, wrap_left;
|
||||
size_t event_size = sizeof(*input_dev->eventbuf);
|
||||
|
||||
if (input_dev->count < event_count)
|
||||
panic("input_copy_events: not enough input is ready");
|
||||
|
||||
wrap_left = input_dev->tail + event_count - EVENTBUF_SIZE;
|
||||
nbytes = (wrap_left <= 0 ? event_count :
|
||||
EVENTBUF_SIZE - input_dev->tail) * event_size;
|
||||
|
||||
if ((r = sys_safecopyto(endpt, grant, 0,
|
||||
(vir_bytes)(input_dev->eventbuf + input_dev->tail), nbytes)) != OK)
|
||||
return r;
|
||||
|
||||
/* Copy possible remaining part if we wrap over. */
|
||||
if (wrap_left > 0 && (r = sys_safecopyto(endpt, grant, nbytes,
|
||||
(vir_bytes) input_dev->eventbuf, wrap_left * event_size)) != OK)
|
||||
return r;
|
||||
|
||||
input_dev->tail = (input_dev->tail + event_count) % EVENTBUF_SIZE;
|
||||
input_dev->count -= event_count;
|
||||
|
||||
return event_size * event_count; /* bytes copied */
|
||||
}
|
||||
|
||||
/*
|
||||
* Read from an input device.
|
||||
*/
|
||||
static ssize_t
|
||||
input_read(devminor_t minor, u64_t UNUSED(position), endpoint_t endpt,
|
||||
cp_grant_id_t grant, size_t size, int flags, cdev_id_t id)
|
||||
{
|
||||
unsigned int event_count;
|
||||
struct input_dev *input_dev;
|
||||
|
||||
if ((input_dev = input_map(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
/* We cannot accept more than one pending read request at once. */
|
||||
if (!input_dev_active(input_dev) || input_dev->suspended)
|
||||
return EIO;
|
||||
|
||||
/* The caller's buffer must have room for at least one whole event. */
|
||||
event_count = size / sizeof(*input_dev->eventbuf);
|
||||
if (event_count == 0)
|
||||
return EIO;
|
||||
|
||||
/* No data available? Suspend the caller, unless we shouldn't block. */
|
||||
if (input_dev_buf_empty(input_dev)) {
|
||||
if (flags & CDEV_NONBLOCK)
|
||||
return EAGAIN;
|
||||
|
||||
input_dev->suspended = TRUE;
|
||||
input_dev->caller = endpt;
|
||||
input_dev->grant = grant;
|
||||
input_dev->req_id = id;
|
||||
|
||||
/* We should now wake up any selector, but that's lame.. */
|
||||
return EDONTREPLY;
|
||||
}
|
||||
|
||||
if (event_count > input_dev->count)
|
||||
event_count = input_dev->count;
|
||||
|
||||
return input_copy_events(endpt, grant, event_count, input_dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set keyboard LEDs on one or all keyboards.
|
||||
*/
|
||||
static void
|
||||
input_set_leds(devminor_t minor, unsigned int mask)
|
||||
{
|
||||
struct input_dev *dev;
|
||||
message m;
|
||||
int i, r;
|
||||
|
||||
/* Prepare the request message */
|
||||
memset(&m, 0, sizeof(m));
|
||||
|
||||
m.m_type = INPUT_SETLEDS;
|
||||
m.INPUT_LED_MASK = mask;
|
||||
|
||||
/*
|
||||
* Send the request to all matching keyboard devices. As side effect,
|
||||
* this approach discards the request on mouse devices.
|
||||
*/
|
||||
for (i = FIRST_KBD_DEV; i <= LAST_KBD_DEV; i++) {
|
||||
dev = &devs[i];
|
||||
|
||||
if (minor != KBDMUX_MINOR && minor != dev->minor)
|
||||
continue;
|
||||
|
||||
/* Save the new state; the driver might (re)start later. */
|
||||
dev->leds = mask;
|
||||
|
||||
if (dev->owner != NONE) {
|
||||
if ((r = asynsend3(dev->owner, &m, AMF_NOREPLY)) != OK)
|
||||
printf("INPUT: asynsend to %u failed (%d)\n",
|
||||
dev->owner, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Process an IOCTL request.
|
||||
*/
|
||||
static int
|
||||
input_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant, int flags, endpoint_t user_endpt, cdev_id_t id)
|
||||
{
|
||||
struct input_dev *input_dev;
|
||||
kio_leds_t leds;
|
||||
unsigned int mask;
|
||||
int r;
|
||||
|
||||
if ((input_dev = input_map(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
if (!input_dev_active(input_dev))
|
||||
return EIO;
|
||||
|
||||
switch (request) {
|
||||
case KIOCSLEDS:
|
||||
if ((r = sys_safecopyfrom(endpt, grant, 0, (vir_bytes) &leds,
|
||||
sizeof(leds))) != OK)
|
||||
return r;
|
||||
|
||||
mask = 0;
|
||||
if (leds.kl_bits & KBD_LEDS_NUM)
|
||||
mask |= (1 << INPUT_LED_NUMLOCK);
|
||||
if (leds.kl_bits & KBD_LEDS_CAPS)
|
||||
mask |= (1 << INPUT_LED_CAPSLOCK);
|
||||
if (leds.kl_bits & KBD_LEDS_SCROLL)
|
||||
mask |= (1 << INPUT_LED_SCROLLLOCK);
|
||||
|
||||
input_set_leds(minor, mask);
|
||||
|
||||
return OK;
|
||||
|
||||
default:
|
||||
return ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Cancel a suspended read request.
|
||||
*/
|
||||
static int
|
||||
input_cancel(devminor_t minor, endpoint_t endpt, cdev_id_t id)
|
||||
{
|
||||
struct input_dev *input_dev;
|
||||
|
||||
if ((input_dev = input_map(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
if (input_dev->suspended && input_dev->caller == endpt &&
|
||||
input_dev->req_id == id) {
|
||||
input_dev->suspended = FALSE;
|
||||
|
||||
return EINTR;
|
||||
}
|
||||
|
||||
return EDONTREPLY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform a select call on an input device.
|
||||
*/
|
||||
static int
|
||||
input_select(devminor_t minor, unsigned int ops, endpoint_t endpt)
|
||||
{
|
||||
struct input_dev *input_dev;
|
||||
int ready_ops;
|
||||
|
||||
if ((input_dev = input_map(minor)) == NULL)
|
||||
return ENXIO;
|
||||
|
||||
ready_ops = 0;
|
||||
|
||||
if (ops & CDEV_OP_RD) {
|
||||
if (!input_dev_active(input_dev) || input_dev->suspended)
|
||||
ready_ops |= CDEV_OP_RD; /* immediate error */
|
||||
else if (!input_dev_buf_empty(input_dev))
|
||||
ready_ops |= CDEV_OP_RD; /* data available */
|
||||
else if (ops & CDEV_NOTIFY)
|
||||
input_dev->selector = endpt; /* report later */
|
||||
}
|
||||
|
||||
if (ops & CDEV_OP_WR) ready_ops |= CDEV_OP_WR; /* immediate error */
|
||||
|
||||
return ready_ops;
|
||||
}
|
||||
|
||||
/*
|
||||
* An input device receives an input event. Enqueue it, and possibly unsuspend
|
||||
* a read request or wake up a selector.
|
||||
*/
|
||||
static void
|
||||
input_process(struct input_dev *input_dev, const message *m)
|
||||
{
|
||||
unsigned int next;
|
||||
int r;
|
||||
|
||||
if (input_dev_buf_full(input_dev)) {
|
||||
/* Overflow. Overwrite the oldest event. */
|
||||
input_dev->tail = (input_dev->tail + 1) % EVENTBUF_SIZE;
|
||||
input_dev->count--;
|
||||
|
||||
#if INPUT_DEBUG
|
||||
printf("INPUT: overflow on device %u\n", input_dev - devs);
|
||||
#endif
|
||||
}
|
||||
next = (input_dev->tail + input_dev->count) % EVENTBUF_SIZE;
|
||||
input_dev->eventbuf[next].page = m->INPUT_PAGE;
|
||||
input_dev->eventbuf[next].code = m->INPUT_CODE;
|
||||
input_dev->eventbuf[next].value = m->INPUT_VALUE;
|
||||
input_dev->eventbuf[next].flags = m->INPUT_FLAGS;
|
||||
input_dev->eventbuf[next].devid = m->INPUT_ID;
|
||||
input_dev->eventbuf[next].rsvd[0] = 0;
|
||||
input_dev->eventbuf[next].rsvd[1] = 0;
|
||||
input_dev->count++;
|
||||
|
||||
/*
|
||||
* There is new input. Revive a suspended reader if there was one.
|
||||
* Otherwise see if we should reply to a select query.
|
||||
*/
|
||||
if (input_dev->suspended) {
|
||||
r = input_copy_events(input_dev->caller, input_dev->grant, 1,
|
||||
input_dev);
|
||||
chardriver_reply_task(input_dev->caller, input_dev->req_id, r);
|
||||
input_dev->suspended = FALSE;
|
||||
} else if (input_dev->selector != NONE) {
|
||||
chardriver_reply_select(input_dev->selector, input_dev->minor,
|
||||
CDEV_OP_RD);
|
||||
input_dev->selector = NONE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* An input event has arrived from a driver.
|
||||
*/
|
||||
static void
|
||||
input_event(message *m)
|
||||
{
|
||||
struct input_dev *input_dev, *mux_dev;
|
||||
int r, id;
|
||||
|
||||
/* Unlike minor numbers, device IDs are in fact array indices. */
|
||||
id = m->INPUT_ID;
|
||||
if (id < 0 || id >= INPUT_DEV_MAX)
|
||||
return;
|
||||
|
||||
/* The sender must owner the device. */
|
||||
input_dev = &devs[id];
|
||||
if (input_dev->owner != m->m_source)
|
||||
return;
|
||||
|
||||
/* Input events are also delivered to the respective multiplexer. */
|
||||
if (input_dev->minor >= KBD0_MINOR &&
|
||||
input_dev->minor < KBD0_MINOR + KBD_MINORS)
|
||||
mux_dev = &devs[KBDMUX_DEV];
|
||||
else
|
||||
mux_dev = &devs[MOUSEMUX_DEV];
|
||||
|
||||
/*
|
||||
* Try to deliver the event to the input device or otherwise the
|
||||
* corresponding multiplexer. If neither are opened, forward the event
|
||||
* to TTY.
|
||||
*/
|
||||
if (input_dev->opened)
|
||||
input_process(input_dev, m);
|
||||
else if (mux_dev->opened)
|
||||
input_process(mux_dev, m);
|
||||
else {
|
||||
m->m_type = TTY_INPUT_EVENT;
|
||||
|
||||
if ((r = send(TTY_PROC_NR, m)) != OK)
|
||||
printf("INPUT: send to TTY failed (%d)\n", r);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate a device structure for an input driver of the given type, and
|
||||
* return its ID. If the given label already owns a device ID of the right
|
||||
* type, update that entry instead. If no device ID could be allocated, return
|
||||
* INVALID_INPUT_ID.
|
||||
*/
|
||||
static int
|
||||
input_alloc_id(int mouse, endpoint_t owner, const char *label)
|
||||
{
|
||||
int n, id, start, end;
|
||||
|
||||
if (!mouse) {
|
||||
start = FIRST_KBD_DEV;
|
||||
end = LAST_KBD_DEV;
|
||||
} else {
|
||||
start = FIRST_MOUSE_DEV;
|
||||
end = LAST_MOUSE_DEV;
|
||||
}
|
||||
|
||||
id = INVALID_INPUT_ID;
|
||||
for (n = start; n <= end; n++) {
|
||||
if (devs[n].owner != NONE) {
|
||||
if (!strcmp(devs[n].label, label)) {
|
||||
devs[n].owner = owner;
|
||||
return n;
|
||||
}
|
||||
/* Do not allocate the ID of a disconnected but open device. */
|
||||
} else if (!devs[n].opened && id == INVALID_INPUT_ID) {
|
||||
id = n;
|
||||
}
|
||||
}
|
||||
|
||||
if (id != INVALID_INPUT_ID) {
|
||||
devs[id].owner = owner;
|
||||
strlcpy(devs[id].label, label, sizeof(devs[id].label));
|
||||
|
||||
#if INPUT_DEBUG
|
||||
printf("INPUT: connected device %u to %u (%s)\n", id,
|
||||
owner, label);
|
||||
#endif
|
||||
} else {
|
||||
printf("INPUT: out of %s slots for new driver %d\n",
|
||||
mouse ? "mouse" : "keyboard", owner);
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register keyboard and/or a mouse devices for a driver.
|
||||
*/
|
||||
static void
|
||||
input_connect(endpoint_t owner, char *labelp, int typemask)
|
||||
{
|
||||
message m;
|
||||
char label[DS_MAX_KEYLEN];
|
||||
int r, kbd_id, mouse_id;
|
||||
|
||||
#if INPUT_DEBUG
|
||||
printf("INPUT: connect request from %u (%s) for mask %x\n", owner,
|
||||
labelp, typemask);
|
||||
#endif
|
||||
|
||||
/* Check the driver's label. */
|
||||
if ((r = ds_retrieve_label_name(label, owner)) != OK) {
|
||||
printf("INPUT: unable to get label for %u: %d\n", owner, r);
|
||||
return;
|
||||
}
|
||||
if (strcmp(label, labelp)) {
|
||||
printf("INPUT: ignoring driver %s label %s\n", label, labelp);
|
||||
return;
|
||||
}
|
||||
|
||||
kbd_id = INVALID_INPUT_ID;
|
||||
mouse_id = INVALID_INPUT_ID;
|
||||
|
||||
/*
|
||||
* We ignore allocation failures here, thus possibly sending invalid
|
||||
* IDs to the driver even for either or both the devices types it
|
||||
* requested. As a result, the driver will not send us input for these
|
||||
* device types, possibly effectively disabling the driver altogether.
|
||||
* Theoretically we could still admit events to the multiplexers for
|
||||
* such drivers, but that would lead to unexpected behavior with
|
||||
* respect to keyboard LEDs, for example.
|
||||
*/
|
||||
if (typemask & INPUT_DEV_KBD)
|
||||
kbd_id = input_alloc_id(FALSE /*mouse*/, owner, label);
|
||||
if (typemask & INPUT_DEV_MOUSE)
|
||||
mouse_id = input_alloc_id(TRUE /*mouse*/, owner, label);
|
||||
|
||||
memset(&m, 0, sizeof(m));
|
||||
|
||||
m.m_type = INPUT_CONF;
|
||||
m.INPUT_KBD_ID = kbd_id;
|
||||
m.INPUT_MOUSE_ID = mouse_id;
|
||||
m.INPUT_RSVD1_ID = INVALID_INPUT_ID; /* reserved (joystick?) */
|
||||
m.INPUT_RSVD2_ID = INVALID_INPUT_ID; /* reserved for future use */
|
||||
|
||||
if ((r = asynsend3(owner, &m, AMF_NOREPLY)) != OK)
|
||||
printf("INPUT: asynsend to %u failed (%d)\n", owner, r);
|
||||
|
||||
/* If a keyboard was registered, also set its initial LED state. */
|
||||
if (kbd_id != INVALID_INPUT_ID)
|
||||
input_set_leds(devs[kbd_id].minor, devs[kbd_id].leds);
|
||||
}
|
||||
|
||||
/*
|
||||
* Disconnect a device.
|
||||
*/
|
||||
static void
|
||||
input_disconnect(struct input_dev *input_dev)
|
||||
{
|
||||
#if INPUT_DEBUG
|
||||
printf("INPUT: disconnected device %u\n", input_dev - devs);
|
||||
#endif
|
||||
|
||||
if (input_dev->suspended) {
|
||||
chardriver_reply_task(input_dev->caller, input_dev->req_id,
|
||||
EIO);
|
||||
input_dev->suspended = FALSE;
|
||||
}
|
||||
|
||||
if (input_dev->selector != NONE) {
|
||||
chardriver_reply_select(input_dev->selector, input_dev->minor,
|
||||
CDEV_OP_RD);
|
||||
input_dev->selector = NONE;
|
||||
}
|
||||
|
||||
input_dev->owner = NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for driver status changes in the data store.
|
||||
*/
|
||||
static void
|
||||
input_check(void)
|
||||
{
|
||||
char key[DS_MAX_KEYLEN], *label;
|
||||
const char *driver_prefix = "drv.inp.";
|
||||
u32_t value;
|
||||
size_t len;
|
||||
int i, r, type;
|
||||
endpoint_t owner;
|
||||
|
||||
len = strlen(driver_prefix);
|
||||
|
||||
/* Check for new (input driver) entries. */
|
||||
while (ds_check(key, &type, &owner) == OK) {
|
||||
if ((r = ds_retrieve_u32(key, &value)) != OK) {
|
||||
printf("INPUT: ds_retrieve_u32 failed (%d)\n", r);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Only check for input driver registration events. */
|
||||
if (strncmp(key, driver_prefix, len))
|
||||
continue;
|
||||
|
||||
/* The prefix is followed by the driver's own label. */
|
||||
label = &key[len];
|
||||
|
||||
input_connect(owner, label, value);
|
||||
}
|
||||
|
||||
/* Check for removed (label) entries. */
|
||||
for (i = 0; i < INPUT_DEV_MAX; i++) {
|
||||
/* This also skips the multiplexers. */
|
||||
if (devs[i].owner == NONE)
|
||||
continue;
|
||||
|
||||
r = ds_retrieve_label_endpt(devs[i].label, &owner);
|
||||
|
||||
if (r == OK)
|
||||
devs[i].owner = owner; /* not really necessary */
|
||||
else if (r == ESRCH)
|
||||
input_disconnect(&devs[i]);
|
||||
else
|
||||
printf("INPUT: ds_retrieve_label_endpt failed (%d)\n",
|
||||
r);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Process messages not part of the character driver protocol.
|
||||
*/
|
||||
static void
|
||||
input_other(message *m, int ipc_status)
|
||||
{
|
||||
if (is_ipc_notify(ipc_status)) {
|
||||
switch (m->m_source) {
|
||||
case DS_PROC_NR:
|
||||
input_check();
|
||||
break;
|
||||
default:
|
||||
printf("INPUT: unexpected notify from %d\n",
|
||||
m->m_source);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* An input event from a registered driver. */
|
||||
switch (m->m_type) {
|
||||
case INPUT_EVENT:
|
||||
input_event(m);
|
||||
|
||||
break;
|
||||
|
||||
case INPUT_SETLEDS:
|
||||
if (m->m_source == TTY_PROC_NR) {
|
||||
input_set_leds(KBDMUX_MINOR, m->INPUT_LED_MASK);
|
||||
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
printf("INPUT: unexpected message %d from %d\n",
|
||||
m->m_type, m->m_source);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the input server.
|
||||
*/
|
||||
static int
|
||||
input_init(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
message m;
|
||||
int i, r;
|
||||
|
||||
/* Initialize input device structures. */
|
||||
for (i = 0; i < INPUT_DEV_MAX; i++) {
|
||||
devs[i].minor = input_revmap(i);
|
||||
devs[i].owner = NONE;
|
||||
devs[i].tail = 0;
|
||||
devs[i].count = 0;
|
||||
devs[i].opened = FALSE;
|
||||
devs[i].suspended = FALSE;
|
||||
devs[i].selector = NONE;
|
||||
devs[i].leds = 0;
|
||||
}
|
||||
|
||||
/* Subscribe to driver registration events for input drivers. */
|
||||
if ((r = ds_subscribe("drv\\.inp\\..*", DSF_INITIAL)) != OK)
|
||||
panic("INPUT: can't subscribe to driver events (%d)", r);
|
||||
|
||||
/* Announce our presence to VFS. */
|
||||
chardriver_announce();
|
||||
|
||||
/* Announce our presence to TTY. */
|
||||
memset(&m, 0, sizeof(m));
|
||||
|
||||
m.m_type = TTY_INPUT_UP;
|
||||
|
||||
if ((r = send(TTY_PROC_NR, &m)) != OK)
|
||||
printf("INPUT: send to TTY failed (%d)\n", r);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set callbacks and invoke SEF startup.
|
||||
*/
|
||||
static void
|
||||
input_startup(void)
|
||||
{
|
||||
sef_setcb_init_fresh(input_init);
|
||||
|
||||
sef_startup();
|
||||
}
|
||||
|
||||
/*
|
||||
* Main program of the input server.
|
||||
*/
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
input_startup();
|
||||
|
||||
chardriver_task(&input_tab);
|
||||
|
||||
return 0;
|
||||
}
|
45
servers/input/input.h
Normal file
45
servers/input/input.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#ifndef _SERVERS_INPUT_H
|
||||
#define _SERVERS_INPUT_H
|
||||
|
||||
#include <minix/input.h>
|
||||
|
||||
/* Configuration. */
|
||||
#define EVENTBUF_SIZE 32
|
||||
|
||||
#define KBDMUX_MINOR 0
|
||||
#define KBD0_MINOR 1
|
||||
#define KBD_MINORS 4
|
||||
|
||||
#define MOUSEMUX_MINOR 64
|
||||
#define MOUSE0_MINOR 65
|
||||
#define MOUSE_MINORS 4
|
||||
|
||||
/* Constants. */
|
||||
#define KBDMUX_DEV 0
|
||||
#define FIRST_KBD_DEV 1
|
||||
#define LAST_KBD_DEV (FIRST_KBD_DEV + KBD_MINORS - 1)
|
||||
|
||||
#define MOUSEMUX_DEV (LAST_KBD_DEV + 1)
|
||||
#define FIRST_MOUSE_DEV (MOUSEMUX_DEV + 1)
|
||||
#define LAST_MOUSE_DEV (FIRST_MOUSE_DEV + MOUSE_MINORS - 1)
|
||||
|
||||
#define INPUT_DEV_MAX (1 + KBD_MINORS + 1 + MOUSE_MINORS)
|
||||
|
||||
/* Input device state structure. */
|
||||
struct input_dev {
|
||||
devminor_t minor; /* minor number of this device */
|
||||
endpoint_t owner; /* owning driver endpoint, or NONE */
|
||||
char label[DS_MAX_KEYLEN]; /* label of owning driver */
|
||||
struct input_event eventbuf[EVENTBUF_SIZE]; /* event ring buffer */
|
||||
unsigned int tail; /* tail into ring buffer */
|
||||
unsigned int count; /* number of elements in ring buffer */
|
||||
int opened; /* has a process opened the device? */
|
||||
int suspended; /* is a process suspended on a read? */
|
||||
endpoint_t caller; /* endpoint for suspended read */
|
||||
cp_grant_id_t grant; /* grant for suspended read */
|
||||
cdev_id_t req_id; /* request ID for suspended read */
|
||||
endpoint_t selector; /* read-selecting endpoint, or NONE */
|
||||
unsigned int leds; /* LED mask - saved across connects */
|
||||
};
|
||||
|
||||
#endif /* !_SERVERS_INPUT_H */
|
|
@ -17,7 +17,6 @@
|
|||
#include <minix/com.h>
|
||||
#include <minix/syslib.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/bitmap.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <minix/com.h>
|
||||
#include <minix/syslib.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/bitmap.h>
|
||||
#include <minix/vfsif.h>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*/
|
||||
|
||||
#include "pm.h"
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/callnr.h>
|
||||
#include <minix/com.h>
|
||||
#include <minix/ds.h>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <minix/com.h>
|
||||
#include <minix/syslib.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/bitmap.h>
|
||||
#include <minix/vfsif.h>
|
||||
#include <minix/endpoint.h>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <minix/syslib.h>
|
||||
#include <minix/sysinfo.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/bitmap.h>
|
||||
#include <minix/rs.h>
|
||||
#include <minix/dmap.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <sys/select.h>
|
||||
#include <minix/callnr.h>
|
||||
#include <minix/com.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/const.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/safecopies.h>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <string.h>
|
||||
#include <minix/callnr.h>
|
||||
#include <minix/com.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/const.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/syslib.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <string.h>
|
||||
#include <minix/callnr.h>
|
||||
#include <minix/com.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/const.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <minix/const.h>
|
||||
#include <minix/ds.h>
|
||||
#include <minix/endpoint.h>
|
||||
#include <minix/keymap.h>
|
||||
#include <minix/minlib.h>
|
||||
#include <minix/type.h>
|
||||
#include <minix/ipc.h>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
all: test-scancodes
|
||||
|
||||
clean:
|
||||
rm -f *.o test-scancodes
|
||||
|
||||
test-scancodes: test-scancodes.o
|
||||
|
||||
test-scancodes.o: test-scancodes.c
|
||||
|
||||
|
|
@ -1,410 +0,0 @@
|
|||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* list of scancodes to demonstrate whether the keycodes are correct;
|
||||
* source: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
|
||||
*/
|
||||
static char *keydescr[] = {
|
||||
NULL, /* 0x00 */
|
||||
"Esc", /* 0x01 */
|
||||
"1!", /* 0x02 */
|
||||
"2@", /* 0x03 */
|
||||
"3#", /* 0x04 */
|
||||
"4$", /* 0x05 */
|
||||
"5%", /* 0x06 */
|
||||
"6^", /* 0x07 */
|
||||
"7&", /* 0x08 */
|
||||
"8*", /* 0x09 */
|
||||
"9(", /* 0x0a */
|
||||
"0)", /* 0x0b */
|
||||
"-_", /* 0x0c */
|
||||
"=+", /* 0x0d */
|
||||
"Backspace", /* 0x0e */
|
||||
"Tab", /* 0x0f */
|
||||
"Q", /* 0x10 */
|
||||
"W", /* 0x11 */
|
||||
"E", /* 0x12 */
|
||||
"R", /* 0x13 */
|
||||
"T", /* 0x14 */
|
||||
"Y", /* 0x15 */
|
||||
"U", /* 0x16 */
|
||||
"I", /* 0x17 */
|
||||
"O", /* 0x18 */
|
||||
"P", /* 0x19 */
|
||||
"[{", /* 0x1a */
|
||||
"]}", /* 0x1b */
|
||||
"Enter", /* 0x1c */
|
||||
"LCtrl", /* 0x1d */
|
||||
"A", /* 0x1e */
|
||||
"S", /* 0x1f */
|
||||
"D", /* 0x20 */
|
||||
"F", /* 0x21 */
|
||||
"G", /* 0x22 */
|
||||
"H", /* 0x23 */
|
||||
"J", /* 0x24 */
|
||||
"K", /* 0x25 */
|
||||
"L", /* 0x26 */
|
||||
";:", /* 0x27 */
|
||||
"'\"", /* 0x28 */
|
||||
"`~", /* 0x29 */
|
||||
"LShift", /* 0x2a */
|
||||
"\\|", /* 0x2b */
|
||||
"Z", /* 0x2c */
|
||||
"X", /* 0x2d */
|
||||
"C", /* 0x2e */
|
||||
"V", /* 0x2f */
|
||||
"B", /* 0x30 */
|
||||
"N", /* 0x31 */
|
||||
"M", /* 0x32 */
|
||||
",<", /* 0x33 */
|
||||
".>", /* 0x34 */
|
||||
"/?", /* 0x35 */
|
||||
"RShift", /* 0x36 */
|
||||
"Keypad-*", /* 0x37 */
|
||||
"LAlt", /* 0x38 */
|
||||
"Space bar", /* 0x39 */
|
||||
"CapsLock", /* 0x3a */
|
||||
"F1", /* 0x3b */
|
||||
"F2", /* 0x3c */
|
||||
"F3", /* 0x3d */
|
||||
"F4", /* 0x3e */
|
||||
"F5", /* 0x3f */
|
||||
"F6", /* 0x40 */
|
||||
"F7", /* 0x41 */
|
||||
"F8", /* 0x42 */
|
||||
"F9", /* 0x43 */
|
||||
"F10", /* 0x44 */
|
||||
"NumLock", /* 0x45 */
|
||||
"ScrollLock", /* 0x46 */
|
||||
"Keypad-7/Home",/* 0x47 */
|
||||
"Keypad-8/Up", /* 0x48 */
|
||||
"Keypad-9/PgUp",/* 0x49 */
|
||||
"Keypad--", /* 0x4a */
|
||||
"Keypad-4/Left",/* 0x4b */
|
||||
"Keypad-5", /* 0x4c */
|
||||
"Keypad-6/Right",/* 0x4d */
|
||||
"Keypad-+", /* 0x4e */
|
||||
"Keypad-1/End", /* 0x4f */
|
||||
"Keypad-2/Down",/* 0x50 */
|
||||
"Keypad-3/PgDn",/* 0x51 */
|
||||
"Keypad-0/Ins", /* 0x52 */
|
||||
"Keypad-./Del", /* 0x53 */
|
||||
"Alt-SysRq", /* 0x54 */
|
||||
NULL, /* 0x55 */
|
||||
NULL, /* 0x56 */
|
||||
"F11", /* 0x57 */
|
||||
"F12", /* 0x58 */
|
||||
NULL, /* 0x59 */
|
||||
NULL, /* 0x5a */
|
||||
NULL, /* 0x5b */
|
||||
NULL, /* 0x5c */
|
||||
NULL, /* 0x5d */
|
||||
NULL, /* 0x5e */
|
||||
NULL, /* 0x5f */
|
||||
NULL, /* 0x60 */
|
||||
NULL, /* 0x61 */
|
||||
NULL, /* 0x62 */
|
||||
NULL, /* 0x63 */
|
||||
NULL, /* 0x64 */
|
||||
NULL, /* 0x65 */
|
||||
NULL, /* 0x66 */
|
||||
NULL, /* 0x67 */
|
||||
NULL, /* 0x68 */
|
||||
NULL, /* 0x69 */
|
||||
NULL, /* 0x6a */
|
||||
NULL, /* 0x6b */
|
||||
NULL, /* 0x6c */
|
||||
NULL, /* 0x6d */
|
||||
NULL, /* 0x6e */
|
||||
NULL, /* 0x6f */
|
||||
NULL, /* 0x70 */
|
||||
NULL, /* 0x71 */
|
||||
NULL, /* 0x72 */
|
||||
NULL, /* 0x73 */
|
||||
NULL, /* 0x74 */
|
||||
NULL, /* 0x75 */
|
||||
NULL, /* 0x76 */
|
||||
NULL, /* 0x77 */
|
||||
NULL, /* 0x78 */
|
||||
NULL, /* 0x79 */
|
||||
NULL, /* 0x7a */
|
||||
NULL, /* 0x7b */
|
||||
NULL, /* 0x7c */
|
||||
NULL, /* 0x7d */
|
||||
NULL, /* 0x7e */
|
||||
NULL, /* 0x7f */
|
||||
};
|
||||
|
||||
static char *keydescresc[] = {
|
||||
NULL, /* 0xe0 0x00 */
|
||||
NULL, /* 0xe0 0x01 */
|
||||
NULL, /* 0xe0 0x02 */
|
||||
NULL, /* 0xe0 0x03 */
|
||||
NULL, /* 0xe0 0x04 */
|
||||
NULL, /* 0xe0 0x05 */
|
||||
NULL, /* 0xe0 0x06 */
|
||||
NULL, /* 0xe0 0x07 */
|
||||
NULL, /* 0xe0 0x08 */
|
||||
NULL, /* 0xe0 0x09 */
|
||||
NULL, /* 0xe0 0x0a */
|
||||
NULL, /* 0xe0 0x0b */
|
||||
NULL, /* 0xe0 0x0c */
|
||||
NULL, /* 0xe0 0x0d */
|
||||
NULL, /* 0xe0 0x0e */
|
||||
NULL, /* 0xe0 0x0f */
|
||||
NULL, /* 0xe0 0x10 */
|
||||
NULL, /* 0xe0 0x11 */
|
||||
NULL, /* 0xe0 0x12 */
|
||||
NULL, /* 0xe0 0x13 */
|
||||
NULL, /* 0xe0 0x14 */
|
||||
NULL, /* 0xe0 0x15 */
|
||||
NULL, /* 0xe0 0x16 */
|
||||
NULL, /* 0xe0 0x17 */
|
||||
NULL, /* 0xe0 0x18 */
|
||||
NULL, /* 0xe0 0x19 */
|
||||
NULL, /* 0xe0 0x1a */
|
||||
NULL, /* 0xe0 0x1b */
|
||||
"Keypad Enter", /* 0xe0 0x1c */
|
||||
"RCtrl", /* 0xe0 0x1d */
|
||||
NULL, /* 0xe0 0x1e */
|
||||
NULL, /* 0xe0 0x1f */
|
||||
NULL, /* 0xe0 0x20 */
|
||||
NULL, /* 0xe0 0x21 */
|
||||
NULL, /* 0xe0 0x22 */
|
||||
NULL, /* 0xe0 0x23 */
|
||||
NULL, /* 0xe0 0x24 */
|
||||
NULL, /* 0xe0 0x25 */
|
||||
NULL, /* 0xe0 0x26 */
|
||||
NULL, /* 0xe0 0x27 */
|
||||
NULL, /* 0xe0 0x28 */
|
||||
NULL, /* 0xe0 0x29 */
|
||||
"fake LShift", /* 0xe0 0x2a */
|
||||
NULL, /* 0xe0 0x2b */
|
||||
NULL, /* 0xe0 0x2c */
|
||||
NULL, /* 0xe0 0x2d */
|
||||
NULL, /* 0xe0 0x2e */
|
||||
NULL, /* 0xe0 0x2f */
|
||||
NULL, /* 0xe0 0x30 */
|
||||
NULL, /* 0xe0 0x31 */
|
||||
NULL, /* 0xe0 0x32 */
|
||||
NULL, /* 0xe0 0x33 */
|
||||
NULL, /* 0xe0 0x34 */
|
||||
"Keypad-/", /* 0xe0 0x35 */
|
||||
"fake RShift", /* 0xe0 0x36 */
|
||||
"Ctrl-PrtScn", /* 0xe0 0x37 */
|
||||
"RAlt", /* 0xe0 0x38 */
|
||||
NULL, /* 0xe0 0x39 */
|
||||
NULL, /* 0xe0 0x3a */
|
||||
NULL, /* 0xe0 0x3b */
|
||||
NULL, /* 0xe0 0x3c */
|
||||
NULL, /* 0xe0 0x3d */
|
||||
NULL, /* 0xe0 0x3e */
|
||||
NULL, /* 0xe0 0x3f */
|
||||
NULL, /* 0xe0 0x40 */
|
||||
NULL, /* 0xe0 0x41 */
|
||||
NULL, /* 0xe0 0x42 */
|
||||
NULL, /* 0xe0 0x43 */
|
||||
NULL, /* 0xe0 0x44 */
|
||||
NULL, /* 0xe0 0x45 */
|
||||
"Ctrl-Break", /* 0xe0 0x46 */
|
||||
"Grey Home", /* 0xe0 0x47 */
|
||||
"Grey Up", /* 0xe0 0x48 */
|
||||
"Grey PgUp", /* 0xe0 0x49 */
|
||||
NULL, /* 0xe0 0x4a */
|
||||
"Grey Left", /* 0xe0 0x4b */
|
||||
NULL, /* 0xe0 0x4c */
|
||||
"Grey Right", /* 0xe0 0x4d */
|
||||
NULL, /* 0xe0 0x4e */
|
||||
"Grey End", /* 0xe0 0x4f */
|
||||
"Grey Down", /* 0xe0 0x50 */
|
||||
"Grey PgDn", /* 0xe0 0x51 */
|
||||
"Grey Insert", /* 0xe0 0x52 */
|
||||
"Grey Delete", /* 0xe0 0x53 */
|
||||
NULL, /* 0xe0 0x54 */
|
||||
NULL, /* 0xe0 0x55 */
|
||||
NULL, /* 0xe0 0x56 */
|
||||
NULL, /* 0xe0 0x57 */
|
||||
NULL, /* 0xe0 0x58 */
|
||||
NULL, /* 0xe0 0x59 */
|
||||
NULL, /* 0xe0 0x5a */
|
||||
"LeftWindow", /* 0xe0 0x5b */
|
||||
"RightWindow", /* 0xe0 0x5c */
|
||||
"Menu", /* 0xe0 0x5d */
|
||||
"Power", /* 0xe0 0x5e */
|
||||
"Sleep", /* 0xe0 0x5f */
|
||||
NULL, /* 0xe0 0x60 */
|
||||
NULL, /* 0xe0 0x61 */
|
||||
NULL, /* 0xe0 0x62 */
|
||||
"Wake", /* 0xe0 0x63 */
|
||||
NULL, /* 0xe0 0x64 */
|
||||
NULL, /* 0xe0 0x65 */
|
||||
NULL, /* 0xe0 0x66 */
|
||||
NULL, /* 0xe0 0x67 */
|
||||
NULL, /* 0xe0 0x68 */
|
||||
NULL, /* 0xe0 0x69 */
|
||||
NULL, /* 0xe0 0x6a */
|
||||
NULL, /* 0xe0 0x6b */
|
||||
NULL, /* 0xe0 0x6c */
|
||||
NULL, /* 0xe0 0x6d */
|
||||
NULL, /* 0xe0 0x6e */
|
||||
NULL, /* 0xe0 0x6f */
|
||||
NULL, /* 0xe0 0x70 */
|
||||
NULL, /* 0xe0 0x71 */
|
||||
NULL, /* 0xe0 0x72 */
|
||||
NULL, /* 0xe0 0x73 */
|
||||
NULL, /* 0xe0 0x74 */
|
||||
NULL, /* 0xe0 0x75 */
|
||||
NULL, /* 0xe0 0x76 */
|
||||
NULL, /* 0xe0 0x77 */
|
||||
NULL, /* 0xe0 0x78 */
|
||||
NULL, /* 0xe0 0x79 */
|
||||
NULL, /* 0xe0 0x7a */
|
||||
NULL, /* 0xe0 0x7b */
|
||||
NULL, /* 0xe0 0x7c */
|
||||
NULL, /* 0xe0 0x7d */
|
||||
NULL, /* 0xe0 0x7e */
|
||||
NULL, /* 0xe0 0x7f */
|
||||
};
|
||||
|
||||
#define CHECK(r) check((r), #r, __FILE__, __LINE__)
|
||||
|
||||
int check(long r, const char *expr, const char *file, int line)
|
||||
{
|
||||
char buffer[256];
|
||||
if (r < 0) {
|
||||
snprintf(buffer, sizeof(buffer), "%s:%d: %s: result %ld, %s",
|
||||
file, line, expr, r, strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
#define SCODE_ESC 0xe0
|
||||
#define SCODE_BREAK 0x80
|
||||
|
||||
static int testscancode(int fd)
|
||||
{
|
||||
static int escape, lctrl, rctrl;
|
||||
ssize_t count;
|
||||
unsigned char scode;
|
||||
char *scodedescr;
|
||||
|
||||
/* read a scancode and test for EOF */
|
||||
CHECK(count = read(fd, &scode, sizeof(scode)));
|
||||
if (count < sizeof(scode)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* print scancode */
|
||||
printf("0x%.2x ", scode);
|
||||
fflush(stdout);
|
||||
|
||||
/* test for escape */
|
||||
if (!escape && scode == SCODE_ESC) {
|
||||
escape = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* describe scancode */
|
||||
scodedescr = (escape ? keydescresc : keydescr)[scode & ~SCODE_BREAK];
|
||||
if (scodedescr)
|
||||
printf("[%s] ", scodedescr);
|
||||
|
||||
if (scode & SCODE_BREAK)
|
||||
printf("up\n");
|
||||
else
|
||||
printf("down\n");
|
||||
|
||||
fflush(stdout);
|
||||
|
||||
/* exit on ctrl-C */
|
||||
if ((scode & ~SCODE_BREAK) == 0x1d) {
|
||||
if (escape)
|
||||
rctrl = !(scode & SCODE_BREAK);
|
||||
else
|
||||
lctrl = !(scode & SCODE_BREAK);
|
||||
}
|
||||
if ((lctrl || rctrl) && !escape && scode == 0x2e) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* next key is not escaped */
|
||||
escape = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static volatile int terminate;
|
||||
|
||||
static void set_terminate(int signum)
|
||||
{
|
||||
terminate = signum;
|
||||
}
|
||||
|
||||
static int testscancodes(int fd)
|
||||
{
|
||||
struct termios termios_old, termios_scan;
|
||||
|
||||
/* this test only works with a TTY as stdin */
|
||||
if (!CHECK(isatty(fd))) {
|
||||
printf("warning: this test can only be run from a console\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* catch fatal signals to restore the console */
|
||||
CHECK((signal(SIGHUP, set_terminate) == SIG_ERR) ? -1 : 0);
|
||||
CHECK((signal(SIGINT, set_terminate) == SIG_ERR) ? -1 : 0);
|
||||
CHECK((signal(SIGQUIT, set_terminate) == SIG_ERR) ? -1 : 0);
|
||||
CHECK((signal(SIGABRT, set_terminate) == SIG_ERR) ? -1 : 0);
|
||||
CHECK((signal(SIGPIPE, set_terminate) == SIG_ERR) ? -1 : 0);
|
||||
CHECK((signal(SIGTERM, set_terminate) == SIG_ERR) ? -1 : 0);
|
||||
|
||||
/* configure tty in raw input mode with scancodes and no echo */
|
||||
CHECK(tcgetattr(fd, &termios_old));
|
||||
termios_scan = termios_old;
|
||||
termios_scan.c_iflag &= ~(BRKINT | ICRNL | IGNBRK | IGNCR | IGNPAR);
|
||||
termios_scan.c_iflag &= ~(INLCR | INPCK | ISTRIP);
|
||||
termios_scan.c_iflag &= ~(IXOFF | IXON | PARMRK);
|
||||
termios_scan.c_iflag |= SCANCODES;
|
||||
termios_scan.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
|
||||
termios_scan.c_lflag &= ~(ICANON | IEXTEN | ISIG | NOFLSH);
|
||||
CHECK(tcsetattr(fd, TCSANOW, &termios_scan));
|
||||
|
||||
/* test: is scancode input supported? */
|
||||
CHECK(tcgetattr(fd, &termios_scan));
|
||||
if (termios_scan.c_iflag & SCANCODES) {
|
||||
while (!terminate && CHECK(testscancode(fd))) ;
|
||||
} else {
|
||||
printf("warning: cannot enable SCANCODES "
|
||||
"(are you running from a console?)\n");
|
||||
}
|
||||
|
||||
/* report if closed by a signal */
|
||||
if (terminate) {
|
||||
printf("received signal %d, shutting down\n", terminate);
|
||||
}
|
||||
|
||||
/* restore original input mode */
|
||||
CHECK(tcsetattr(fd, TCSANOW, &termios_old));
|
||||
|
||||
/* clear buffered input */
|
||||
CHECK(tcflush(fd, TCIFLUSH));
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("try out some keys to find out whether SCANCODES works\n");
|
||||
printf("press CTRL+C to end this test\n");
|
||||
printf("please note that this test only works from a console tty\n");
|
||||
|
||||
/* perform test using stdin */
|
||||
if (testscancodes(STDIN_FILENO) < 0)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue