Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Added WS020SH keymap.
details: https://anonhg.NetBSD.org/src/rev/b0141fff5fbf
branches: trunk
changeset: 755129:b0141fff5fbf
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sun May 23 11:57:04 2010 +0000
description:
Added WS020SH keymap.
diffstat:
sys/arch/hpcarm/dev/wzero3_kbd.c | 34 ++++++++++---
sys/dev/hpc/hpckbdkeymap.h | 95 +++++++++++++++++++++++++++++++++++++--
2 files changed, 114 insertions(+), 15 deletions(-)
diffs (211 lines):
diff -r 8c850bfe1a8e -r b0141fff5fbf sys/arch/hpcarm/dev/wzero3_kbd.c
--- a/sys/arch/hpcarm/dev/wzero3_kbd.c Sun May 23 11:53:18 2010 +0000
+++ b/sys/arch/hpcarm/dev/wzero3_kbd.c Sun May 23 11:57:04 2010 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: wzero3_kbd.c,v 1.3 2010/04/24 21:51:56 nonaka Exp $ */
+/* $NetBSD: wzero3_kbd.c,v 1.4 2010/05/23 11:57:04 nonaka Exp $ */
/*
- * Copyright (c) 2008, 2009 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
+ * Copyright (c) 2008, 2009, 2010 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wzero3_kbd.c,v 1.3 2010/04/24 21:51:56 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wzero3_kbd.c,v 1.4 2010/05/23 11:57:04 nonaka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -141,7 +141,7 @@
static int wzero3kbd_poll1(void *arg);
/*
- * WS003SH keyscan map
+ * WS003SH/WS004SH/WS007SH keyscan map
col#0 col#1 col#2 col#3 col#4 col#5 col#6 col#7 col#8 col#9 col#10 col#11
row#0: CTRL 1 3 5 6 7 9 0 BS (none) ROTATE CAMERA
row#1: (none) 2 4 r y 8 i o p (none) VOL- VOL+
@@ -156,12 +156,24 @@
* WS011SH keyscan map
col#0 col#1 col#2 col#3 col#4 col#5 col#6 col#7 col#8 col#9 col#10 col#11
row#0 Ctrl (none) (none) (none) (none) (none) (none) (none) Del (none) ROTATE (none)
-row#1 (none) (none) (none) R Y (none) I O (none) (none) (none) (none)
+row#1 (none) (none) (none) R Y (none) I O P (none) (none) (none)
row#2 Tab Q E T G U J K (none) (none) (none) (none)
row#3 (none) W S F V H M L (none) (none) Shift (none)
row#4 (none) A D C B N . (none) Enter (none) (none) (none)
-row#5 (none) Z X - Space / (none) UP (none) (none) (none) (none)
-row#6 (none) MOJI HAN/ZEN OK (none) , LEFT DOWN RIGHT (none) Fn (none)
+row#5 (none) Z X - Space / (none) UP (none) (none) (none) Fn
+row#6 (none) MOJI HAN/ZEN OK (none) , LEFT DOWN RIGHT (none) (none) (none)
+*/
+
+/*
+ * WS020SH keyscan map
+ col#0 col#1 col#2 col#3 col#4 col#5 col#6 col#7 col#8 col#9 col#10 col#11
+row#0 Ctrl (none) (none) (none) (none) (none) (none) (none) Del (none) ROTATE (none)
+row#1 (none) (none) (none) R Y (none) I O P (none) MEDIA (none)
+row#2 Tab Q E T G U J K (none) (none) (none) (none)
+row#3 (none) W S F V H M L (none) (none) LShift (none)
+row#4 (none) A D C B N . (none) Enter (none) RShift (none)
+row#5 (none) Z X - Space / (none) UP (none) DOWN (none) Fn
+row#6 (none) MOJI HAN/ZEN OK (none) , LEFT (none) RIGHT (none) (none) (none)
*/
static const struct wzero3kbd_model {
@@ -212,8 +224,8 @@
{
&platid_mask_MACH_SHARP_WZERO3_WS020SH,
-1, /* XXX */
- -1, /* XXX */
- -1, /* XXX */
+ GPIO_WS020SH_POWER_BUTTON,
+ GPIO_WS020SH_RESET_BUTTON,
WS003SH_NCOLUMN,
WS003SH_NROW,
},
@@ -372,6 +384,10 @@
sc->sc_nouse_pin = GPIO_WS011SH_SD_DETECT; /* SD_DETECT */
sc->sc_nouse_pin2 = 77; /* Vsync? */
}
+ if (platid_match(&platid, &platid_mask_MACH_SHARP_WZERO3_WS020SH)) {
+ sc->sc_nouse_pin = GPIO_WS020SH_SD_DETECT; /* SD_DETECT */
+ sc->sc_nouse_pin2 = 77; /* Vsync? */
+ }
#ifdef KEYTEST
for (sc->sc_test_pin = 2; sc->sc_test_pin < PXA270_GPIO_NPINS; sc->sc_test_pin++) {
diff -r 8c850bfe1a8e -r b0141fff5fbf sys/dev/hpc/hpckbdkeymap.h
--- a/sys/dev/hpc/hpckbdkeymap.h Sun May 23 11:53:18 2010 +0000
+++ b/sys/dev/hpc/hpckbdkeymap.h Sun May 23 11:57:04 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hpckbdkeymap.h,v 1.49 2010/04/17 13:36:21 nonaka Exp $ */
+/* $NetBSD: hpckbdkeymap.h,v 1.50 2010/05/23 11:57:04 nonaka Exp $ */
/*-
* Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -902,7 +902,7 @@
};
/*
- * WS011SH/WS020SH keyscan map
+ * WS011SH keyscan map
Ctrl (none) Tab (none) (none) (none) (none)
(none) (none) Q W A Z MOJI
(none) (none) E S D X HAN/ZEN
@@ -911,7 +911,7 @@
(none) (none) U H N / ,
(none) I J M . (none) LEFT
(none) O K L (none) UP DOWN
- Del (none) (none) (none) Enter (none) RIGHT
+ Del P (none) (none) Enter (none) RIGHT
(none) (none) (none) (none) (none) (none) (none)
ROTATE (none) (none) SHIFT (none) (none) (none)
(none) (none) (none) (none) (none) FN (none)
@@ -982,6 +982,89 @@
KC(205), KS_Right, KS_Right, KS_End,
KC(208), KS_Down, KS_Down, KS_Next,
};
+
+/*
+ * WS020SH keyscan map
+ Ctrl (none) Tab (none) (none) (none) (none)
+ (none) (none) Q W A Z MOJI
+ (none) (none) E S D X HAN/ZEN
+ (none) R T F C - OK
+ (none) Y G V B Space (none)
+ (none) (none) U H N / ,
+ (none) I J M . (none) LEFT
+ (none) O K L (none) UP (none)
+ Del P (none) (none) Enter (none) RIGHT
+ (none) (none) (none) (none) (none) DOWN (none)
+ ROTATE MEDIA (none) LSHIFT RSHIFT (none) (none)
+ (none) (none) (none) (none) (none) FN (none)
+*/
+/* Japanese */
+const uint8_t ws020sh_jp_keytrans[] = {
+/* row#0, row#1, row#2, row#3, row#4, row#5, row#6, */
+/*00*/ 29, UNK, 15, UNK, UNK, UNK, UNK,
+/*01*/ UNK, UNK, 16, 17, 30, 44, 1,
+/*02*/ UNK, UNK, 18, 31, 32, 45, 41,
+/*03*/ UNK, 19, 20, 33, 46, 12, 3,
+/*04*/ UNK, 21, 34, 47, 48, 57, UNK,
+/*05*/ UNK, UNK, 22, 35, 49, 53, 51,
+/*06*/ UNK, 23, 36, 50, 52, UNK, 203,
+/*07*/ UNK, 24, 37, 38, UNK, 200, UNK,
+/*08*/ 14, 25, UNK, UNK, 28, UNK, 205,
+/*09*/ UNK, UNK, UNK, UNK, UNK, 208, UNK,
+/*10*/ IGN, IGN, UNK, 42, 54, UNK, UNK,
+/*11*/ UNK, UNK, UNK, UNK, UNK, 184, SPL,
+};
+
+const int ws020sh_special_keymap[] = {
+ [KEY_SPECIAL_OFF] = 83,
+ [KEY_SPECIAL_LIGHT] = -1
+};
+
+static const keysym_t ws020sh_jp_keydesc[] = {
+/* pos normal shifted altgr */
+ KC(3), KS_grave, KS_braceleft, KS_braceright,
+ KC(12), KS_minus, KS_equal, KS_backslash,
+ KC(14), KS_Delete, KS_Delete, KS_BackSpace,
+ KC(15), KS_Tab, KS_Tab, KS_Escape,
+ KC(16), KS_q, KS_Q, KS_quotedbl,
+ KC(17), KS_w, KS_W, KS_numbersign,
+ KC(18), KS_e, KS_E, KS_dollar,
+ KC(19), KS_r, KS_R, KS_percent,
+ KC(20), KS_t, KS_T, KS_ampersand,
+ KC(21), KS_y, KS_Y, KS_underscore,
+ KC(22), KS_u, KS_U, KS_1,
+ KC(23), KS_i, KS_I, KS_2,
+ KC(24), KS_o, KS_O, KS_3,
+ KC(25), KS_p, KS_P, KS_at,
+ KC(30), KS_a, KS_A, KS_bracketleft,
+ KC(31), KS_s, KS_S, KS_apostrophe,
+ KC(32), KS_d, KS_D, KS_parenleft,
+ KC(33), KS_f, KS_F, KS_parenright,
+ KC(34), KS_g, KS_G, KS_asterisk,
+ KC(35), KS_h, KS_H, KS_4,
+ KC(36), KS_j, KS_J, KS_5,
+ KC(37), KS_k, KS_K, KS_6,
+ KC(38), KS_l, KS_L, KS_plus,
+ KC(41), KS_Zenkaku_Hankaku, KS_Zenkaku_Hankaku, KS_exclam,
+ KC(42), KS_Shift_L, KS_Shift_L, KS_Shift_Lock,
+ KC(44), KS_z, KS_Z, KS_bracketright,
+ KC(45), KS_x, KS_X, KS_asciicircum,
+ KC(46), KS_c, KS_C, KS_asciitilde,
+ KC(47), KS_v, KS_V, KS_bar,
+ KC(48), KS_b, KS_B, KS_7,
+ KC(49), KS_n, KS_N, KS_8,
+ KC(50), KS_m, KS_M, KS_9,
+ KC(51), KS_comma, KS_less, KS_semicolon,
+ KC(52), KS_period, KS_greater, KS_colon,
+ KC(53), KS_slash, KS_question, KS_0,
+ KC(54), KS_Shift_R, KS_Shift_R, KS_Shift_Lock,
+ KC(57), KS_space,
+ KC(184), KS_Mode_switch, KS_Multi_key,
+ KC(200), KS_Up, KS_Up, KS_Prior,
+ KC(203), KS_Left, KS_Left, KS_Home,
+ KC(205), KS_Right, KS_Right, KS_End,
+ KC(208), KS_Down, KS_Down, KS_Next,
+};
#endif /* hpcarm */
#if defined(hpcarm) || defined(hpcsh)
@@ -1452,9 +1535,9 @@
KB_JP },
/* WS020SH */
{ &platid_mask_MACH_SHARP_WZERO3_WS020SH,
- ws011sh_jp_keytrans,
- ws011sh_special_keymap,
- CMDMAP(ws011sh_jp_keydesc),
+ ws020sh_jp_keytrans,
+ ws020sh_special_keymap,
+ CMDMAP(ws020sh_jp_keydesc),
KB_JP },
#endif /* hpcarm */
Home |
Main Index |
Thread Index |
Old Index