Subject: kern/23230: KB_DVORAK doesn't work on USB keyboards
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jacereda@tractor.act.uji.es>
List: netbsd-bugs
Date: 10/22/2003 17:10:05
>Number:         23230
>Category:       kern
>Synopsis:       KB_DVORAK doesn't work on USB keyboards
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 22 15:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6.1
>Organization:
	
>Environment:
	
	
System: NetBSD tractor.act.uji.es 1.6.1 NetBSD 1.6.1 (TRACTOR) #24: Mon Oct 20 17:38:52 CEST 2003 root@tractor.act.uji.es:/usr/src/sys/arch/i386/compile/TRACTOR i386
Architecture: i386
Machine: i386
>Description:
	

        Selecting UKBD_LAYOUT="(KB_US | KB_DVORAK)" doesn't work.

>How-To-Repeat:
	<code/input/activities to reproduce the problem (multiple
lines)>
        Add to the kernel configuration file:

        options 	UKBD_LAYOUT="(KB_US | KB_DVORAK)"

>Fix:
	

        Here is a patch with a US dvorak keymap:


diff -u -r1.10 ukbdmap.c
--- ukbdmap.c	2002/03/17 18:01:07	1.10
+++ ukbdmap.c	2003/10/22 14:52:46
@@ -182,6 +182,46 @@
     KC(139),			KS_Muhenkan,
 };
  
+
+Static const keysym_t ukbd_keydesc_us_dvorak[] = {
+/*  pos      command		normal		shifted */
+    KC(4), 			KS_a,
+    KC(5), 			KS_x,
+    KC(6), 			KS_j,
+    KC(7), 			KS_e,
+    KC(8), 			KS_period, KS_greater,
+    KC(9), 			KS_u,
+    KC(10), 			KS_i,
+    KC(11), 			KS_d,
+    KC(12), 			KS_c,
+    KC(13), 			KS_h,
+    KC(14), 			KS_t,
+    KC(15), 			KS_n,
+    KC(16), 			KS_m,
+    KC(17), 			KS_b,
+    KC(18), 			KS_r,
+    KC(19), 			KS_l,
+    KC(20), 			KS_apostrophe, KS_quotedbl,
+    KC(21), 			KS_p,
+    KC(22), 			KS_o,
+    KC(23), 			KS_y,
+    KC(24), 			KS_g,
+    KC(25), 			KS_k,
+    KC(26), 			KS_comma, KS_less,
+    KC(27), 			KS_q,
+    KC(28), 			KS_f,
+    KC(29), 			KS_semicolon, KS_colon,
+    KC(45), 			KS_bracketleft,	KS_braceleft,
+    KC(46), 			KS_bracketright, KS_braceright,
+    KC(47), 			KS_slash, KS_question,
+    KC(48), 			KS_equal, KS_plus,
+    KC(51), 			KS_s,
+    KC(52), 			KS_minus, KS_underscore,
+    KC(54), 			KS_w,
+    KC(55), 			KS_v,
+    KC(56), 			KS_z,
+};
+
 Static const keysym_t ukbd_keydesc_swapctrlcaps[] = {
 /*  pos      command		normal		shifted */
     KC(57), 			KS_Control_L,
@@ -443,6 +483,7 @@
 const struct wscons_keydesc ukbd_keydesctab[] = {
 	KBD_MAP(KB_US,			0,	ukbd_keydesc_us),
 	KBD_MAP(KB_US | KB_SWAPCTRLCAPS,KB_US,	ukbd_keydesc_swapctrlcaps),
+	KBD_MAP(KB_US | KB_DVORAK,	KB_US,	ukbd_keydesc_us_dvorak),
 	KBD_MAP(KB_JP,			KB_US,	ukbd_keydesc_jp),
 	KBD_MAP(KB_JP | KB_SWAPCTRLCAPS,KB_JP,	ukbd_keydesc_swapctrlcaps),
 	KBD_MAP(KB_DE,			KB_US,	ukbd_keydesc_de),



>Release-Note:
>Audit-Trail:
>Unformatted: