From nobody@FreeBSD.ORG  Thu May 18 05:12:20 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id B960837BD84; Thu, 18 May 2000 05:12:20 -0700 (PDT)
Message-Id: <20000518121220.B960837BD84@hub.freebsd.org>
Date: Thu, 18 May 2000 05:12:20 -0700 (PDT)
From: mike@po.cs.msu.su.su
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Capslock LED doesn't work in XFree86 when using a syscons keymap with more that 128 keys defined
X-Send-Pr-Version: www-1.0

>Number:         18651
>Category:       kern
>Synopsis:       Capslock LED doesn't work in XFree86 when using a syscons keymap with more that 128 keys defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 18 05:20:00 PDT 2000
>Closed-Date:    Sun May 28 05:00:47 PDT 2000
>Last-Modified:  Sun May 28 05:48:58 PDT 2000
>Originator:     Mike E. Matsnev
>Release:        4.0-STABLE
>Organization:
MSU
>Environment:
FreeBSD whaali 4.0-STABLE FreeBSD 4.0-STABLE #3: Thu May 18 15:35:02 MSD 2000     toor@whaali:/usr/src/sys/compile/HAALI  i386
>Description:
The capslock led can't be turned on or off from XFree86 when
a keymap with more than 128 keys is loaded in syscons.
>How-To-Repeat:
Load a keymap with a secondary table:
 kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
Start XFree
 startx
Now press capslock key, the xkb state changes, but that change is not
reflected by capslock led.
>Fix:
The following patch allows the X server to change the state of the
CapsLock led when the keyboard is not in XLATE mode

--- sys/dev/kbd/atkbd.c,orig    Fri Apr 21 13:17:53 2000
+++ sys/dev/kbd/atkbd.c Thu May 18 15:34:55 2000
@@ -860,7 +860,7 @@
                }
                i = *(int *)arg;
                /* replace CAPS LED with ALTGR LED for ALTGR keyboards */
-               if (kbd->kb_keymap->n_keys > ALTGR_OFFSET) {
+               if (state->ks_mode == K_XLATE && kbd->kb_keymap->n_keys > ALTGR_OFFSET) {
                        if (i & ALKED)
                                i |= CLKED;
                        else


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Sun May 28 05:00:47 PDT 2000 
State-Changed-Why:  
Fix applied 
>Unformatted:
