Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Canadian French keyboard layout for ukbd/pckbd



details:   https://anonhg.NetBSD.org/src/rev/3dc4b7d1740d
branches:  trunk
changeset: 935910:3dc4b7d1740d
user:      nia <nia%NetBSD.org@localhost>
date:      Mon Jul 13 09:44:48 2020 +0000

description:
Canadian French keyboard layout for ukbd/pckbd

diffstat:

 sys/dev/hid/hidkbdmap.c          |  37 ++++++++++++++++++++++++-
 sys/dev/pckbport/wskbdmap_mfii.c |  36 +++++++++++++++++++++++-
 sys/dev/wscons/wsksymdef.h       |  57 ++++++++++++++++++++-------------------
 3 files changed, 98 insertions(+), 32 deletions(-)

diffs (200 lines):

diff -r 344c95ef3b2f -r 3dc4b7d1740d sys/dev/hid/hidkbdmap.c
--- a/sys/dev/hid/hidkbdmap.c   Mon Jul 13 09:41:18 2020 +0000
+++ b/sys/dev/hid/hidkbdmap.c   Mon Jul 13 09:44:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hidkbdmap.c,v 1.9 2020/07/13 08:45:12 nia Exp $        */
+/*     $NetBSD: hidkbdmap.c,v 1.10 2020/07/13 09:44:48 nia Exp $       */
 
 /*
  * Copyright (c) 1999,2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.9 2020/07/13 08:45:12 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.10 2020/07/13 09:44:48 nia Exp $");
 
 #include <sys/types.h>
 #include <dev/wscons/wsksymdef.h>
@@ -770,6 +770,38 @@
     KC(230), KS_Mode_switch,   KS_Multi_key,
 };
 
+static const keysym_t hidkbd_keydesc_cf[] = {
+/*  pos      normal            shifted                 altgr           shift-altgr */
+    KC(16),  KS_m,             KS_M,                   KS_mu,
+    KC(18),  KS_o,             KS_O,                   KS_section,
+    KC(19),  KS_p,             KS_P,                   KS_paragraph,
+    KC(30),  KS_1,             KS_exclam,              KS_plusminus,
+    KC(31),  KS_2,             KS_quotedbl,            KS_at,
+    KC(32),  KS_3,             KS_slash,               KS_sterling,
+    KC(33),  KS_4,             KS_dollar,              KS_cent,
+    KC(34),  KS_5,             KS_percent,             KS_currency,
+    KC(35),  KS_6,             KS_question,            KS_notsign,
+    KC(36),  KS_7,             KS_ampersand,           KS_brokenbar,
+    KC(37),  KS_8,             KS_asterisk,            KS_twosuperior,
+    KC(38),  KS_9,             KS_parenleft,           KS_threesuperior,
+    KC(39),  KS_0,             KS_parenright,          KS_onequarter,
+    KC(44),  KS_space,         KS_space,               KS_nobreakspace,
+    KC(45),  KS_minus,         KS_underscore,          KS_onehalf,
+    KC(46),  KS_equal,         KS_plus,                KS_threequarters,
+    KC(47),  KS_dead_circumflex,KS_dead_circumflex,    KS_bracketleft,
+    KC(48),  KS_dead_cedilla,  KS_dead_diaeresis,      KS_bracketright,
+    KC(49),  KS_less,          KS_greater,             KS_braceright,
+    KC(50),  KS_less,          KS_greater,             KS_braceright,
+    KC(51),  KS_semicolon,     KS_colon,               KS_asciitilde,
+    KC(52),  KS_dead_grave,    KS_dead_grave,          KS_braceleft,
+    KC(53),  KS_numbersign,    KS_bar,                 KS_backslash,
+    KC(54),  KS_comma,         KS_apostrophe,          KS_macron,
+    KC(55),  KS_period,                KS_period,              KS_hyphen,
+    KC(56),  KS_eacute,                KS_Eacute,              KS_dead_acute,
+    KC(100), KS_guillemotleft, KS_guillemotright,      KS_degree,
+    KC(230), KS_Mode_switch,   KS_Multi_key,
+};
+
 #define KBD_MAP(name, base, map) \
                        { name, base, sizeof(map)/sizeof(keysym_t), map }
 
@@ -811,6 +843,7 @@
        KBD_MAP(KB_TR,                  KB_US,  hidkbd_keydesc_tr),
        KBD_MAP(KB_TR | KB_NODEAD,      KB_TR,  hidkbd_keydesc_tr_nodead),
        KBD_MAP(KB_LA,                  KB_US,  hidkbd_keydesc_la),
+       KBD_MAP(KB_CF,                  KB_US,  hidkbd_keydesc_cf),
        KBD_MAP(KB_HU,                  KB_US,  hidkbd_keydesc_hu),
        {0, 0, 0, 0}
 };
diff -r 344c95ef3b2f -r 3dc4b7d1740d sys/dev/pckbport/wskbdmap_mfii.c
--- a/sys/dev/pckbport/wskbdmap_mfii.c  Mon Jul 13 09:41:18 2020 +0000
+++ b/sys/dev/pckbport/wskbdmap_mfii.c  Mon Jul 13 09:44:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wskbdmap_mfii.c,v 1.32 2020/07/13 08:45:12 nia Exp $   */
+/*     $NetBSD: wskbdmap_mfii.c,v 1.33 2020/07/13 09:44:48 nia Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.32 2020/07/13 08:45:12 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.33 2020/07/13 09:44:48 nia Exp $");
 
 #include "opt_wskbdmap.h"
 #include <sys/types.h>
@@ -938,6 +938,37 @@
     KC(86),  KS_less,          KS_greater,
     KC(184), KS_Mode_switch,   KS_Multi_key,
 };
+
+static const keysym_t pckbd_keydesc_cf[] = {
+/*  pos      normal            shifted                 altgr           shift-altgr */
+    KC(2),   KS_1,             KS_exclam,              KS_plusminus,
+    KC(3),   KS_2,             KS_quotedbl,            KS_at,
+    KC(4),   KS_3,             KS_slash,               KS_sterling,
+    KC(5),   KS_4,             KS_dollar,              KS_cent,
+    KC(6),   KS_5,             KS_percent,             KS_currency,
+    KC(7),   KS_6,             KS_question,            KS_notsign,
+    KC(8),   KS_7,             KS_ampersand,           KS_brokenbar,
+    KC(9),   KS_8,             KS_asterisk,            KS_twosuperior,
+    KC(10),  KS_9,             KS_parenleft,           KS_threesuperior,
+    KC(11),  KS_0,             KS_parenright,          KS_onequarter,
+    KC(12),  KS_minus,         KS_underscore,          KS_onehalf,
+    KC(13),  KS_equal,         KS_plus,                KS_threequarters,
+    KC(24),  KS_o,             KS_O,                   KS_section,
+    KC(25),  KS_p,             KS_P,                   KS_paragraph,
+    KC(26),  KS_dead_circumflex,KS_dead_circumflex,    KS_bracketleft,
+    KC(27),  KS_dead_cedilla,  KS_dead_diaeresis,      KS_bracketright,
+    KC(39),  KS_semicolon,     KS_colon,               KS_asciitilde,
+    KC(40),  KS_dead_grave,    KS_dead_grave,          KS_braceleft,
+    KC(41),  KS_numbersign,    KS_bar,                 KS_backslash,
+    KC(43),  KS_less,          KS_greater,             KS_braceright,
+    KC(50),  KS_m,             KS_M,                   KS_mu,
+    KC(51),  KS_comma,         KS_apostrophe,          KS_macron,
+    KC(52),  KS_period,                KS_period,              KS_hyphen,
+    KC(53),  KS_eacute,                KS_Eacute,              KS_dead_acute,
+    KC(57),  KS_space,         KS_space,               KS_nobreakspace,
+    KC(86),  KS_guillemotleft, KS_guillemotright,      KS_degree,
+    KC(184), KS_Mode_switch,   KS_Multi_key,
+};
 #endif /* WSKBD_USONLY */
 
 #define KBD_MAP(name, base, map) \
@@ -994,6 +1025,7 @@
        KBD_MAP(KB_TR,                  KB_US,  pckbd_keydesc_tr),
        KBD_MAP(KB_TR | KB_NODEAD,      KB_TR,  pckbd_keydesc_tr_nodead),
        KBD_MAP(KB_LA,                  KB_US,  pckbd_keydesc_la),
+       KBD_MAP(KB_CF,                  KB_US,  pckbd_keydesc_cf),
 #endif /* WSKBD_USONLY */
 
        /* placeholders */
diff -r 344c95ef3b2f -r 3dc4b7d1740d sys/dev/wscons/wsksymdef.h
--- a/sys/dev/wscons/wsksymdef.h        Mon Jul 13 09:41:18 2020 +0000
+++ b/sys/dev/wscons/wsksymdef.h        Mon Jul 13 09:44:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsksymdef.h,v 1.71 2020/07/13 08:45:12 nia Exp $ */
+/*     $NetBSD: wsksymdef.h,v 1.72 2020/07/13 09:44:48 nia Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -651,33 +651,34 @@
  * Sort (loosely) by country name.
  */
 #define KB_ENC_FUN(action) \
-action(KB_USER,        0,      0x0100, "user", ,       "User-defined") \
-action(KB_US,  0,      0x0200, "us",   ,       "US-English")   \
-action(KB_UK,  0,      0x0700, "uk",   ,       "UK-English")   \
-action(KB_BE,  0,      0x1300, "be",   ,       "Belgian")      \
-action(KB_BR,  0,      0x1800, "br",   ,       "Brazilian")    \
-action(KB_CZ,  0,      0x1500, "cz",   ,       "Czech")        \
-action(KB_DK,  0,      0x0400, "dk",   ,       "Danish")       \
-action(KB_NL,  0,      0x1600, "nl",   ,       "Dutch")        \
-action(KB_EE,  0,      0x1900, "ee",   ,       "Estonian")     \
-action(KB_FI,  0,      0x0900, "fi",   ,       "Finnish")      \
-action(KB_FR,  0,      0x0600, "fr",   ,       "French")       \
-action(KB_DE, KB_NODEAD,0x0300,        "de",".nodead", "German")       \
-action(KB_GR,  0,      0x1400, "gr",   ,       "Greek")        \
-action(KB_HU,  0,      0x0c00, "hu",   ,       "Hungarian")    \
-action(KB_IS,  0,      0x1a00, "is",   ,       "Icelandic")    \
-action(KB_IT,  0,      0x0500, "it",   ,       "Italian")      \
-action(KB_JP,  0,      0x0800, "jp",   ,       "Japanese")     \
-action(KB_LA,  0,      0x1b00, "la",   ,       "Latinamerican")\
-action(KB_NO,  0,      0x0a00, "no",   ,       "Norwegian")    \
-action(KB_PL,  0,      0x0d00, "pl",   ,       "Polish")       \
-action(KB_PT,  0,      0x1100, "pt",   ,       "Portuguese")   \
-action(KB_RU,  0,      0x0e00, "ru",   ,       "Russian")      \
-action(KB_ES,  0,      0x0b00, "es",   ,       "Spanish")      \
-action(KB_SV,  0,      0x0900, "sv",   ,       "Swedish")      \
-action(KB_SF,  0,      0x1000, "sf",   ,       "Swiss French") \
-action(KB_SG,  0,      0x0f00, "sg",   ,       "Swiss German") \
-action(KB_TR,  0,      0x1700, "tr",   ,       "Turkish")      \
+action(KB_USER,        0,      0x0100, "user", ,       "User-defined")         \
+action(KB_US,  0,      0x0200, "us",   ,       "US-English")           \
+action(KB_UK,  0,      0x0700, "uk",   ,       "UK-English")           \
+action(KB_BE,  0,      0x1300, "be",   ,       "Belgian")              \
+action(KB_BR,  0,      0x1800, "br",   ,       "Brazilian")            \
+action(KB_CF,  0,      0x1c00, "cf",   ,       "Canadian French")      \
+action(KB_CZ,  0,      0x1500, "cz",   ,       "Czech")                \
+action(KB_DK,  0,      0x0400, "dk",   ,       "Danish")               \
+action(KB_NL,  0,      0x1600, "nl",   ,       "Dutch")                \
+action(KB_EE,  0,      0x1900, "ee",   ,       "Estonian")             \
+action(KB_FI,  0,      0x0900, "fi",   ,       "Finnish")              \
+action(KB_FR,  0,      0x0600, "fr",   ,       "French")               \
+action(KB_DE, KB_NODEAD,0x0300,        "de",".nodead", "German")               \
+action(KB_GR,  0,      0x1400, "gr",   ,       "Greek")                \
+action(KB_HU,  0,      0x0c00, "hu",   ,       "Hungarian")            \
+action(KB_IS,  0,      0x1a00, "is",   ,       "Icelandic")            \
+action(KB_IT,  0,      0x0500, "it",   ,       "Italian")              \
+action(KB_JP,  0,      0x0800, "jp",   ,       "Japanese")             \
+action(KB_LA,  0,      0x1b00, "la",   ,       "Latin American")       \
+action(KB_NO,  0,      0x0a00, "no",   ,       "Norwegian")            \
+action(KB_PL,  0,      0x0d00, "pl",   ,       "Polish")               \
+action(KB_PT,  0,      0x1100, "pt",   ,       "Portuguese")           \
+action(KB_RU,  0,      0x0e00, "ru",   ,       "Russian")              \
+action(KB_ES,  0,      0x0b00, "es",   ,       "Spanish")              \
+action(KB_SV,  0,      0x0900, "sv",   ,       "Swedish")              \
+action(KB_SF,  0,      0x1000, "sf",   ,       "Swiss French")         \
+action(KB_SG,  0,      0x0f00, "sg",   ,       "Swiss German")         \
+action(KB_TR,  0,      0x1700, "tr",   ,       "Turkish")              \
 action(KB_UA,  0,      0x1200, "ua",   ,       "Ukrainian")    
 #define KB_NONE 0x0000
 



Home | Main Index | Thread Index | Old Index