Subject: kern/15211: swapping of KS_Cmd1 in SWAPCTRLCAPS layout does not work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kazuhiko_takai@anet.ne.jp>
List: netbsd-bugs
Date: 01/11/2002 14:44:09
>Number:         15211
>Category:       kern
>Synopsis:       swapping of KS_Cmd1 in SWAPCTRLCAPS layout does not work
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 11 14:44:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Kazuhiko Takai
>Release:        current
>Organization:
none
>Environment:
NetBSD asus.takai.net 1.5ZA NetBSD 1.5ZA (FIRSTKISS) #71: Sat Jan 12 07:01:54 JST 2002     root@asus.takai.net:/home/src/current/src/sys/arch/i386/compile/FIRSTKISS i386
>Description:
src/sys/dev/pckbc/wskbdmap_mfii.c defines:

>How-To-Repeat:
ditto.
>Fix:
Unknown. but,
swapping solely KS_Cmd1 mapping (capslock <-> control-L) of the US base entry in wskbdmap_mfii.c didn't work.
However swapping KS_Cmd1 and KS_Cmd2 (capslock <-> control-L, Alt <-> control-R) in the same way worked.
It's like this:
--- wskbdmap_mfii.c     Sat Jan 12 07:36:31 2002
+++ wskbdmap_mfii.c.kt  Sat Jan 12 06:50:19 2002
@@ -76,7 +76,7 @@
     KC(26),                    KS_bracketleft, KS_braceleft,
     KC(27),                    KS_bracketright, KS_braceright,
     KC(28),                    KS_Return,
-    KC(29),  KS_Cmd1,          KS_Control_L,
+    KC(29),                    KS_Caps_Lock,
     KC(30),                    KS_a,
     KC(31),                    KS_s,
     KC(32),                    KS_d,
@@ -103,9 +103,9 @@
     KC(53),                    KS_slash,       KS_question,
     KC(54),                    KS_Shift_R,
     KC(55),                    KS_KP_Multiply,
-    KC(56),  KS_Cmd2,          KS_Alt_L,
+    KC(56),                    KS_Alt_L,
     KC(57),                    KS_space,
-    KC(58),                    KS_Caps_Lock,
+    KC(58),  KS_Cmd1,          KS_Control_L,
     KC(59),  KS_Cmd_Screen0,   KS_f1,
     KC(60),  KS_Cmd_Screen1,   KS_f2,
     KC(61),  KS_Cmd_Screen2,   KS_f3,
@@ -135,7 +135,7 @@
     KC(88),                    KS_f12,
     KC(127),                   KS_Pause, /* Break */
     KC(156),                   KS_KP_Enter,
-    KC(157),                   KS_Control_R,
+    KC(157),  KS_Cmd2,         KS_Control_R,
     KC(170),                   KS_Print_Screen,
     KC(181),                   KS_KP_Divide,
     KC(183),                   KS_Print_Screen,

>Release-Note:
>Audit-Trail:
>Unformatted:
 >static const keysym_t pckbd_keydesc_swapctrlcaps[] = {
 >/*  pos      command            normal          shifted */
 >    KC(29),                     KS_Caps_Lock,
 >    KC(58),  KS_Cmd1,           KS_Control_L,
 >};
 so, key(58) should release KS_Cmd1 when you selet keymap "swapctrlcaps". 
 But, "wsconsctl -w encoding=us.swapctrlcaps" or "US | KB_SWAPCTRLCAPS" in kernel configuration file
 makes the key(58) release KS_Cmd1.
 
 What I want is that pressing capslock key and Alt key and f2(f3,f4) make a switch to virtual screen #2(#3,#4dit).