lkml.org 
[lkml]   [2002]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][RFC] add support for PC-9800 architecture (13/26) keyboard
This is part 13/26 of patchset for add support NEC PC-9800 architecture,
against 2.5.43.

Summary:
console keyboard modules
- adapted to PC-9800 hardware spec.
- add jis-x201("kana") support.

diffstat:
drivers/char/defkeymap_pc9800.c | 285 ++++++++++++++++++++++++
drivers/char/defkeymap_pc9800.map | 439 ++++++++++++++++++++++++++++++++++++++
drivers/char/keyboard.c | 79 ++++++
include/linux/kbd_kern.h | 11
include/linux/keyboard.h | 4
include/linux/logibusmouse.h | 30 ++
include/linux/pc_keyb.h | 18 +
7 files changed, 865 insertions(+), 1 deletion(-)

patch:
diff -urN linux/drivers/char/defkeymap_pc9800.c linux98/drivers/char/defkeymap_pc9800.c
--- linux/drivers/char/defkeymap_pc9800.c Thu Jan 1 09:00:00 1970
+++ linux98/drivers/char/defkeymap_pc9800.c Mon Sep 16 10:47:44 2002
@@ -0,0 +1,285 @@
+
+/* Do not edit this file! It was automatically generated by */
+/* loadkeys --mktable defkeymap_pc9800.map > defkeymap_pc9800.c */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/keyboard.h>
+#include <linux/kd.h>
+
+u_short plain_map[NR_KEYS] = {
+ 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037,
+ 0xf038, 0xf039, 0xf030, 0xf02d, 0xf05e, 0xf05c, 0xf07f, 0xf009,
+ 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
+ 0xfb6f, 0xfb70, 0xf040, 0xf05b, 0xf201, 0xfb61, 0xfb73, 0xfb64,
+ 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b, 0xf03a,
+ 0xf05d, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, 0xfb62, 0xfb6e, 0xfb6d,
+ 0xf02c, 0xf02e, 0xf02f, 0xf05f, 0xf020, 0xf701, 0xf118, 0xf119,
+ 0xf115, 0xf116, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xfe00, 0xfe01, 0xfe02, 0xf10d, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, 0xf105,
+ 0xf106, 0xf107, 0xf108, 0xf109, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short shift_map[NR_KEYS] = {
+ 0xf01b, 0xf021, 0xf022, 0xf023, 0xf024, 0xf025, 0xf026, 0xf027,
+ 0xf028, 0xf029, 0xf030, 0xf03d, 0xf060, 0xf07c, 0xf07f, 0xf009,
+ 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
+ 0xfb4f, 0xfb50, 0xf07e, 0xf07b, 0xf201, 0xfb41, 0xfb53, 0xfb44,
+ 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf02b, 0xf02a,
+ 0xf07d, 0xfb5a, 0xfb58, 0xfb43, 0xfb56, 0xfb42, 0xfb4e, 0xfb4d,
+ 0xf03c, 0xf03e, 0xf03f, 0xf05f, 0xf020, 0xf701, 0xf20b, 0xf20a,
+ 0xf115, 0xf116, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xfe00, 0xfe01, 0xfe02, 0xf10d, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, 0xf105,
+ 0xf106, 0xf107, 0xf108, 0xf109, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short altgr_map[NR_KEYS] = {
+ 0xf01b, 0xf200, 0xf200, 0xf200, 0xf024, 0xf200, 0xf07b, 0xf05b,
+ 0xf05d, 0xf07d, 0xf030, 0xf05c, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
+ 0xfb6f, 0xfb70, 0xf200, 0xf200, 0xf201, 0xfb61, 0xfb73, 0xfb64,
+ 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf200, 0xf200,
+ 0xf200, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, 0xfb62, 0xfb6e, 0xfb6d,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf020, 0xf701, 0xf118, 0xf119,
+ 0xf115, 0xf116, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short ctrl_map[NR_KEYS] = {
+ 0xf01b, 0xf200, 0xf200, 0xf01b, 0xf01c, 0xf01d, 0xf01f, 0xf01f,
+ 0xf07f, 0xf200, 0xf030, 0xf01f, 0xf01e, 0xf01c, 0xf200, 0xf200,
+ 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
+ 0xf00f, 0xf010, 0xf000, 0xf01b, 0xf201, 0xf001, 0xf013, 0xf004,
+ 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, 0xf200,
+ 0xf01d, 0xf01a, 0xf018, 0xf003, 0xf016, 0xf002, 0xf00e, 0xf00d,
+ 0xf200, 0xf200, 0xf200, 0xf01f, 0xf000, 0xf07f, 0xf118, 0xf119,
+ 0xf115, 0xf116, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xf10a, 0xf10b, 0xf10c, 0xf10d, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, 0xf105,
+ 0xf106, 0xf107, 0xf108, 0xf109, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short altgr_ctrl_map[NR_KEYS] = {
+ 0xf01b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf030, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
+ 0xf00f, 0xf010, 0xf200, 0xf200, 0xf201, 0xf001, 0xf013, 0xf004,
+ 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, 0xf200,
+ 0xf200, 0xf01a, 0xf018, 0xf003, 0xf016, 0xf002, 0xf00e, 0xf00d,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf020, 0xf701, 0xf118, 0xf119,
+ 0xf115, 0xf20c, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short alt_map[NR_KEYS] = {
+ 0xf01b, 0xf81b, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836, 0xf837,
+ 0xf838, 0xf839, 0xf830, 0xf82d, 0xf860, 0xf85c, 0xf87f, 0xf809,
+ 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
+ 0xf86f, 0xf870, 0xf860, 0xf85b, 0xf80d, 0xf861, 0xf873, 0xf864,
+ 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b, 0xf200,
+ 0xf85d, 0xf87a, 0xf878, 0xf863, 0xf876, 0xf862, 0xf86e, 0xf86d,
+ 0xf200, 0xf200, 0xf200, 0xf82c, 0xf000, 0xf82f, 0xf118, 0xf119,
+ 0xf115, 0xf116, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf907, 0xf908, 0xf909, 0xf30c, 0xf904, 0xf905,
+ 0xf906, 0xf30a, 0xf901, 0xf902, 0xf903, 0xf03d, 0xf900, 0xf02c,
+ 0xf310, 0xf703, 0xf50a, 0xf50b, 0xf50c, 0xf50d, 0xf50e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, 0xf505,
+ 0xf506, 0xf507, 0xf508, 0xf509, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short ctrl_alt_map[NR_KEYS] = {
+ 0xf01b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf030, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
+ 0xf80f, 0xf810, 0xf200, 0xf200, 0xf201, 0xf801, 0xf813, 0xf804,
+ 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200, 0xf200,
+ 0xf200, 0xf81a, 0xf818, 0xf803, 0xf816, 0xf802, 0xf80e, 0xf80d,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf020, 0xf701, 0xf118, 0xf119,
+ 0xf115, 0xf20c, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short kana_map[NR_KEYS] = {
+ 0xf01b, 0xf0c7, 0xf0cc, 0xf0b1, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0d4,
+ 0xf0d5, 0xf0d6, 0xf0dc, 0xf0ce, 0xf0cd, 0xf0b0, 0xf008, 0xf009,
+ 0xf0c0, 0xf0c3, 0xf0b2, 0xf0bd, 0xf0b6, 0xf0dd, 0xf0c5, 0xf0c6,
+ 0xf0d7, 0xf0be, 0xf0de, 0xf0df, 0xf201, 0xf0c1, 0xf0c4, 0xf0bc,
+ 0xf0ca, 0xf0b7, 0xf0b8, 0xf0cf, 0xf0c9, 0xf0d8, 0xf0da, 0xf0b9,
+ 0xf0d1, 0xf0c2, 0xf0bb, 0xf0bf, 0xf0cb, 0xf0ba, 0xf0d0, 0xf0d3,
+ 0xf0c8, 0xf0d9, 0xf0d2, 0xf0db, 0xf020, 0xf200, 0xf20b, 0xf20a,
+ 0xf200, 0xf200, 0xf01e, 0xf01d, 0xf01c, 0xf01f, 0xf200, 0xf200,
+ 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
+ 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
+ 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
+ 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf30e, 0xf702, 0xf501, 0xf502, 0xf701, 0xf205, 0xf114, 0xf603,
+ 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
+ 0xf700, 0xf207, 0xf704, 0xf200, 0xf702, 0xf110, 0xf311, 0xf11d,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short shift_kana_map[NR_KEYS] = {
+ 0xf01b, 0xf0c7, 0xf0cc, 0xf0a7, 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac,
+ 0xf0ad, 0xf0ae, 0xf0a6, 0xf0ce, 0xf0cd, 0xf0b0, 0xf008, 0xf009,
+ 0xf0c0, 0xf0c3, 0xf0a8, 0xf0bd, 0xf0b6, 0xf0dd, 0xf0c5, 0xf0c6,
+ 0xf0d7, 0xf0be, 0xf0de, 0xf0a2, 0xf201, 0xf0c1, 0xf0c4, 0xf0bc,
+ 0xf0ca, 0xf0b7, 0xf0b8, 0xf0cf, 0xf0c9, 0xf0d8, 0xf0da, 0xf0b9,
+ 0xf0a3, 0xf0af, 0xf0bb, 0xf0bf, 0xf0cb, 0xf0ba, 0xf0d0, 0xf0d3,
+ 0xf0a4, 0xf0a1, 0xf0a5, 0xf0db, 0xf020, 0xf200, 0xf20b, 0xf20a,
+ 0xf200, 0xf200, 0xf01e, 0xf01d, 0xf01c, 0xf01f, 0xf200, 0xf200,
+ 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
+ 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
+ 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
+ 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf30e, 0xf702, 0xf501, 0xf502, 0xf701, 0xf205, 0xf114, 0xf603,
+ 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
+ 0xf700, 0xf207, 0xf704, 0xf200, 0xf702, 0xf110, 0xf311, 0xf11d,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+static u_short ctrl_kana_map[NR_KEYS] = {
+ 0xf01b, 0xf200, 0xf200, 0xf01b, 0xf01c, 0xf01d, 0xf01f, 0xf01f,
+ 0xf07f, 0xf200, 0xf030, 0xf01f, 0xf01e, 0xf01c, 0xf200, 0xf200,
+ 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
+ 0xf00f, 0xf010, 0xf000, 0xf01b, 0xf201, 0xf001, 0xf013, 0xf004,
+ 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, 0xf200,
+ 0xf01d, 0xf01a, 0xf018, 0xf003, 0xf016, 0xf002, 0xf00e, 0xf00d,
+ 0xf200, 0xf200, 0xf200, 0xf01f, 0xf000, 0xf07f, 0xf118, 0xf119,
+ 0xf115, 0xf116, 0xf603, 0xf601, 0xf602, 0xf600, 0xf114, 0xf117,
+ 0xf30b, 0xf30d, 0xf307, 0xf308, 0xf309, 0xf30c, 0xf304, 0xf305,
+ 0xf306, 0xf30a, 0xf301, 0xf302, 0xf303, 0xf03d, 0xf300, 0xf02c,
+ 0xf310, 0xf703, 0xfe00, 0xfe01, 0xfe02, 0xf10d, 0xf10e, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf114, 0xf200,
+ 0xf205, 0xf209, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, 0xf105,
+ 0xf106, 0xf107, 0xf108, 0xf109, 0xf200, 0xf200, 0xf200, 0xf200,
+ 0xf700, 0xf207, 0xf704, 0xf703, 0xf702, 0xf200, 0xf200, 0xf200,
+ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
+};
+
+ushort *key_maps[MAX_NR_KEYMAPS] = {
+ plain_map, shift_map, altgr_map, 0,
+ ctrl_map, 0, altgr_ctrl_map, 0,
+ alt_map, 0, 0, 0,
+ ctrl_alt_map, 0, 0, 0,
+ kana_map, shift_kana_map, 0, 0,
+ ctrl_kana_map, 0
+};
+
+unsigned int keymap_count = 10;
+
+
+/*
+ * Philosophy: most people do not define more strings, but they who do
+ * often want quite a lot of string space. So, we statically allocate
+ * the default and allocate dynamically in chunks of 512 bytes.
+ */
+
+char func_buf[] = {
+ '\033', '[', '[', 'A', 0,
+ '\033', '[', '[', 'B', 0,
+ '\033', '[', '[', 'C', 0,
+ '\033', '[', '[', 'D', 0,
+ '\033', '[', '[', 'E', 0,
+ '\033', '[', '1', '7', '~', 0,
+ '\033', '[', '1', '8', '~', 0,
+ '\033', '[', '1', '9', '~', 0,
+ '\033', '[', '2', '0', '~', 0,
+ '\033', '[', '2', '1', '~', 0,
+ '\033', '[', '2', '3', '~', 0,
+ '\033', '[', '2', '4', '~', 0,
+ '\033', '[', '2', '5', '~', 0,
+ '\033', '[', '2', '6', '~', 0,
+ '\033', '[', '2', '8', '~', 0,
+ '\033', '[', '2', '9', '~', 0,
+ '\033', '[', '3', '1', '~', 0,
+ '\033', '[', '3', '2', '~', 0,
+ '\033', '[', '3', '3', '~', 0,
+ '\033', '[', '3', '4', '~', 0,
+ '\033', '[', '1', '~', 0,
+ '\033', '[', '2', '~', 0,
+ '\033', '[', '3', '~', 0,
+ '\033', '[', '4', '~', 0,
+ '\033', '[', '5', '~', 0,
+ '\033', '[', '6', '~', 0,
+};
+
+
+char *funcbufptr = func_buf;
+int funcbufsize = sizeof(func_buf);
+int funcbufleft = 0; /* space left */
+
+char *func_table[MAX_NR_FUNC] = {
+ func_buf + 0,
+ func_buf + 5,
+ func_buf + 10,
+ func_buf + 15,
+ func_buf + 20,
+ func_buf + 25,
+ func_buf + 31,
+ func_buf + 37,
+ func_buf + 43,
+ func_buf + 49,
+ func_buf + 55,
+ func_buf + 61,
+ func_buf + 67,
+ func_buf + 73,
+ func_buf + 79,
+ func_buf + 85,
+ func_buf + 91,
+ func_buf + 97,
+ func_buf + 103,
+ func_buf + 109,
+ func_buf + 115,
+ func_buf + 120,
+ func_buf + 125,
+ func_buf + 130,
+ func_buf + 135,
+ func_buf + 140,
+ 0,
+};
+
+struct kbdiacr accent_table[MAX_DIACR] = {
+};
+
+unsigned int accent_table_size = 0;
diff -urN linux/drivers/char/defkeymap_pc9800.map linux98/drivers/char/defkeymap_pc9800.map
--- linux/drivers/char/defkeymap_pc9800.map Thu Jan 1 09:00:00 1970
+++ linux98/drivers/char/defkeymap_pc9800.map Mon Sep 16 11:26:41 2002
@@ -0,0 +1,439 @@
+charset "jis-x-0201"
+keymaps 0-2,4,6,8,12,16-17,20
+keycode 0 = Escape
+keycode 1 = one exclam
+ alt keycode 1 = Meta_Escape
+ kana keycode 1 = kana_nu
+ shift kana keycode 1 = kana_nu
+keycode 2 = two quotedbl
+ alt keycode 2 = Meta_two
+ kana keycode 2 = kana_fu
+ shift kana keycode 2 = kana_fu
+keycode 3 = three numbersign
+ control keycode 3 = Escape
+ alt keycode 3 = Meta_three
+ kana keycode 3 = kana_a
+ shift kana keycode 3 = kana_small_a
+ control kana keycode 3 = Escape
+keycode 4 = four dollar dollar Control_backslash
+ alt keycode 4 = Meta_four
+ kana keycode 4 = kana_u
+ shift kana keycode 4 = kana_small_u
+ control kana keycode 4 = Control_backslash
+keycode 5 = five percent
+ control keycode 5 = Control_bracketright
+ alt keycode 5 = Meta_five
+ kana keycode 5 = kana_e
+ shift kana keycode 5 = kana_small_e
+ control kana keycode 5 = Control_bracketright
+keycode 6 = six ampersand braceleft Control_underscore
+ alt keycode 6 = Meta_six
+ kana keycode 6 = kana_o
+ shift kana keycode 6 = kana_small_o
+ control kana keycode 6 = Control_underscore
+keycode 7 = seven apostrophe bracketleft Control_underscore
+ alt keycode 7 = Meta_seven
+ kana keycode 7 = kana_ya
+ shift kana keycode 7 = kana_small_ya
+ control kana keycode 7 = Control_underscore
+keycode 8 = eight parenleft bracketright Delete
+ alt keycode 8 = Meta_eight
+ kana keycode 8 = kana_yu
+ shift kana keycode 8 = kana_small_yu
+ control kana keycode 8 = Delete
+keycode 9 = nine parenright braceright
+ alt keycode 9 = Meta_nine
+ kana keycode 9 = kana_yo
+ shift kana keycode 9 = kana_small_yo
+keycode 10 = zero
+ alt keycode 10 = Meta_zero
+ kana keycode 10 = kana_wa
+ shift kana keycode 10 = kana_wo
+keycode 11 = minus equal backslash Control_underscore
+ alt keycode 11 = Meta_minus
+ kana keycode 11 = kana_ho
+ shift kana keycode 11 = kana_ho
+ control kana keycode 11 = Control_underscore
+keycode 12 = asciicircum grave
+ control keycode 12 = Control_asciicircum
+ alt keycode 12 = Meta_grave
+ kana keycode 12 = kana_he
+ shift kana keycode 12 = kana_he
+ control kana keycode 12 = Control_asciicircum
+keycode 13 = backslash bar
+ control keycode 13 = Control_backslash
+ alt keycode 13 = Meta_backslash
+ kana keycode 13 = choonkigou
+ shift kana keycode 13 = choonkigou
+ control kana keycode 13 = Control_backslash
+keycode 14 = Delete Delete
+ alt keycode 14 = Meta_Delete
+ kana keycode 14 = BackSpace
+ shift kana keycode 14 = BackSpace
+keycode 15 = Tab Tab
+ alt keycode 15 = Meta_Tab
+ kana keycode 15 = Tab
+ shift kana keycode 15 = Tab
+keycode 16 = +q +Q +q Control_q Control_q Meta_q Meta_Control_q kana_ta kana_ta Control_q
+keycode 17 = +w +W +w Control_w Control_w Meta_w Meta_Control_w kana_te kana_te Control_w
+keycode 18 = +e +E +e Control_e Control_e Meta_e Meta_Control_e kana_i kana_small_i Control_e
+keycode 19 = +r +R +r Control_r Control_r Meta_r Meta_Control_r kana_su kana_su Control_r
+keycode 20 = +t +T +t Control_t Control_t Meta_t Meta_Control_t kana_ka kana_ka Control_t
+keycode 21 = +y +Y +y Control_y Control_y Meta_y Meta_Control_y kana_n kana_n Control_y
+keycode 22 = +u +U +u Control_u Control_u Meta_u Meta_Control_u kana_na kana_na Control_u
+keycode 23 = +i +I +i Tab Tab Meta_i Meta_Tab kana_ni kana_ni Tab
+keycode 24 = +o +O +o Control_o Control_o Meta_o Meta_Control_o kana_ra kana_ra Control_o
+keycode 25 = +p +P +p Control_p Control_p Meta_p Meta_Control_p kana_se kana_se Control_p
+keycode 26 = at asciitilde
+ control keycode 26 = nul
+ alt keycode 26 = Meta_grave
+ kana keycode 26 = dakuten
+ shift kana keycode 26 = dakuten
+ control kana keycode 26 = nul
+keycode 27 = bracketleft braceleft
+ control keycode 27 = Escape
+ alt keycode 27 = Meta_bracketleft
+ kana keycode 27 = handakuten
+ shift kana keycode 27 = hiraki_kagikakko
+ control kana keycode 27 = Escape
+keycode 28 = Return
+ alt keycode 28 = Meta_Control_m
+keycode 29 = +a +A +a Control_a Control_a Meta_a Meta_Control_a kana_chi kana_chi Control_a
+keycode 30 = +s +S +s Control_s Control_s Meta_s Meta_Control_s kana_to kana_to Control_s
+keycode 31 = +d +D +d Control_d Control_d Meta_d Meta_Control_d kana_shi kana_shi Control_d
+keycode 32 = +f +F +f Control_f Control_f Meta_f Meta_Control_f kana_ha kana_ha Control_f
+keycode 33 = +g +G +g Control_g Control_g Meta_g Meta_Control_g kana_ki kana_ki Control_g
+keycode 34 = +h +H +h BackSpace BackSpace Meta_h Meta_BackSpace kana_ku kana_ku BackSpace
+keycode 35 = +j +J +j Linefeed Linefeed Meta_j Meta_Linefeed kana_ma kana_ma Linefeed
+keycode 36 = +k +K +k Control_k Control_k Meta_k Meta_Control_k kana_no kana_no Control_k
+keycode 37 = +l +L +l Control_l Control_l Meta_l Meta_Control_l kana_ri kana_ri Control_l
+keycode 38 = semicolon plus
+ alt keycode 38 = Meta_semicolon
+ kana keycode 38 = kana_re
+ shift kana keycode 38 = kana_re
+keycode 39 = colon asterisk
+ kana keycode 39 = kana_ke
+ shift kana keycode 39 = kana_ke
+keycode 40 = bracketright braceright
+ control keycode 40 = Control_bracketright
+ alt keycode 40 = Meta_bracketright
+ kana keycode 40 = kana_mu
+ shift kana keycode 40 = toji_kagikakko
+ control kana keycode 40 = Control_bracketright
+keycode 41 = +z +Z +z Control_z Control_z Meta_z Meta_Control_z kana_tsu kana_small_tsu Control_z
+keycode 42 = +x +X +x Control_x Control_x Meta_x Meta_Control_x kana_sa kana_sa Control_x
+keycode 43 = +c +C +c Control_c Control_c Meta_c Meta_Control_c kana_so kana_so Control_c
+keycode 44 = +v +V +v Control_v Control_v Meta_v Meta_Control_v kana_hi kana_hi Control_v
+keycode 45 = +b +B +b Control_b Control_b Meta_b Meta_Control_b kana_ko kana_ko Control_b
+keycode 46 = +n +N +n Control_n Control_n Meta_n Meta_Control_n kana_mi kana_mi Control_n
+keycode 47 = +m +M +m Control_m Control_m Meta_m Meta_Control_m kana_mo kana_mo Control_m
+keycode 48 = comma less
+ kana keycode 48 = kana_ne
+ shift kana keycode 48 = kana_ten
+keycode 49 = period greater
+ kana keycode 49 = kana_ru
+ shift kana keycode 49 = kana_maru
+keycode 50 = slash question
+ kana keycode 50 = kana_me
+ shift kana keycode 50 = nakaguro
+keycode 51 = underscore underscore
+ control keycode 51 = Control_underscore
+ alt keycode 51 = Meta_comma
+ kana keycode 51 = kana_ro
+ shift kana keycode 51 = kana_ro
+ control kana keycode 51 = Control_underscore
+keycode 52 = space
+ control keycode 52 = nul
+ alt keycode 52 = nul
+ kana keycode 52 = space
+ shift kana keycode 52 = space
+ control kana keycode 52 = nul
+keycode 53 = AltGr
+ control keycode 53 = Delete
+ alt keycode 53 = Meta_slash
+ kana keycode 53 = VoidSymbol
+ shift kana keycode 53 = VoidSymbol
+ control kana keycode 53 = Delete
+keycode 54 = Prior
+ shift keycode 54 = Scroll_Backward
+ kana keycode 54 = Scroll_Backward
+ shift kana keycode 54 = Scroll_Backward
+keycode 55 = Next
+ shift keycode 55 = Scroll_Forward
+ kana keycode 55 = Scroll_Forward
+ shift kana keycode 55 = Scroll_Forward
+keycode 56 = Insert
+ kana keycode 56 = VoidSymbol
+ shift kana keycode 56 = VoidSymbol
+keycode 57 = Remove
+ altgr control keycode 57 = Boot
+ control alt keycode 57 = Boot
+ kana keycode 57 = VoidSymbol
+ shift kana keycode 57 = VoidSymbol
+keycode 58 = Up
+ kana keycode 58 = Control_asciicircum
+ shift kana keycode 58 = Control_asciicircum
+keycode 59 = Left
+ kana keycode 59 = Control_bracketright
+ shift kana keycode 59 = Control_bracketright
+keycode 60 = Right
+ kana keycode 60 = Control_backslash
+ shift kana keycode 60 = Control_backslash
+keycode 61 = Down
+ kana keycode 61 = Control_underscore
+ shift kana keycode 61 = Control_underscore
+keycode 62 = Find
+ kana keycode 62 = VoidSymbol
+ shift kana keycode 62 = VoidSymbol
+keycode 63 = Select
+ kana keycode 63 = VoidSymbol
+ shift kana keycode 63 = VoidSymbol
+keycode 64 = KP_Subtract
+ kana keycode 64 = F6
+ shift kana keycode 64 = F6
+keycode 65 = KP_Divide
+ kana keycode 65 = F7
+ shift kana keycode 65 = F7
+keycode 66 = KP_7
+ alt keycode 66 = Ascii_7
+ kana keycode 66 = F8
+ shift kana keycode 66 = F8
+keycode 67 = KP_8
+ alt keycode 67 = Ascii_8
+ kana keycode 67 = F9
+ shift kana keycode 67 = F9
+keycode 68 = KP_9
+ alt keycode 68 = Ascii_9
+ kana keycode 68 = F10
+ shift kana keycode 68 = F10
+keycode 69 = KP_Multiply
+ kana keycode 69 = Num_Lock
+ shift kana keycode 69 = Num_Lock
+keycode 70 = KP_4
+ alt keycode 70 = Ascii_4
+ kana keycode 70 = Scroll_Lock
+ shift kana keycode 70 = Scroll_Lock
+keycode 71 = KP_5
+ alt keycode 71 = Ascii_5
+ kana keycode 71 = KP_7
+ shift kana keycode 71 = KP_7
+keycode 72 = KP_6
+ alt keycode 72 = Ascii_6
+ kana keycode 72 = KP_8
+ shift kana keycode 72 = KP_8
+keycode 73 = KP_Add
+ kana keycode 73 = KP_9
+ shift kana keycode 73 = KP_9
+keycode 74 = KP_1
+ alt keycode 74 = Ascii_1
+ kana keycode 74 = KP_Subtract
+ shift kana keycode 74 = KP_Subtract
+keycode 75 = KP_2
+ alt keycode 75 = Ascii_2
+ kana keycode 75 = KP_4
+ shift kana keycode 75 = KP_4
+keycode 76 = KP_3
+ alt keycode 76 = Ascii_3
+ kana keycode 76 = KP_5
+ shift kana keycode 76 = KP_5
+keycode 77 = equal
+ kana keycode 77 = KP_6
+ shift kana keycode 77 = KP_6
+keycode 78 = KP_0
+ alt keycode 78 = Ascii_0
+ kana keycode 78 = KP_Add
+ shift kana keycode 78 = KP_Add
+keycode 79 = comma
+ kana keycode 79 = KP_1
+ shift kana keycode 79 = KP_1
+keycode 80 = KP_Period
+ kana keycode 80 = KP_2
+ shift kana keycode 80 = KP_2
+keycode 81 = Alt
+ kana keycode 81 = KP_3
+ shift kana keycode 81 = KP_3
+keycode 82 = 0xe00
+ altgr keycode 82 = VoidSymbol
+ altgr control keycode 82 = VoidSymbol
+ control keycode 82 = F11
+ alt keycode 82 = Console_11
+ control alt keycode 82 = VoidSymbol
+ kana keycode 82 = KP_0
+ shift kana keycode 82 = KP_0
+keycode 83 = 0xe01
+ altgr keycode 83 = VoidSymbol
+ altgr control keycode 83 = VoidSymbol
+ control keycode 83 = F12
+ alt keycode 83 = Console_12
+ control alt keycode 83 = VoidSymbol
+ kana keycode 83 = KP_Period
+ shift kana keycode 83 = KP_Period
+keycode 84 = 0xe02
+ altgr keycode 84 = VoidSymbol
+ altgr control keycode 84 = VoidSymbol
+ control keycode 84 = F13
+ alt keycode 84 = Console_13
+ control alt keycode 84 = VoidSymbol
+ kana keycode 84 = Last_Console
+ shift kana keycode 84 = Last_Console
+keycode 85 = F14 F14
+ control keycode 85 = F14
+ alt keycode 85 = Console_14
+ control kana keycode 85 = F14
+keycode 86 = F15
+ alt keycode 86 = Console_15
+ kana keycode 86 = less
+ shift kana keycode 86 = less
+keycode 87 =
+ kana keycode 87 = F11
+ shift kana keycode 87 = F11
+keycode 88 =
+ kana keycode 88 = F12
+ shift kana keycode 88 = F12
+keycode 89 =
+keycode 90 =
+keycode 91 =
+keycode 92 =
+keycode 93 =
+keycode 94 = Find
+ kana keycode 94 = VoidSymbol
+ shift kana keycode 94 = VoidSymbol
+keycode 95 =
+keycode 96 = Break
+ kana keycode 96 = KP_Enter
+ shift kana keycode 96 = KP_Enter
+keycode 97 = Scroll_Lock
+ kana keycode 97 = Control
+ shift kana keycode 97 = Control
+keycode 98 = F1
+ altgr keycode 98 = VoidSymbol
+ altgr control keycode 98 = VoidSymbol
+ alt keycode 98 = Console_1
+ control alt keycode 98 = VoidSymbol
+ kana keycode 98 = Console_2
+ shift kana keycode 98 = Console_2
+keycode 99 = F2
+ altgr keycode 99 = VoidSymbol
+ altgr control keycode 99 = VoidSymbol
+ alt keycode 99 = Console_2
+ control alt keycode 99 = VoidSymbol
+ kana keycode 99 = Console_3
+ shift kana keycode 99 = Console_3
+keycode 100 = F3
+ altgr keycode 100 = VoidSymbol
+ altgr control keycode 100 = VoidSymbol
+ alt keycode 100 = Console_3
+ control alt keycode 100 = VoidSymbol
+ kana keycode 100 = AltGr
+ shift kana keycode 100 = AltGr
+keycode 101 = F4
+ altgr keycode 101 = VoidSymbol
+ altgr control keycode 101 = VoidSymbol
+ alt keycode 101 = Console_4
+ control alt keycode 101 = VoidSymbol
+ kana keycode 101 = Break
+ shift kana keycode 101 = Break
+keycode 102 = F5
+ altgr keycode 102 = VoidSymbol
+ altgr control keycode 102 = VoidSymbol
+ alt keycode 102 = Console_5
+ control alt keycode 102 = VoidSymbol
+ kana keycode 102 = Find
+ shift kana keycode 102 = Find
+keycode 103 = F6
+ altgr keycode 103 = VoidSymbol
+ altgr control keycode 103 = VoidSymbol
+ alt keycode 103 = Console_6
+ control alt keycode 103 = VoidSymbol
+ kana keycode 103 = Up
+ shift kana keycode 103 = Up
+keycode 104 = F7
+ altgr keycode 104 = VoidSymbol
+ altgr control keycode 104 = VoidSymbol
+ alt keycode 104 = Console_7
+ control alt keycode 104 = VoidSymbol
+ kana keycode 104 = Prior
+ shift kana keycode 104 = Prior
+keycode 105 = F8
+ altgr keycode 105 = VoidSymbol
+ altgr control keycode 105 = VoidSymbol
+ alt keycode 105 = Console_8
+ control alt keycode 105 = VoidSymbol
+ kana keycode 105 = Left
+ shift kana keycode 105 = Left
+keycode 106 = F9
+ altgr keycode 106 = VoidSymbol
+ altgr control keycode 106 = VoidSymbol
+ alt keycode 106 = Console_9
+ control alt keycode 106 = VoidSymbol
+ kana keycode 106 = Right
+ shift kana keycode 106 = Right
+keycode 107 = F10
+ altgr keycode 107 = VoidSymbol
+ altgr control keycode 107 = VoidSymbol
+ alt keycode 107 = Console_10
+ control alt keycode 107 = VoidSymbol
+ kana keycode 107 = Select
+ shift kana keycode 107 = Select
+keycode 108 =
+ kana keycode 108 = Down
+ shift kana keycode 108 = Down
+keycode 109 =
+ kana keycode 109 = Next
+ shift kana keycode 109 = Next
+keycode 110 =
+ kana keycode 110 = Insert
+ shift kana keycode 110 = Insert
+keycode 111 =
+ kana keycode 111 = Remove
+ shift kana keycode 111 = Remove
+keycode 112 = Shift
+keycode 113 = Caps_Lock
+keycode 114 = KanaShift
+keycode 115 = Alt
+ kana keycode 115 = VoidSymbol
+ shift kana keycode 115 = VoidSymbol
+keycode 116 = Control
+keycode 117 =
+ kana keycode 117 = F17
+ shift kana keycode 117 = F17
+keycode 118 =
+ kana keycode 118 = KP_MinPlus
+ shift kana keycode 118 = KP_MinPlus
+keycode 119 =
+ kana keycode 119 = Pause
+ shift kana keycode 119 = Pause
+keycode 120 =
+keycode 121 =
+keycode 122 =
+keycode 123 =
+keycode 124 =
+keycode 125 =
+keycode 126 =
+keycode 127 =
+string F1 = "\033[[A"
+string F2 = "\033[[B"
+string F3 = "\033[[C"
+string F4 = "\033[[D"
+string F5 = "\033[[E"
+string F6 = "\033[17~"
+string F7 = "\033[18~"
+string F8 = "\033[19~"
+string F9 = "\033[20~"
+string F10 = "\033[21~"
+string F11 = "\033[23~"
+string F12 = "\033[24~"
+string F13 = "\033[25~"
+string F14 = "\033[26~"
+string F15 = "\033[28~"
+string F16 = "\033[29~"
+string F17 = "\033[31~"
+string F18 = "\033[32~"
+string F19 = "\033[33~"
+string F20 = "\033[34~"
+string Find = "\033[1~"
+string Insert = "\033[2~"
+string Remove = "\033[3~"
+string Select = "\033[4~"
+string Prior = "\033[5~"
+string Next = "\033[6~"
diff -urN linux/drivers/char/keyboard.c linux98/drivers/char/keyboard.c
--- linux/drivers/char/keyboard.c Sat Oct 12 13:21:42 2002
+++ linux98/drivers/char/keyboard.c Sat Oct 12 14:18:52 2002
@@ -44,6 +44,9 @@

static void kbd_disconnect(struct input_handle *handle);
extern void ctrl_alt_del(void);
+#ifdef CONFIG_PC9800
+extern void do_change_kanji_mode(int, unsigned long);
+#endif

/*
* Exported functions/variables
@@ -58,7 +61,11 @@
* Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
* This seems a good reason to start with NumLock off.
*/
+#ifndef CONFIG_PC9800
#define KBD_DEFLEDS 0
+#else
+#define KBD_DEFLEDS (1 << VC_NUMLOCK)
+#endif
#endif

#ifndef KBD_DEFLOCK
@@ -73,23 +80,41 @@
* Handler Tables.
*/

+#ifndef CONFIG_PC9800
#define K_HANDLERS\
k_self, k_fn, k_spec, k_pad,\
k_dead, k_cons, k_cur, k_shift,\
k_meta, k_ascii, k_lock, k_lowercase,\
k_slock, k_dead2, k_ignore, k_ignore
+#else
+#define K_HANDLERS\
+ k_self, k_fn, k_spec, k_pad,\
+ k_dead, k_cons, k_cur, k_shift,\
+ k_meta, k_ascii, k_lock, k_lowercase,\
+ k_slock, k_dead2, k_chkmode, k_ignore
+#endif

typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value,
char up_flag);
static k_handler_fn K_HANDLERS;
static k_handler_fn *k_handler[16] = { K_HANDLERS };

+#ifndef CONFIG_PC9800
#define FN_HANDLERS\
fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\
fn_show_state, fn_send_intr, fn_lastcons, fn_caps_toggle,\
fn_num, fn_hold, fn_scroll_forw, fn_scroll_back,\
fn_boot_it, fn_caps_on, fn_compose, fn_SAK,\
fn_dec_console, fn_inc_console, fn_spawn_con, fn_bare_num
+#else
+#define FN_HANDLERS\
+ fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\
+ fn_show_state, fn_send_intr, fn_lastcons, fn_caps_toggle,\
+ fn_num, fn_hold, fn_scroll_forw, fn_scroll_back,\
+ fn_boot_it, fn_caps_on, fn_compose, fn_SAK,\
+ fn_dec_console, fn_inc_console, fn_spawn_con, fn_bare_num, \
+ fn_kana_toggle
+#endif

typedef void (fn_handler_fn)(struct vc_data *vc);
static fn_handler_fn FN_HANDLERS;
@@ -104,6 +129,9 @@
255, ARRAY_SIZE(func_table) - 1, ARRAY_SIZE(fn_handler) - 1, NR_PAD - 1,
NR_DEAD - 1, 255, 3, NR_SHIFT - 1, 255, NR_ASCII - 1, NR_LOCK - 1,
255, NR_LOCK - 1, 255
+#ifdef CONFIG_PC9800
+ , 2
+#endif
};

const int NR_TYPES = ARRAY_SIZE(max_vals);
@@ -145,6 +173,7 @@

#ifdef CONFIG_MAGIC_SYSRQ
unsigned char kbd_sysrq_xlate[128] =
+#ifndef CONFIG_PC9800
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
@@ -152,6 +181,15 @@
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
"\r\000/"; /* 0x60 - 0x6f */
+#else /* CONFIG_PC9800 */
+ "\0331234567890-^\\\177\t" /* 0x00 - 0x0f */
+ "qwertyuiop@[\rasd" /* 0x10 - 0x1f */
+ "fghjkl;:]zxcvbnm" /* 0x20 - 0x2f */
+ ",./_ \000\000\000\000\177\000\000\000\000\000\000" /* 0x30 - 0x3f */
+ "-/789*456+123=0," /* 0x40 - 0x4f */
+ ".\000\213\214\215\216\217\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
+ "\000\000\201\202\203\204\205\206\207\210\211\212"; /* 0x60 - 0x6f */
+#endif /* !CONFIG_PC9800 */
static int sysrq_down;
#endif
static int sysrq_alt;
@@ -447,6 +485,15 @@
set_vc_kbd_led(kbd, VC_CAPSLOCK);
}

+#ifdef CONFIG_PC9800
+static void fn_kana_toggle(struct vc_data *vc)
+{
+ if (rep)
+ return;
+ chg_vc_kbd_led(kbd, VC_KANALOCK);
+}
+#endif
+
static void fn_show_ptregs(struct vc_data *vc)
{
if (kbd_pt_regs)
@@ -535,12 +582,20 @@

static void fn_scroll_forw(struct vc_data *vc)
{
+#ifndef CONFIG_PC9800
scrollfront(0);
+#else
+ scrollfront(3);
+#endif
}

static void fn_scroll_back(struct vc_data *vc)
{
+#ifndef CONFIG_PC9800
scrollback(0);
+#else
+ scrollback(3);
+#endif
}

static void fn_show_mem(struct vc_data *vc)
@@ -597,7 +652,11 @@

static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
{
+#ifndef CONFIG_PC9800
if (up_flag)
+#else
+ if (up_flag && value != 7 && value != 0x14) /* caps/kana lock */
+#endif
return;
if (value >= ARRAY_SIZE(fn_handler))
return;
@@ -651,6 +710,16 @@
k_dead2(vc, value, up_flag);
}

+#ifdef CONFIG_PC9800
+static void k_chkmode(struct vc_data *vc, unsigned char value, char up_flag)
+{
+ if (up_flag)
+ return;
+
+ do_change_kanji_mode(fg_console, value);
+}
+#endif /* CONFIG_PC9800 */
+
static void k_cons(struct vc_data *vc, unsigned char value, char up_flag)
{
if (up_flag)
@@ -910,6 +979,9 @@
input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01));
input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02));
input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04));
+#ifdef CONFIG_PC9800
+ input_event(handle->dev, EV_LED, LED_KANA, !!(leds & 0x08));
+#endif
}
}

@@ -918,7 +990,7 @@

DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0);

-#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
+#if (defined(CONFIG_X86) && !defined(CONFIG_PC9800)) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)

static unsigned short x86_keycodes[256] =
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
@@ -1084,6 +1156,11 @@
shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
key_map = key_maps[shift_final];

+#ifdef CONFIG_PC9800
+ if (vc_kbd_led(kbd, VC_KANALOCK))
+ shift_final |= (1 << KG_KANASHIFT);
+#endif
+
if (!key_map) {
compute_shiftstate();
kbd->slockstate = 0;
diff -urN linux/include/linux/kbd_kern.h linux98/include/linux/kbd_kern.h
--- linux/include/linux/kbd_kern.h Mon Apr 15 04:18:55 2002
+++ linux98/include/linux/kbd_kern.h Wed Apr 17 15:51:19 2002
@@ -1,6 +1,7 @@
#ifndef _KBD_KERN_H
#define _KBD_KERN_H

+#include <linux/config.h>
#include <linux/tty.h>
#include <linux/interrupt.h>
#include <linux/keyboard.h>
@@ -43,11 +44,19 @@
#define LED_SHOW_IOCTL 1 /* only change leds upon ioctl */
#define LED_SHOW_MEM 2 /* `heartbeat': peek into memory */

+#ifdef CONFIG_PC9800
+ unsigned char ledflagstate:4; /* flags, not lights */
+ unsigned char default_ledflagstate:4;
+#else
unsigned char ledflagstate:3; /* flags, not lights */
unsigned char default_ledflagstate:3;
+#endif
#define VC_SCROLLOCK 0 /* scroll-lock mode */
#define VC_NUMLOCK 1 /* numeric lock mode */
#define VC_CAPSLOCK 2 /* capslock mode */
+#ifdef CONFIG_PC9800
+#define VC_KANALOCK 3 /* kanalock mode */
+#endif

unsigned char kbdmode:2; /* one 2-bit value */
#define VC_XLATE 0 /* translate keycodes using keymap */
@@ -69,6 +78,8 @@

extern unsigned char getledstate(void);
extern void setledstate(struct kbd_struct *kbd, unsigned int led);
+struct kbd_repeat;
+extern int setrepeat(struct kbd_repeat *);

extern int do_poke_blanked_console;

diff -urN linux/include/linux/keyboard.h linux98/include/linux/keyboard.h
--- linux/include/linux/keyboard.h Sat Oct 12 13:21:33 2002
+++ linux98/include/linux/keyboard.h Sat Oct 12 19:51:13 2002
@@ -1,6 +1,7 @@
#ifndef __LINUX_KEYBOARD_H
#define __LINUX_KEYBOARD_H

+#include <linux/config.h>
#include <linux/wait.h>
#include <linux/input.h>

@@ -9,6 +10,9 @@
#define KG_ALT 3
#define KG_ALTGR 1
#define KG_SHIFTL 4
+#ifdef CONFIG_PC9800
+#define KG_KANASHIFT 4
+#endif
#define KG_SHIFTR 5
#define KG_CTRLL 6
#define KG_CTRLR 7
diff -urN linux/include/linux/logibusmouse.h linux98/include/linux/logibusmouse.h
--- linux/include/linux/logibusmouse.h Tue Aug 3 01:54:29 1999
+++ linux98/include/linux/logibusmouse.h Fri Aug 17 22:15:13 2001
@@ -27,12 +27,20 @@
*
*/

+#include <linux/config.h>
+
+#ifdef CONFIG_LOGIBUSMOUSE_PC9800
+#define MOUSE_IRQ 13
+#else
#define MOUSE_IRQ 5
+#endif
#define LOGITECH_BUSMOUSE 0 /* Minor device # for Logitech */
#define MICROSOFT_BUSMOUSE 2 /* Minor device # for Microsoft */

/*--------- LOGITECH BUSMOUSE ITEMS -------------*/

+#ifndef CONFIG_LOGIBUSMOUSE_PC9800
+
#define LOGIBM_BASE 0x23c
#define MSE_DATA_PORT 0x23c
#define MSE_SIGNATURE_PORT 0x23d
@@ -41,6 +49,18 @@
#define MSE_CONFIG_PORT 0x23f
#define LOGIBM_EXTENT 0x4

+#else /* CONFIG_LOGIBUSMOUSE_PC9800 */
+
+#define LOGIBM_BASE 0x7fd9
+#define MSE_DATA_PORT (LOGIBM_BASE + 0)
+/* MSE_SIGNATURE_PORT does not exist */
+#define MSE_CONTROL_PORT (LOGIBM_BASE + 4)
+/* MSE_INTERRUPT_PORT does not exist */
+#define MSE_CONFIG_PORT (LOGIBM_BASE + 6)
+#define LOGIBM_EXTENT (-7)
+
+#endif /* !CONFIG_LOGIBUSMOUSE_PC9800 */
+
#define MSE_ENABLE_INTERRUPTS 0x00
#define MSE_DISABLE_INTERRUPTS 0x10

@@ -49,10 +69,20 @@
#define MSE_READ_Y_LOW 0xc0
#define MSE_READ_Y_HIGH 0xe0

+#ifndef CONFIG_LOGIBUSMOUSE_PC9800
/* Magic number used to check if the mouse exists */
#define MSE_CONFIG_BYTE 0x91
#define MSE_DEFAULT_MODE 0x90
#define MSE_SIGNATURE_BYTE 0xa5
+#else
+/* Magic number used to check if the mouse exists */
+/* #define MSE_CONFIG_BYTE is not used */
+#define MSE_DEFAULT_MODE 0x93
+/* #define MSE_SIGNATURE_BYTE is not used */
+
+#define MSE_TIMER_PORT 0xbfdb
+#define MSE_DEFAULT_TIMER_VAL 0x00
+#endif

/* useful Logitech Mouse macros */

diff -urN linux/include/linux/pc_keyb.h linux98/include/linux/pc_keyb.h
--- linux/include/linux/pc_keyb.h Tue Oct 12 02:15:40 1999
+++ linux98/include/linux/pc_keyb.h Fri Aug 17 22:15:13 2001
@@ -6,6 +6,8 @@
* (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/

+#include <linux/config.h>
+
/*
* Configuration Switches
*/
@@ -33,9 +35,16 @@
* Keyboard Controller Registers on normal PCs.
*/

+#ifdef CONFIG_PC9800
+#define KBD_STATUS_REG 0x43 /* Status register (R) */
+#define KBD_CNTL_REG 0x43 /* Controller command register (W) */
+#define KBD_DATA_REG 0x41 /* Keyboard data register (R/W) */
+#define KBD_MODE_REG 0x43
+#else /* !CONFIG_PC9800 */
#define KBD_STATUS_REG 0x64 /* Status register (R) */
#define KBD_CNTL_REG 0x64 /* Controller command register (W) */
#define KBD_DATA_REG 0x60 /* Keyboard data register (R/W) */
+#endif /* CONFIG_PC9800 */

/*
* Keyboard Controller Commands
@@ -59,11 +68,16 @@
* Keyboard Commands
*/

+#ifdef CONFIG_PC9800
+#define KBD_CMD_SET_RATE 0x9C /* Set typematic rate */
+#define KBD_CMD_SET_LEDS 0x9D /* Set keyboard leds */
+#else /* CONFIG_PC9800 */
#define KBD_CMD_SET_LEDS 0xED /* Set keyboard leds */
#define KBD_CMD_SET_RATE 0xF3 /* Set typematic rate */
#define KBD_CMD_ENABLE 0xF4 /* Enable scanning */
#define KBD_CMD_DISABLE 0xF5 /* Disable scanning */
#define KBD_CMD_RESET 0xFF /* Reset */
+#endif /* CONFIG_PC9800 */

/*
* Keyboard Replies
@@ -71,7 +85,11 @@

#define KBD_REPLY_POR 0xAA /* Power on reset */
#define KBD_REPLY_ACK 0xFA /* Command ACK */
+#ifdef CONFIG_PC9800
+#define KBD_REPLY_RESEND 0xFC /* Command NACK, send the cmd again */
+#else
#define KBD_REPLY_RESEND 0xFE /* Command NACK, send the cmd again */
+#endif

/*
* Status Register Bits
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.081 / U:6.356 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site