summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-10-25 12:22:19 +0000
committerru <ru@FreeBSD.org>2006-10-25 12:22:19 +0000
commit2d15dae3583eeb7c48aaf322a38525115ba1d571 (patch)
treef73407a4568f5a176d16a499b22184ca3b66b6d6 /sys/dev/usb
parentbc12979396e6cafc52c416a0a4557ad4e6037e2a (diff)
downloadFreeBSD-src-2d15dae3583eeb7c48aaf322a38525115ba1d571.zip
FreeBSD-src-2d15dae3583eeb7c48aaf322a38525115ba1d571.tar.gz
Fix non-working CAPS LED under X by applying fix from atkbd.c,v 1.27:
: revision 1.27 : date: 2000/05/28 12:43:24; author: ache; state: Exp; lines: +3 -2 : Manipulate with AltGR Led (really CapsLock Led) only in K_XLATE mode, because : all other modes not set ALKED flag and it means that CapsLock always turned : off for them. : Real bug example is X11 which never turn on CapsLock with Russian keyboard. : : PR: 18651 : Submitted by: "Mike E. Matsnev" <mike@po.cs.msu.su> MFC after: 3 days
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ukbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index 45b41e2..9a5baf4 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1218,7 +1218,8 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
}
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
OpenPOWER on IntegriCloud