summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/hil/hilkbd.c31
-rw-r--r--sys/dev/hil/hilkbdmap.c537
-rw-r--r--sys/dev/hil/hilkbdmap.h3
3 files changed, 420 insertions, 151 deletions
diff --git a/sys/dev/hil/hilkbd.c b/sys/dev/hil/hilkbd.c
index 970ef4211ea..c487cb842d0 100644
--- a/sys/dev/hil/hilkbd.c
+++ b/sys/dev/hil/hilkbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hilkbd.c,v 1.10 2005/01/18 18:52:31 miod Exp $ */
+/* $OpenBSD: hilkbd.c,v 1.11 2005/05/07 22:42:30 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -112,6 +112,15 @@ struct wskbd_mapdata hilkbd_keymapdata = {
#endif
};
+struct wskbd_mapdata hilkbd_keymapdata_ps2 = {
+ hilkbd_keydesctab_ps2,
+#ifdef HILKBD_LAYOUT
+ HILKBD_LAYOUT,
+#else
+ KB_US,
+#endif
+};
+
void hilkbd_bell(struct hil_softc *, u_int, u_int, u_int);
void hilkbd_callback(struct hildev_softc *, u_int, u_int8_t *);
void hilkbd_decode(u_int8_t, u_int8_t, u_int *, int *);
@@ -138,6 +147,7 @@ hilkbdattach(struct device *parent, struct device *self, void *aux)
struct hil_attach_args *ha = aux;
struct wskbddev_attach_args a;
u_int8_t layoutcode;
+ int ps2;
sc->hd_code = ha->ha_code;
sc->hd_type = ha->ha_type;
@@ -153,7 +163,8 @@ hilkbdattach(struct device *parent, struct device *self, void *aux)
#ifndef HILKBD_LAYOUT
if (layoutcode < MAXHILKBDLAYOUT &&
hilkbd_layouts[layoutcode] != -1)
- hilkbd_keymapdata.layout = hilkbd_layouts[layoutcode];
+ hilkbd_keymapdata.layout =
+ hilkbd_keymapdata_ps2.layout = hilkbd_layouts[layoutcode];
#endif
printf(", layout %x", layoutcode);
@@ -170,18 +181,28 @@ hilkbdattach(struct device *parent, struct device *self, void *aux)
printf("\n");
+ /*
+ * Red lettered keyboards come in two flavours, the old one
+ * with only one control key, to the left of the escape key,
+ * and the modern one which has a PS/2 like layout, and leds.
+ *
+ * Unfortunately for us, they use the same device ID range.
+ * We'll differentiate them by looking at the leds property.
+ */
+ ps2 = (sc->sc_numleds != 0);
+
#ifdef WSDISPLAY_COMPAT_RAWKBD
timeout_set(&sc->sc_rawrepeat_ch, hilkbd_rawrepeat, sc);
#endif
a.console = hilkbd_is_console(ha->ha_console);
- a.keymap = &hilkbd_keymapdata;
+ a.keymap = ps2 ? &hilkbd_keymapdata_ps2 : &hilkbd_keymapdata;
a.accessops = &hilkbd_accessops;
a.accesscookie = sc;
if (a.console) {
sc->sc_console = sc->sc_enabled = 1;
- wskbd_cnattach(&hilkbd_consops, sc, &hilkbd_keymapdata);
+ wskbd_cnattach(&hilkbd_consops, sc, a.keymap);
} else {
sc->sc_console = sc->sc_enabled = 0;
}
@@ -193,7 +214,7 @@ hilkbdattach(struct device *parent, struct device *self, void *aux)
* key, simulate it being pressed so that the keyboard runs in
* numeric mode.
*/
- if (sc->sc_numleds == 0 && sc->sc_wskbddev != NULL) {
+ if (!ps2 && sc->sc_wskbddev != NULL) {
wskbd_input(sc->sc_wskbddev, WSCONS_EVENT_KEY_DOWN, 80);
wskbd_input(sc->sc_wskbddev, WSCONS_EVENT_KEY_UP, 80);
}
diff --git a/sys/dev/hil/hilkbdmap.c b/sys/dev/hil/hilkbdmap.c
index ea8189724b9..be09e27e022 100644
--- a/sys/dev/hil/hilkbdmap.c
+++ b/sys/dev/hil/hilkbdmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hilkbdmap.c,v 1.6 2005/02/28 20:40:04 miod Exp $ */
+/* $OpenBSD: hilkbdmap.c,v 1.7 2005/05/07 22:42:30 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -46,14 +46,14 @@ const u_int8_t hilkbd_raw[0x80] = {
RAWKEY_Shift_R,
RAWKEY_Shift_L,
RAWKEY_Control_L,
- RAWKEY_Null, /* 7 Break/Reset */
+ RAWKEY_Pause, /* 7 Break/Reset */
RAWKEY_KP_Left,
RAWKEY_KP_Up,
RAWKEY_KP_Begin,
RAWKEY_KP_Prior,
RAWKEY_KP_Right,
RAWKEY_KP_Home,
- RAWKEY_comma, /* numeric pad */
+ RAWKEY_KP_Delete,
RAWKEY_KP_Enter,
RAWKEY_KP_End,
RAWKEY_KP_Divide,
@@ -174,12 +174,17 @@ const u_int8_t hilkbd_raw[0x80] = {
/*
* 1f. US ASCII
+ *
+ * We use the same table for PS/2 and old HIL keyboards, as the only
+ * differences are a few keys which are only present in one of both layouts,
+ * and the one-function-only keypad in the old HIL flavour (hilkbd.c knows
+ * about this and does The Right Thing).
*/
-const keysym_t hilkbd_keydesc_us[] = {
+static const keysym_t hilkbd_keydesc_us[] = {
/* pos command normal shifted */
- KC(0), KS_Control_R,
- KC(2), KS_Cmd2, KS_Alt_R, KS_Multi_key,
+ KC(0), KS_Cmd1, KS_Control_R,
+ KC(2), KS_Cmd2, KS_Mode_switch, KS_Multi_key,
KC(3), KS_Cmd2, KS_Alt_L,
KC(4), KS_Shift_R,
KC(5), KS_Shift_L,
@@ -191,7 +196,7 @@ const keysym_t hilkbd_keydesc_us[] = {
KC(11), KS_KP_Prior, KS_KP_9,
KC(12), KS_KP_Right, KS_KP_6,
KC(13), KS_KP_Home, KS_KP_7,
- KC(14), KS_comma, /* numeric pad */
+ KC(14), KS_KP_Separator,
KC(15), KS_KP_Enter,
KC(16), KS_KP_End, KS_KP_1,
KC(17), KS_KP_Divide,
@@ -202,10 +207,10 @@ const keysym_t hilkbd_keydesc_us[] = {
KC(22), KS_KP_Insert, KS_KP_0,
KC(23), KS_KP_Subtract,
KC(24), KS_b,
- KC(25), KS_v,
- KC(26), KS_c,
- KC(27), KS_x,
- KC(28), KS_z,
+ KC(25), KS_v, KS_V, KS_section,
+ KC(26), KS_c, KS_C, KS_ccedilla,
+ KC(27), KS_x, KS_X, KS_L2_scaron,
+ KC(28), KS_z, KS_Z, KS_paragraph,
/* 29 Kanji Left */
KC(31), KS_Cmd_Debugger, KS_Escape, KS_Delete,
@@ -215,30 +220,32 @@ const keysym_t hilkbd_keydesc_us[] = {
KC(37), KS_Cmd_Screen8, KS_f9, /* also KS_KP_F1 */
KC(38), KS_Tab, /* numeric pad */
KC(39), KS_Cmd_Screen11, KS_f12, /* also KS_KP_F4 */
- KC(40), KS_h,
- KC(41), KS_g,
+ KC(40), KS_h, KS_H, KS_yen,
+ KC(41), KS_g, KS_G, KS_currency,
KC(42), KS_f,
- KC(43), KS_d,
- KC(44), KS_s,
- KC(45), KS_a,
+ KC(43), KS_d, KS_D, KS_eth,
+ KC(44), KS_s, KS_S, KS_ssharp,
+ KC(45), KS_a, KS_A, KS_aring,
/* 46 Mode_Switch ??? */
KC(47), KS_Caps_Lock,
- KC(48), KS_u,
- KC(49), KS_y,
- KC(50), KS_t,
- KC(51), KS_r,
- KC(52), KS_e,
- KC(53), KS_w,
- KC(54), KS_q,
+ KC(48), KS_u, KS_U, KS_dead_diaeresis,
+ KC(49), KS_y, KS_Y, KS_dead_circumflex,
+ KC(50), KS_t, KS_T, KS_dead_grave,
+ KC(51), KS_r, KS_R, KS_dead_acute,
+ KC(52), KS_e, KS_E, KS_ae,
+ KC(53), KS_w, KS_W, KS_asciitilde,
+ KC(54), KS_q, KS_Q, KS_periodcentered,
KC(55), KS_Tab,
- KC(56), KS_7, KS_ampersand,
- KC(57), KS_6, KS_asciicircum,
- KC(58), KS_5, KS_percent,
+ KC(56), KS_7, KS_ampersand, KS_backslash,
+ KC(57), KS_6, KS_asciicircum, KS_asciicircum,
+ KC(58), KS_5, KS_percent, KS_onehalf,
KC(59), KS_4, KS_dollar,
- KC(60), KS_3, KS_numbersign,
- KC(61), KS_2, KS_at,
- KC(62), KS_1, KS_exclam,
+ KS_onequarter, KS_threequarters,
+ KC(60), KS_3, KS_numbersign, KS_numbersign,
+ KC(61), KS_2, KS_at, KS_at,
+ KC(62), KS_1, KS_exclam, KS_exclamdown,
KC(63), KS_grave, KS_asciitilde,
+ KS_guillemotleft,KS_guillemotright,
KC(72), KS_Print_Screen, /* Menu */
KC(73), KS_Cmd_Screen3, KS_f4,
@@ -255,40 +262,44 @@ const keysym_t hilkbd_keydesc_us[] = {
KC(84), KS_Cmd_Screen7, KS_f8,
/* 86 Clear line */
- /* 87 Clear display */
+ KC(87), KS_Clear,
KC(88), KS_8, KS_asterisk,
+ KS_bracketleft, KS_braceleft,
KC(89), KS_9, KS_parenleft,
- KC(90), KS_0, KS_parenright,
- KC(91), KS_minus, KS_underscore,
- KC(92), KS_equal, KS_plus,
+ KS_bracketright,KS_braceright,
+ KC(90), KS_0, KS_parenright, KS_questiondown,
+ KC(91), KS_minus, KS_underscore, KS_macron,
+ KC(92), KS_equal, KS_plus, KS_plusminus,
KC(93), KS_Cmd_ResetEmul, KS_Delete, /* Backspace */
/* 94 Insert line */
/* 95 Delete line */
- KC(96), KS_i,
- KC(97), KS_o,
- KC(98), KS_p,
- KC(99), KS_bracketleft, KS_braceleft,
+ KC(96), KS_i, KS_I, KS_dead_tilde,
+ KC(97), KS_o, KS_O, KS_oslash,
+ KC(98), KS_p, KS_P, KS_thorn,
+ KC(99), KS_bracketleft, KS_braceleft, KS_degree,
KC(100), KS_bracketright,KS_braceright,
- KC(101), KS_backslash, KS_bar,
+ KS_bar, KS_brokenbar,
+ KC(101), KS_backslash, KS_bar, KS_mu,
KC(102), KS_Insert,
KC(103), KS_Delete,
- KC(104), KS_j,
- KC(105), KS_k,
- KC(106), KS_l,
+ KC(104), KS_j, KS_J, KS_dollar,
+ KC(105), KS_k, KS_K, KS_cent,
+ KC(106), KS_l, KS_L, KS_sterling,
KC(107), KS_semicolon, KS_colon,
KC(108), KS_apostrophe, KS_quotedbl,
+ KS_grave, KS_apostrophe,
KC(109), KS_Return,
KC(110), KS_Home,
KC(111), KS_Cmd_ScrollBack, KS_Prior,
- KC(112), KS_m,
- KC(113), KS_comma, KS_less,
- KC(114), KS_period, KS_greater,
- KC(115), KS_slash, KS_question,
+ KC(112), KS_m, KS_M, KS_masculine,
+ KC(113), KS_comma, KS_less, KS_less,
+ KC(114), KS_period, KS_greater, KS_greater,
+ KC(115), KS_slash, KS_question, KS_underscore,
KC(117), KS_End, /* Select */
KC(119), KS_Cmd_ScrollFwd, KS_Next,
- KC(120), KS_n,
+ KC(120), KS_n, KS_N, KS_ordfeminine,
KC(121), KS_space,
/* 123 Kanji Right */
@@ -302,125 +313,349 @@ const keysym_t hilkbd_keydesc_us[] = {
* 0e. Swedish
*/
-const keysym_t hilkbd_keydesc_sv[] = {
- KC(56), KS_7, KS_slash,
- KC(57), KS_6, KS_ampersand,
- KC(61), KS_2, KS_quotedbl,
- KC(63), KS_less, KS_greater,
- KC(88), KS_8, KS_parenleft,
- KC(89), KS_9, KS_parenright,
- KC(90), KS_0, KS_equal,
- KC(91), KS_plus, KS_question,
- KC(92), KS_grave, KS_at,
- KC(99), KS_braceright, KS_bracketright,
- KC(100), KS_asciitilde, KS_asciicircum,
- KC(101), KS_apostrophe, KS_asterisk,
- KC(107), KS_bar, KS_backslash,
- KC(108), KS_braceleft, KS_bracketleft,
- KC(113), KS_comma, KS_semicolon,
- KC(114), KS_period, KS_colon,
- KC(115), KS_minus, KS_underscore,
+static const keysym_t hilkbd_keydesc_sv[] = {
+ KC(56), KS_7, KS_slash, KS_backslash,
+ KC(57), KS_6, KS_ampersand, KS_asciicircum,
+ KC(61), KS_2, KS_quotedbl, KS_at,
+ KC(63), KS_less, KS_greater,
+ KS_guillemotleft,KS_guillemotright,
+ KC(88), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
+ KC(89), KS_9, KS_parenright, KS_bracketright,KS_braceright,
+ KC(90), KS_0, KS_equal, KS_exclamdown,
+ KC(91), KS_plus, KS_question, KS_macron,
+ KC(92), KS_eacute, KS_Eacute, KS_plusminus,
+ KC(97), KS_aring, KS_Aring, KS_degree,
+ KC(98), KS_udiaeresis, KS_Udiaeresis, KS_bar, KS_brokenbar,
+ KC(99), KS_apostrophe, KS_asterisk, KS_mu,
+ KC(107), KS_odiaeresis,
+ KC(108), KS_adiaeresis, KS_Adiaeresis, KS_grave, KS_apostrophe,
+ KC(113), KS_comma, KS_semicolon, KS_less,
+ KC(114), KS_period, KS_colon, KS_greater,
+ KC(115), KS_minus, KS_underscore, KS_underscore
+};
+
+static const keysym_t hilkbd_keydesc_sv_nodead[] = {
+ KC(48), KS_u, KS_U, KS_diaeresis,
+ KC(49), KS_y, KS_Y, KS_asciicircum,
+ KC(50), KS_t, KS_T, KS_grave,
+ KC(51), KS_r, KS_R, KS_apostrophe,
+ KC(96), KS_i, KS_I, KS_asciitilde,
+};
+
+static const keysym_t hilkbd_keydesc_sv_ps2[] = {
+ KC(24), KS_b,
+ KC(25), KS_v,
+ KC(26), KS_c,
+ KC(27), KS_x,
+ KC(28), KS_z,
+ KC(36), KS_KP_Separator,KS_KP_Delete,
+ KC(40), KS_h,
+ KC(41), KS_g,
+ KC(42), KS_f,
+ KC(43), KS_d,
+ KC(44), KS_s,
+ KC(45), KS_a,
+ KC(48), KS_u,
+ KC(49), KS_y,
+ KC(50), KS_t,
+ KC(51), KS_r,
+ KC(52), KS_e,
+ KC(53), KS_w,
+ KC(54), KS_q,
+ KC(56), KS_7, KS_slash, KS_braceleft,
+ KC(57), KS_6, KS_ampersand,
+ KC(58), KS_5, KS_percent,
+ KC(59), KS_4, KS_currency, KS_dollar,
+ KC(60), KS_3, KS_numbersign, KS_sterling,
+ KC(61), KS_2, KS_quotedbl, KS_at,
+ KC(62), KS_1, KS_exclam,
+ KC(63), KS_section, KS_onehalf,
+ KC(88), KS_8, KS_parenleft, KS_bracketleft,
+ KC(89), KS_9, KS_parenright, KS_bracketright,
+ KC(90), KS_0, KS_equal, KS_braceright,
+ KC(91), KS_minus, KS_question, KS_backslash,
+ KC(92), KS_dead_acute, KS_dead_grave,
+ KC(96), KS_i,
+ KC(97), KS_o,
+ KC(98), KS_p,
+ KC(99), KS_aring,
+ KC(100), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
+ KC(104), KS_j,
+ KC(105), KS_k,
+ KC(106), KS_l,
+ KC(107), KS_odiaeresis,
+ KC(108), KS_adiaeresis,
+ KC(112), KS_m,
+ KC(113), KS_comma, KS_semicolon,
+ KC(114), KS_period, KS_colon,
+ KC(115), KS_minus, KS_underscore,
+ KC(116), KS_apostrophe, KS_asterisk,
+ KC(118), KS_less, KS_greater, KS_bar,
+ KC(120), KS_n
+};
+
+static const keysym_t hilkbd_keydesc_sv_ps2_nodead[] = {
+ KC(92), KS_apostrophe, KS_grave,
+ KC(100), KS_diaeresis, KS_asciicircum, KS_asciitilde,
};
/*
* 0f. German
*/
-const keysym_t hilkbd_keydesc_de[] = {
- KC(2), KS_Mode_switch, KS_Multi_key,
- KC(28), KS_y,
- KC(49), KS_z,
- KC(54), KS_q, KS_Q, KS_at,
- KC(56), KS_7, KS_slash, KS_braceleft,
- KC(57), KS_6, KS_ampersand,
- KC(58), KS_5, KS_percent,
- KC(59), KS_4, KS_dollar,
- KC(60), KS_3, KS_section, KS_threesuperior,
- KC(61), KS_2, KS_quotedbl, KS_twosuperior,
- KC(62), KS_1, KS_exclam,
- KC(63), KS_dead_circumflex, KS_dead_abovering,
- KC(88), KS_8, KS_parenleft, KS_bracketleft,
- KC(89), KS_9, KS_parenright, KS_bracketright,
- KC(90), KS_0, KS_equal, KS_braceright,
- KC(91), KS_ssharp, KS_question, KS_backslash,
- KC(92), KS_dead_acute, KS_dead_grave,
- KC(99), KS_udiaeresis,
- KC(100), KS_plus, KS_asterisk, KS_dead_tilde,
-#if 0
- KC(101), KS_sterling, KS_dead_abovering,
-#endif
- KC(107), KS_odiaeresis,
- KC(108), KS_adiaeresis,
- KC(112), KS_m, KS_M, KS_mu,
- KC(113), KS_comma, KS_semicolon,
- KC(114), KS_period, KS_colon,
- KC(115), KS_minus, KS_underscore,
- KC(116), KS_numbersign, KS_apostrophe,
- KC(118), KS_less, KS_greater, KS_bar, KS_brokenbar,
+static const keysym_t hilkbd_keydesc_de[] = {
+ KC(28), KS_y, KS_Y, KS_paragraph,
+ KC(49), KS_z, KS_Z, KS_dead_circumflex,
+ KC(56), KS_7, KS_slash, KS_backslash,
+ KC(57), KS_6, KS_ampersand, KS_asciicircum,
+ KC(60), KS_3, KS_section, KS_numbersign,
+ KC(61), KS_2, KS_quotedbl, KS_at,
+ KC(63), KS_less, KS_greater,
+ KS_guillemotleft,KS_guillemotright,
+ KC(88), KS_8, KS_parenleft,
+ KS_bracketleft, KS_braceleft,
+ KC(89), KS_9, KS_parenright,
+ KS_bracketright,KS_braceright,
+ KC(90), KS_0, KS_equal, KS_exclamdown,
+ KC(91), KS_ssharp, KS_question, KS_macron,
+ KC(92), KS_dead_acute, KS_dead_grave, KS_plusminus,
+ KC(99), KS_udiaeresis, KS_Udiaeresis, KS_dead_abovering,
+ KC(100), KS_plus, KS_asterisk, KS_bar, KS_brokenbar,
+ KC(101), KS_sterling, KS_dead_circumflex,KS_mu,
+ KC(107), KS_odiaeresis,
+ KC(108), KS_adiaeresis, KS_Adiaeresis, KS_grave, KS_apostrophe,
+ KC(113), KS_comma, KS_semicolon, KS_less,
+ KC(114), KS_period, KS_colon, KS_greater,
+ KC(115), KS_minus, KS_underscore, KS_underscore
};
-const keysym_t hilkbd_keydesc_de_nodead[] = {
- KC(63), KS_asciicircum, KS_degree,
- KC(92), KS_apostrophe, KS_grave,
- KC(100), KS_plus, KS_asterisk, KS_asciitilde,
-#if 0
- KC(101), KS_sterling, KS_degree,
-#endif
+static const keysym_t hilkbd_keydesc_de_nodead[] = {
+ KC(48), KS_u, KS_U, KS_diaeresis,
+ KC(49), KS_z, KS_Z, KS_asciicircum,
+ KC(50), KS_t, KS_T, KS_grave,
+ KC(51), KS_r, KS_R, KS_apostrophe,
+ KC(92), KS_apostrophe, KS_grave, KS_plusminus,
+ KC(99), KS_udiaeresis, KS_Udiaeresis, KS_degree,
+ KC(101), KS_sterling, KS_asciicircum, KS_mu,
+ KC(96), KS_i, KS_I, KS_asciitilde
+};
+
+static const keysym_t hilkbd_keydesc_de_ps2[] = {
+ KC(24), KS_b,
+ KC(25), KS_v,
+ KC(26), KS_c,
+ KC(27), KS_x,
+ KC(28), KS_y,
+ KC(36), KS_KP_Separator,KS_KP_Delete,
+ KC(40), KS_h,
+ KC(41), KS_g,
+ KC(42), KS_f,
+ KC(43), KS_d,
+ KC(44), KS_s,
+ KC(45), KS_a,
+ KC(48), KS_u,
+ KC(49), KS_z, KS_Z, KS_dead_circumflex,
+ KC(50), KS_t,
+ KC(51), KS_r,
+ KC(52), KS_e,
+ KC(53), KS_w,
+ KC(54), KS_q, KS_Q, KS_at,
+ KC(56), KS_7, KS_slash, KS_braceleft,
+ KC(57), KS_6, KS_ampersand,
+ KC(58), KS_5, KS_percent,
+ KC(59), KS_4, KS_dollar,
+ KC(60), KS_3, KS_section, KS_threesuperior,
+ KC(61), KS_2, KS_quotedbl, KS_twosuperior,
+ KC(62), KS_1, KS_exclam,
+ KC(63), KS_dead_circumflex, KS_dead_abovering,
+ KC(88), KS_8, KS_parenleft, KS_bracketleft,
+ KC(89), KS_9, KS_parenright, KS_bracketright,
+ KC(90), KS_0, KS_equal, KS_braceright,
+ KC(91), KS_ssharp, KS_question, KS_backslash,
+ KC(92), KS_dead_acute, KS_dead_grave,
+ KC(96), KS_i,
+ KC(97), KS_o,
+ KC(98), KS_p,
+ KC(99), KS_udiaeresis,
+ KC(100), KS_plus, KS_asterisk, KS_dead_tilde,
+ KC(104), KS_j,
+ KC(105), KS_k,
+ KC(106), KS_l,
+ KC(107), KS_odiaeresis,
+ KC(108), KS_adiaeresis,
+ KC(112), KS_m, KS_M, KS_mu,
+ KC(113), KS_comma, KS_semicolon,
+ KC(114), KS_period, KS_colon,
+ KC(115), KS_minus, KS_underscore,
+ KC(116), KS_numbersign, KS_apostrophe,
+ KC(118), KS_less, KS_greater, KS_bar,
+ KC(120), KS_n
+};
+
+static const keysym_t hilkbd_keydesc_de_ps2_nodead[] = {
+ KC(49), KS_z, KS_Z, KS_asciicircum,
+ KC(63), KS_asciicircum, KS_degree,
+ KC(92), KS_apostrophe, KS_grave,
+ KC(100), KS_plus, KS_asterisk, KS_asciitilde
};
/*
* 17. English
*/
-const keysym_t hilkbd_keydesc_uk[] = {
- KC(56), KS_7, KS_asciicircum,
- KC(57), KS_6, KS_ampersand,
- KC(61), KS_2, KS_quotedbl,
- KC(88), KS_8, KS_parenleft,
- KC(89), KS_9, KS_parenright,
- KC(90), KS_0, KS_equal,
- KC(91), KS_plus, KS_question,
- KC(92), KS_apostrophe, KS_slash,
- KC(101), KS_less, KS_greater,
- KC(107), KS_asterisk, KS_at,
- KC(108), KS_backslash, KS_bar,
- KC(113), KS_comma, KS_semicolon,
- KC(114), KS_period, KS_colon,
- KC(115), KS_slash, KS_underscore,
- KC(115), KS_minus, KS_question,
+static const keysym_t hilkbd_keydesc_uk[] = {
+ KC(56), KS_7, KS_asciicircum, KS_backslash,
+ KC(57), KS_6, KS_ampersand, KS_asciicircum,
+ KC(60), KS_3, KS_sterling, KS_numbersign,
+ KC(61), KS_2, KS_quotedbl, KS_at,
+ KC(88), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
+ KC(89), KS_9, KS_parenright, KS_bracketright,KS_braceright,
+ KC(90), KS_0, KS_equal, KS_questiondown,
+ KC(91), KS_plus, KS_question, KS_macron,
+ KC(92), KS_apostrophe, KS_slash, KS_plusminus,
+ KC(101), KS_less, KS_greater, KS_mu,
+ KC(107), KS_asterisk, KS_at,
+ KC(108), KS_backslash, KS_bar, KS_grave, KS_apostrophe,
+ KC(113), KS_comma, KS_semicolon, KS_less,
+ KC(114), KS_period, KS_colon, KS_greater,
+ KC(115), KS_minus, KS_underscore, KS_underscore
+};
+
+static const keysym_t hilkbd_keydesc_uk_ps2[] = {
+ KC(24), KS_b,
+ KC(25), KS_v,
+ KC(26), KS_c,
+ KC(27), KS_x,
+ KC(28), KS_z,
+ KC(40), KS_h,
+ KC(41), KS_g,
+ KC(42), KS_f,
+ KC(43), KS_d,
+ KC(44), KS_s,
+ KC(45), KS_a,
+ KC(48), KS_u,
+ KC(49), KS_y,
+ KC(50), KS_t,
+ KC(51), KS_r,
+ KC(52), KS_e,
+ KC(53), KS_w,
+ KC(54), KS_q,
+ KC(56), KS_7, KS_ampersand,
+ KC(57), KS_6, KS_asciicircum,
+ KC(58), KS_5, KS_percent,
+ KC(59), KS_4, KS_dollar,
+ KC(60), KS_3, KS_sterling,
+ KC(61), KS_2, KS_quotedbl,
+ KC(62), KS_1, KS_exclam,
+ KC(63), KS_grave, KS_notsign, KS_bar,
+ KC(88), KS_8, KS_asterisk,
+ KC(89), KS_9, KS_parenleft,
+ KC(90), KS_0, KS_parenright,
+ KC(91), KS_minus, KS_underscore,
+ KC(92), KS_equal, KS_plus,
+ KC(96), KS_i,
+ KC(97), KS_o,
+ KC(98), KS_p,
+ KC(99), KS_bracketleft, KS_braceleft,
+ KC(100), KS_bracketright,KS_braceright,
+ KC(104), KS_j,
+ KC(105), KS_k,
+ KC(106), KS_l,
+ KC(107), KS_semicolon, KS_colon,
+ KC(108), KS_apostrophe, KS_at,
+ KC(112), KS_m,
+ KC(113), KS_comma, KS_less,
+ KC(114), KS_period, KS_greater,
+ KC(115), KS_slash, KS_question,
+ KC(116), KS_numbersign, KS_asciitilde,
+ KC(118), KS_backslash, KS_brokenbar,
+ KC(120), KS_n
};
/*
* 1b. French
*/
-const keysym_t hilkbd_keydesc_fr[] = {
- KC(28), KS_w,
- KC(45), KS_q,
- KC(53), KS_z,
- KC(54), KS_a,
- KC(56), KS_egrave, KS_7,
- KC(57), KS_section, KS_6,
- KC(58), KS_parenleft, KS_5,
- KC(59), KS_apostrophe, KS_4,
- KC(60), KS_quotedbl, KS_3,
- KC(61), KS_eacute, KS_2,
- KC(62), KS_ampersand, KS_1,
- KC(63), KS_dollar, KS_sterling,
- KC(88), KS_exclam, KS_8,
- KC(89), KS_ccedilla, KS_9,
- KC(90), KS_agrave, KS_0,
- KC(91), KS_parenright, KS_degree,
- KC(92), KS_minus, KS_underscore,
- KC(99), KS_dead_circumflex, KS_dead_diaeresis,
- KC(100), KS_grave, KS_asterisk,
- KC(101), KS_less, KS_greater,
- KC(107), KS_m,
- KC(108), KS_ugrave, KS_percent,
- KC(112), KS_comma, KS_question,
- KC(113), KS_semicolon, KS_period,
- KC(114), KS_colon, KS_slash,
- KC(115), KS_equal, KS_plus,
+static const keysym_t hilkbd_keydesc_fr[] = {
+ KC(28), KS_w, KS_W, KS_paragraph,
+ KC(45), KS_q, KS_Q, KS_aring,
+ KC(53), KS_z, KS_Z, KS_asciitilde,
+ KC(54), KS_a, KS_A, KS_periodcentered,
+ KC(56), KS_egrave, KS_7, KS_backslash,
+ KC(57), KS_section, KS_6, KS_asciicircum,
+ KC(58), KS_parenleft, KS_5, KS_onehalf,
+ KC(59), KS_apostrophe, KS_4, KS_onequarter, KS_threequarters,
+ KC(60), KS_quotedbl, KS_3, KS_numbersign,
+ KC(61), KS_eacute, KS_2, KS_at,
+ KC(62), KS_ampersand, KS_1, KS_exclamdown,
+ KC(63), KS_dollar, KS_sterling,
+ KS_guillemotleft,KS_guillemotright,
+ KC(88), KS_exclam, KS_8, KS_bracketleft, KS_braceleft,
+ KC(89), KS_ccedilla, KS_9, KS_bracketright,KS_braceright,
+ KC(90), KS_agrave, KS_0, KS_questiondown,
+ KC(91), KS_parenright, KS_degree, KS_macron,
+ KC(92), KS_minus, KS_underscore, KS_plusminus,
+ KC(99), KS_dead_circumflex, KS_dead_diaeresis, KS_dead_abovering,
+ KC(100), KS_grave, KS_asterisk, KS_bar, KS_brokenbar,
+ KC(101), KS_less, KS_greater, KS_mu,
+ KC(107), KS_m,
+ KC(108), KS_ugrave, KS_percent, KS_grave, KS_apostrophe,
+ KC(112), KS_comma, KS_question, KS_masculine,
+ KC(113), KS_semicolon, KS_period, KS_less,
+ KC(114), KS_colon, KS_slash, KS_greater,
+ KC(115), KS_equal, KS_plus, KS_underscore
+};
+
+static const keysym_t hilkbd_keydesc_fr_ps2[] = {
+ KC(24), KS_b,
+ KC(25), KS_v,
+ KC(26), KS_c,
+ KC(27), KS_x,
+ KC(28), KS_w,
+ KC(40), KS_h,
+ KC(41), KS_g,
+ KC(42), KS_f,
+ KC(43), KS_d,
+ KC(44), KS_s,
+ KC(45), KS_q,
+ KC(48), KS_u,
+ KC(49), KS_y,
+ KC(50), KS_t,
+ KC(51), KS_r,
+ KC(52), KS_e,
+ KC(53), KS_z,
+ KC(54), KS_a,
+ KC(56), KS_egrave, KS_7, KS_grave,
+ KC(57), KS_minus, KS_6, KS_bar,
+ KC(58), KS_parenleft, KS_5, KS_bracketleft,
+ KC(59), KS_apostrophe, KS_4, KS_braceleft,
+ KC(60), KS_quotedbl, KS_3, KS_numbersign,
+ KC(61), KS_eacute, KS_2, KS_asciitilde,
+ KC(62), KS_ampersand, KS_1,
+ KC(63), KS_twosuperior,
+ KC(88), KS_underscore, KS_8, KS_backslash,
+ KC(89), KS_ccedilla, KS_9, KS_asciicircum,
+ KC(90), KS_agrave, KS_0, KS_at,
+ KC(91), KS_parenright, KS_degree, KS_bracketright,
+ KC(92), KS_equal, KS_plus, KS_braceright,
+ KC(96), KS_i,
+ KC(97), KS_o,
+ KC(98), KS_p,
+ KC(99), KS_dead_circumflex,KS_dead_diaeresis,
+ KC(100), KS_dollar, KS_sterling, KS_currency,
+ KC(104), KS_j,
+ KC(105), KS_k,
+ KC(106), KS_l,
+ KC(107), KS_m,
+ KC(108), KS_ugrave, KS_percent,
+ KC(112), KS_comma, KS_question,
+ KC(113), KS_semicolon, KS_period,
+ KC(114), KS_colon, KS_slash,
+ KC(115), KS_exclam, KS_section,
+ KC(116), KS_asterisk, KS_mu,
+ KC(118), KS_less, KS_greater,
+ KS_guillemotleft,KS_guillemotright,
+ KC(120), KS_n
};
#define KBD_MAP(name, base, map) \
@@ -433,6 +668,18 @@ const struct wscons_keydesc hilkbd_keydesctab[] = {
KBD_MAP(KB_FR, KB_US, hilkbd_keydesc_fr),
KBD_MAP(KB_UK, KB_US, hilkbd_keydesc_uk),
KBD_MAP(KB_SV, KB_US, hilkbd_keydesc_sv),
+ KBD_MAP(KB_SV | KB_NODEAD, KB_SV, hilkbd_keydesc_sv_nodead),
+ {0, 0, 0, 0},
+};
+
+const struct wscons_keydesc hilkbd_keydesctab_ps2[] = {
+ KBD_MAP(KB_US, 0, hilkbd_keydesc_us),
+ KBD_MAP(KB_DE, KB_US, hilkbd_keydesc_de_ps2),
+ KBD_MAP(KB_DE | KB_NODEAD, KB_DE, hilkbd_keydesc_de_ps2_nodead),
+ KBD_MAP(KB_FR, KB_US, hilkbd_keydesc_fr_ps2),
+ KBD_MAP(KB_UK, KB_US, hilkbd_keydesc_uk_ps2),
+ KBD_MAP(KB_SV, KB_US, hilkbd_keydesc_sv_ps2),
+ KBD_MAP(KB_SV | KB_NODEAD, KB_SV, hilkbd_keydesc_sv_ps2_nodead),
{0, 0, 0, 0},
};
diff --git a/sys/dev/hil/hilkbdmap.h b/sys/dev/hil/hilkbdmap.h
index 6e7a024180d..eb5c3fed640 100644
--- a/sys/dev/hil/hilkbdmap.h
+++ b/sys/dev/hil/hilkbdmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hilkbdmap.h,v 1.2 2005/01/18 18:52:31 miod Exp $ */
+/* $OpenBSD: hilkbdmap.h,v 1.3 2005/05/07 22:42:30 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -27,6 +27,7 @@
*/
extern const struct wscons_keydesc hilkbd_keydesctab[];
+extern const struct wscons_keydesc hilkbd_keydesctab_ps2[];
#define MAXHILKBDLAYOUT 0x20