Bring br.nodead closer to X11diff -r1.4 -r1.5 src/sys/dev/hid/hidkbdmap.c
(nia)
--- src/sys/dev/hid/hidkbdmap.c 2020/07/12 01:35:59 1.4
+++ src/sys/dev/hid/hidkbdmap.c 2020/07/12 01:44:24 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: hidkbdmap.c,v 1.4 2020/07/12 01:35:59 nia Exp $ */ | 1 | /* $NetBSD: hidkbdmap.c,v 1.5 2020/07/12 01:44:24 nia Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1999,2001 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1999,2001 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (lennart@augustsson.net) at | 8 | * by Lennart Augustsson (lennart@augustsson.net) at | |
9 | * Carlstedt Research & Technology. | 9 | * Carlstedt Research & Technology. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.4 2020/07/12 01:35:59 nia Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.5 2020/07/12 01:44:24 nia Exp $"); | |
35 | 35 | |||
36 | #include <sys/types.h> | 36 | #include <sys/types.h> | |
37 | #include <dev/wscons/wsksymdef.h> | 37 | #include <dev/wscons/wsksymdef.h> | |
38 | #include <dev/wscons/wsksymvar.h> | 38 | #include <dev/wscons/wsksymvar.h> | |
39 | 39 | |||
40 | #include <dev/usb/usb.h> | 40 | #include <dev/usb/usb.h> | |
41 | 41 | |||
42 | #define KC(n) KS_KEYCODE(n) | 42 | #define KC(n) KS_KEYCODE(n) | |
43 | 43 | |||
44 | Static const keysym_t hidkbd_keydesc_us[] = { | 44 | Static const keysym_t hidkbd_keydesc_us[] = { | |
45 | /* pos command normal shifted */ | 45 | /* pos command normal shifted */ | |
46 | KC(4), KS_a, | 46 | KC(4), KS_a, | |
47 | KC(5), KS_b, | 47 | KC(5), KS_b, | |
@@ -639,26 +639,27 @@ static const keysym_t hidkbd_keydesc_br[ | @@ -639,26 +639,27 @@ static const keysym_t hidkbd_keydesc_br[ | |||
639 | KC(49), KS_bracketright, KS_braceright, KS_masculine, KS_masculine, | 639 | KC(49), KS_bracketright, KS_braceright, KS_masculine, KS_masculine, | |
640 | KC(50), KS_bracketright, KS_braceright, KS_masculine, KS_masculine, | 640 | KC(50), KS_bracketright, KS_braceright, KS_masculine, KS_masculine, | |
641 | KC(51), KS_ccedilla, KS_Ccedilla, KS_dead_acute, KS_dead_hungarumlaut, | 641 | KC(51), KS_ccedilla, KS_Ccedilla, KS_dead_acute, KS_dead_hungarumlaut, | |
642 | KC(52), KS_dead_tilde, KS_dead_circumflex, KS_asciitilde, KS_asciicircum, | 642 | KC(52), KS_dead_tilde, KS_dead_circumflex, KS_asciitilde, KS_asciicircum, | |
643 | KC(53), KS_apostrophe, KS_quotedbl, KS_notsign, KS_notsign, | 643 | KC(53), KS_apostrophe, KS_quotedbl, KS_notsign, KS_notsign, | |
644 | KC(56), KS_semicolon, KS_colon, KS_dead_dotaccent, KS_abovedot, | 644 | KC(56), KS_semicolon, KS_colon, KS_dead_dotaccent, KS_abovedot, | |
645 | KC(100), KS_backslash, KS_bar, KS_masculine, KS_dead_breve, | 645 | KC(100), KS_backslash, KS_bar, KS_masculine, KS_dead_breve, | |
646 | KC(135), KS_slash, KS_question, KS_degree, KS_questiondown, | 646 | KC(135), KS_slash, KS_question, KS_degree, KS_questiondown, | |
647 | KC(230), KS_Mode_switch, KS_Multi_key, | 647 | KC(230), KS_Mode_switch, KS_Multi_key, | |
648 | }; | 648 | }; | |
649 | 649 | |||
650 | static const keysym_t hidkbd_keydesc_br_nodead[] = { | 650 | static const keysym_t hidkbd_keydesc_br_nodead[] = { | |
651 | /* pos normal shifted altgr shift-altgr */ | 651 | /* pos normal shifted altgr shift-altgr */ | |
652 | KC(35), KS_6, KS_diaeresis, KS_notsign, KS_dead_diaeresis, | |||
652 | KC(47), KS_apostrophe, KS_grave, KS_dead_acute, KS_dead_grave, | 653 | KC(47), KS_apostrophe, KS_grave, KS_dead_acute, KS_dead_grave, | |
653 | KC(52), KS_asciitilde, KS_asciicircum, KS_dead_tilde, KS_dead_circumflex, | 654 | KC(52), KS_asciitilde, KS_asciicircum, KS_dead_tilde, KS_dead_circumflex, | |
654 | }; | 655 | }; | |
655 | 656 | |||
656 | #define KBD_MAP(name, base, map) \ | 657 | #define KBD_MAP(name, base, map) \ | |
657 | { name, base, sizeof(map)/sizeof(keysym_t), map } | 658 | { name, base, sizeof(map)/sizeof(keysym_t), map } | |
658 | 659 | |||
659 | const struct wscons_keydesc hidkbd_keydesctab[] = { | 660 | const struct wscons_keydesc hidkbd_keydesctab[] = { | |
660 | KBD_MAP(KB_US, 0, hidkbd_keydesc_us), | 661 | KBD_MAP(KB_US, 0, hidkbd_keydesc_us), | |
661 | KBD_MAP(KB_US | KB_SWAPCTRLCAPS,KB_US, hidkbd_keydesc_swapctrlcaps), | 662 | KBD_MAP(KB_US | KB_SWAPCTRLCAPS,KB_US, hidkbd_keydesc_swapctrlcaps), | |
662 | KBD_MAP(KB_US | KB_DVORAK, KB_US, hidkbd_keydesc_us_dvorak), | 663 | KBD_MAP(KB_US | KB_DVORAK, KB_US, hidkbd_keydesc_us_dvorak), | |
663 | KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US| KB_DVORAK, | 664 | KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US| KB_DVORAK, | |
664 | hidkbd_keydesc_swapctrlcaps), | 665 | hidkbd_keydesc_swapctrlcaps), |
--- src/sys/dev/pckbport/wskbdmap_mfii.c 2020/07/12 01:35:59 1.28
+++ src/sys/dev/pckbport/wskbdmap_mfii.c 2020/07/12 01:44:24 1.29
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: wskbdmap_mfii.c,v 1.28 2020/07/12 01:35:59 nia Exp $ */ | 1 | /* $NetBSD: wskbdmap_mfii.c,v 1.29 2020/07/12 01:44:24 nia Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Juergen Hannken-Illjes. | 8 | * by Juergen Hannken-Illjes. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.28 2020/07/12 01:35:59 nia Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.29 2020/07/12 01:44:24 nia Exp $"); | |
34 | 34 | |||
35 | #include "opt_wskbdmap.h" | 35 | #include "opt_wskbdmap.h" | |
36 | #include <sys/types.h> | 36 | #include <sys/types.h> | |
37 | #include <dev/wscons/wsksymdef.h> | 37 | #include <dev/wscons/wsksymdef.h> | |
38 | #include <dev/wscons/wsksymvar.h> | 38 | #include <dev/wscons/wsksymvar.h> | |
39 | #include <dev/pckbport/wskbdmap_mfii.h> | 39 | #include <dev/pckbport/wskbdmap_mfii.h> | |
40 | 40 | |||
41 | #define KC(n) KS_KEYCODE(n) | 41 | #define KC(n) KS_KEYCODE(n) | |
42 | 42 | |||
43 | static const keysym_t pckbd_keydesc_us[] = { | 43 | static const keysym_t pckbd_keydesc_us[] = { | |
44 | /* pos command normal shifted */ | 44 | /* pos command normal shifted */ | |
45 | KC(1), KS_Cmd_Debugger, KS_Escape, | 45 | KC(1), KS_Cmd_Debugger, KS_Escape, | |
46 | KC(2), KS_1, KS_exclam, | 46 | KC(2), KS_1, KS_exclam, | |
@@ -847,26 +847,27 @@ static const keysym_t pckbd_keydesc_br[] | @@ -847,26 +847,27 @@ static const keysym_t pckbd_keydesc_br[] | |||
847 | KC(40), KS_dead_tilde, KS_dead_circumflex, KS_asciitilde, KS_asciicircum, | 847 | KC(40), KS_dead_tilde, KS_dead_circumflex, KS_asciitilde, KS_asciicircum, | |
848 | KC(41), KS_apostrophe, KS_quotedbl, KS_notsign, KS_notsign, | 848 | KC(41), KS_apostrophe, KS_quotedbl, KS_notsign, KS_notsign, | |
849 | KC(43), KS_bracketright, KS_braceright, KS_masculine, KS_masculine, | 849 | KC(43), KS_bracketright, KS_braceright, KS_masculine, KS_masculine, | |
850 | KC(46), KS_c, KS_C, KS_copyright, KS_copyright, | 850 | KC(46), KS_c, KS_C, KS_copyright, KS_copyright, | |
851 | KC(50), KS_m, KS_M, KS_mu, KS_mu, | 851 | KC(50), KS_m, KS_M, KS_mu, KS_mu, | |
852 | KC(53), KS_semicolon, KS_colon, KS_dead_dotaccent, KS_abovedot, | 852 | KC(53), KS_semicolon, KS_colon, KS_dead_dotaccent, KS_abovedot, | |
853 | KC(86), KS_backslash, KS_bar, KS_masculine, KS_dead_breve, | 853 | KC(86), KS_backslash, KS_bar, KS_masculine, KS_dead_breve, | |
854 | KC(115), KS_slash, KS_question, KS_degree, KS_questiondown, | 854 | KC(115), KS_slash, KS_question, KS_degree, KS_questiondown, | |
855 | KC(184), KS_Mode_switch, KS_Multi_key, | 855 | KC(184), KS_Mode_switch, KS_Multi_key, | |
856 | }; | 856 | }; | |
857 | 857 | |||
858 | static const keysym_t pckbd_keydesc_br_nodead[] = { | 858 | static const keysym_t pckbd_keydesc_br_nodead[] = { | |
859 | /* pos normal shifted altgr shift-altgr */ | 859 | /* pos normal shifted altgr shift-altgr */ | |
860 | KC(7), KS_6, KS_diaeresis, KS_notsign, KS_dead_diaeresis, | |||
860 | KC(26), KS_apostrophe, KS_grave, KS_dead_acute, KS_dead_grave, | 861 | KC(26), KS_apostrophe, KS_grave, KS_dead_acute, KS_dead_grave, | |
861 | KC(40), KS_asciitilde, KS_asciicircum, KS_dead_tilde, KS_dead_circumflex, | 862 | KC(40), KS_asciitilde, KS_asciicircum, KS_dead_tilde, KS_dead_circumflex, | |
862 | }; | 863 | }; | |
863 | #endif /* WSKBD_USONLY */ | 864 | #endif /* WSKBD_USONLY */ | |
864 | 865 | |||
865 | #define KBD_MAP(name, base, map) \ | 866 | #define KBD_MAP(name, base, map) \ | |
866 | { name, base, sizeof(map)/sizeof(keysym_t), map } | 867 | { name, base, sizeof(map)/sizeof(keysym_t), map } | |
867 | /* KBD_NULLMAP generates a entry for machine native variant. | 868 | /* KBD_NULLMAP generates a entry for machine native variant. | |
868 | the entry will be modified by machine dependent keyboard driver. */ | 869 | the entry will be modified by machine dependent keyboard driver. */ | |
869 | #define KBD_NULLMAP(name, base) { name, base, 0, 0 } | 870 | #define KBD_NULLMAP(name, base) { name, base, 0, 0 } | |
870 | 871 | |||
871 | const struct wscons_keydesc pckbd_keydesctab[] = { | 872 | const struct wscons_keydesc pckbd_keydesctab[] = { | |
872 | KBD_MAP(KB_US, 0, pckbd_keydesc_us), | 873 | KBD_MAP(KB_US, 0, pckbd_keydesc_us), |