Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2009 22:03:20 GMT
From:      paradox <ddkprog@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/139144: the problem CapsLock Led
Message-ID:  <200909252203.n8PM3KRs041943@www.freebsd.org>
Resent-Message-ID: <200909252210.n8PMA1i2068952@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         139144
>Category:       misc
>Synopsis:       the problem CapsLock Led
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 25 22:10:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     paradox
>Release:        9 current
>Organization:
>Environment:
FreeBSD asus 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Fri Sep 25 16:10:42 UTC 2009     root@asus:/work/cvsup/freebsd/9.0/src/sys/amd64/compile/GENERIC  amd64
>Description:
have problem with CapsLock Led indicator
as i am understand CapsLock Led should not depend on keymap
and should always indication CapsLock Key status
but after load keymap 
  as example kbdcontrol -l ru.koi8-r
lost status indication CapsLock Key
possible not better patch below
but it works
>How-To-Repeat:
press CapsLock key before
and after load keymap
kbdcontrol -l ru.koi8-r 
>Fix:


Patch attached with submission follows:

--- kbd.c.orig	2009-09-26 01:29:58.000000000 +0400
+++ kbd.c	2009-09-26 01:35:23.000000000 +0400
@@ -1232,6 +1232,19 @@
 	if (up) {	/* break: key released */
 		action = kbd->kb_lastact[keycode];
 		kbd->kb_lastact[keycode] = NOP;
+
+		switch (keycode) {
+		case 0x3a:
+#ifndef PC98
+			state &= ~CLKDOWN;
+#else
+			state &= ~CLKED;
+			i = state & LOCK_MASK;
+			kbdd_ioctl(kbd, KDSETLED, (caddr_t)&i);
+#endif
+		default:;
+		}
+
 		switch (action) {
 		case LSHA:
 			if (state & SHIFTAON) {
@@ -1303,13 +1316,6 @@
 			state &= ~NLKDOWN;
 			break;
 		case CLK:
-#ifndef PC98
-			state &= ~CLKDOWN;
-#else
-			state &= ~CLKED;
-			i = state & LOCK_MASK;
-			kbdd_ioctl(kbd, KDSETLED, (caddr_t)&i);
-#endif
 			break;
 		case SLK:
 			state &= ~SLKDOWN;
@@ -1333,12 +1339,9 @@
 				kbd->kb_lastact[keycode] = action;
 			if (kbd->kb_lastact[keycode] != action)
 				action = NOP;
-			switch (action) {
-			/* LOCKING KEYS */
-			case NLK:
-				set_lockkey_state(kbd, state, NLK);
-				break;
-			case CLK:
+
+			switch (keycode) {
+			case 0x3a:
 #ifndef PC98
 				set_lockkey_state(kbd, state, CLK);
 #else
@@ -1346,6 +1349,16 @@
 				i = state & LOCK_MASK;
 				kbdd_ioctl(kbd, KDSETLED, (caddr_t)&i);
 #endif
+
+			default:;
+			}
+
+			switch (action) {
+			/* LOCKING KEYS */
+			case NLK:
+				set_lockkey_state(kbd, state, NLK);
+				break;
+			case CLK:
 				break;
 			case SLK:
 				set_lockkey_state(kbd, state, SLK);


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909252203.n8PM3KRs041943>