Subject: kern/11663: WSCONS is missing the PCVT feature of one key console switching
To: None <gnats-bugs@gnats.netbsd.org>
From: Andrew Gillham <gillhaa@ghost.whirlpool.com>
List: netbsd-bugs
Date: 12/07/2000 15:39:18
>Number: 11663
>Category: kern
>Synopsis: WSCONS is missing the PCVT feature of one key console switching
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Dec 07 15:39:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Andrew Gillham
>Release: 2000/12/06 1.5L
>Organization:
>Environment:
1.5L i386 machine.
>Description:
WSCONS is missing the handy PCVT feature of mapping the F9 through
F12 keys to the first four virtual consoles. This feature is very
nice, especially if you have no use for the keys otherwise.
>How-To-Repeat:
Press F9,F10,F11,F12 and watch it not switch consoles. :-)
>Fix:
This is probably not the "correct" fix, but here it is anyway.
My hack is enabled with "options WSDISPLAY_QUICK_KEYS" which is
a lame name, and should be defopt'ed anyway.
Index: pckbc/wskbdmap_mfii.c
===================================================================
RCS file: /u0/netbsd/anoncvs/main/syssrc/sys/dev/pckbc/wskbdmap_mfii.c,v
retrieving revision 1.18
diff -u -r1.18 wskbdmap_mfii.c
--- pckbc/wskbdmap_mfii.c 2000/10/13 12:53:23 1.18
+++ pckbc/wskbdmap_mfii.c 2000/12/07 23:29:23
@@ -128,8 +128,8 @@
KC(81), KS_KP_Next, KS_KP_3,
KC(82), KS_KP_Insert, KS_KP_0,
KC(83), KS_KP_Delete, KS_KP_Decimal,
- KC(87), KS_f11,
- KC(88), KS_f12,
+ KC(87), KS_Cmd_Screen10, KS_f11,
+ KC(88), KS_Cmd_Screen11, KS_f12,
KC(127), KS_Pause, /* Break */
KC(156), KS_KP_Enter,
KC(157), KS_Control_R,
Index: wscons/wskbd.c
===================================================================
RCS file: /u0/netbsd/anoncvs/main/syssrc/sys/dev/wscons/wskbd.c,v
retrieving revision 1.39
diff -u -r1.39 wskbd.c
--- wscons/wskbd.c 2000/10/01 03:29:13 1.39
+++ wscons/wskbd.c 2000/12/07 23:29:24
@@ -1323,6 +1323,17 @@
case KS_Cmd2:
update_modifier(sc->id, *type, 0, MOD_COMMAND2);
break;
+
+#if NWSDISPLAY > 0
+#ifdef WSDISPLAY_QUICK_KEYS
+ case KS_Cmd_Screen8:
+ case KS_Cmd_Screen9:
+ case KS_Cmd_Screen10:
+ case KS_Cmd_Screen11:
+ wsdisplay_switch(sc->sc_displaydv, ksym - KS_Cmd_Screen8, 0);
+ return (1);
+#endif
+#endif
}
if (*type != WSCONS_EVENT_KEY_DOWN ||
Index: wscons/wsksymdef.h
===================================================================
RCS file: /u0/netbsd/anoncvs/main/syssrc/sys/dev/wscons/wsksymdef.h,v
retrieving revision 1.39
diff -u -r1.39 wsksymdef.h
--- wscons/wsksymdef.h 2000/12/05 17:53:46 1.39
+++ wscons/wsksymdef.h 2000/12/07 23:29:24
@@ -422,6 +422,8 @@
#define KS_Cmd_Screen7 0xf407
#define KS_Cmd_Screen8 0xf408
#define KS_Cmd_Screen9 0xf409
+#define KS_Cmd_Screen10 0xf40a
+#define KS_Cmd_Screen11 0xf40b
#define KS_Cmd_Debugger 0xf420
#define KS_Cmd_ResetEmul 0xf421
#define KS_Cmd_ResetClose 0xf422
>Release-Note:
>Audit-Trail:
>Unformatted: