#include <minix/com.h>
#include <minix/keymap.h>
#include "tty.h"
+
+u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
#include "keymaps/us-std.src"
+};
+
+u16_t keymap_escaped[NR_SCAN_CODES * MAP_COLS] = {
+#include "keymaps/us-std-esc.src"
+};
int irq_hook_id = -1;
int aux_irq_hook_id = -1;
if (scode == SLASH_SCAN && esc) return '/'; /* don't map numeric slash */
- keyrow = &keymap[scode * MAP_COLS];
+ if(esc)
+ keyrow = &keymap[scode * MAP_COLS];
+ else
+ keyrow = &keymap_escaped[scode * MAP_COLS];
caps = shift;
lk = locks[ccurrent];
alt_down = make;
break;
case CALOCK: /* Caps lock - toggle on 0 -> 1 transition */
- if(escape) return -1;
if (caps_down < make) {
locks[ccurrent] ^= CAPS_LOCK;
set_leds();
caps_down = make;
break;
case NLOCK: /* Num lock */
- if(escape) return -1;
if (num_down < make) {
locks[ccurrent] ^= NUM_LOCK;
set_leds();
num_down = make;
break;
case SLOCK: /* Scroll lock */
- if(escape) return -1;
if (scroll_down < make) {
locks[ccurrent] ^= SCROLL_LOCK;
set_leds();
esc = 1; /* Next key is escaped */
return(-1);
default: /* A normal key */
- if(escape) {
- printf("tty: ignoring escaped 0x%x\n", scode);
- return -1;
- }
if(!ch) {
- printf("tty: ignoring unrecognized scancode 0x%x\n",
- scode);
+ printf("tty: ignoring unrecognized %s scancode 0x%x\n",
+ esc ? "escaped" : "straight", scode);
return -1;
}
if(make) return(ch);
spanish.map \
uk.map \
us-std.map \
+ us-std-esc.map \
us-swap.map \
install: \
$(LK)/spanish.map \
$(LK)/uk.map \
$(LK)/us-std.map \
+ $(LK)/us-std-esc.map \
$(LK)/us-swap.map \
clean:
$(LK)/us-std.map: us-std.map
install -c $? $@
+$(LK)/us-std-esc.map: us-std-esc.map
+ install -c $? $@
+
$(LK)/us-swap.map: us-swap.map
install -c $? $@
* Contributed by: Ulrich Hobelmann <u.hobelmann@web.de>
*/
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
-
/* Keymap for the French keyboard. */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
#include <string.h>
#include <errno.h>
+u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
#include KEYSRC
+};
u8_t comprmap[4 + NR_SCAN_CODES * MAP_COLS * 9/8 * 2 + 1];
/* Keymap for German MF-2 keyboard. */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code unsh Shift Alt AltGr Alt+Sh Strg */
/* ==================================================================== */
/* 00 - none */ 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
-};
/* Modified by Ernesto Del Prete in October 1997 */
/* ernesto@cclix1.polito.it or s84508@cclix1.polito.it */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
#error NR_SCAN_CODES mis-match
#endif
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
#error NR_SCAN_CODES mis-match
#endif
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
/* Keymap for the Olivetti M24. */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
* Charset: ISO-8859-2 - [Polska Norma PN-93 T-42118]
*/
-
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
* Modified by Roman V. Ignatov <ignatov@minix3.ru>
* Charset: cp866
*/
-
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
/*127 - ??? */ 0, 0, 0, 0, 0, 0
-};
* Modified by Roman V. Ignatov <ignatov@minix3.ru>
* Charset: koi8-r
*/
-
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
/*127 - ??? */ 0, 0, 0, 0, 0, 0
-};
* preliminary version, 8 Sept 1996
*/
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code unsh Shift Alt AltGr Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
/* Keymap for Spanish MF-2 keyboard. */
/* Modified by Javier Garcia Martin jawa@inf.deusto.es */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt AltGr Alt+Sh Ctrl */
/*
====================================================================
/*125 - ??? */ 0, 0, 0, 0, 0, 0,
/*126 - ??? */ 0, 0, 0, 0, 0, 0,
/*127 - ??? */ 0, 0, 0, 0, 0, 0
-};
/* Keymap for standard UK keyboard. Author: Darren Mason */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
/* 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,
+/* 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,
/* 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,
+/* 69 - NumLock */ 0, 0, 0, 0, 0, 0,
+/* 70 - ScrLock */ 0, 0, 0, 0, 0, 0,
/* 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,
/* Keymap for US MF-2 keyboard. */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};
/* Keymap for US MF-2 keyboard with the Caps Lock and Control key swapped. */
-u16_t keymap[NR_SCAN_CODES * MAP_COLS] = {
-
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 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
-};