Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!decwrl!pa.dec.com!e2big.mko.dec.com!decvax.dec.com!jtkohl
From: jtkohl@zk3.dec.com (John Kohl)
Subject: Re: [HACK:] fix CAPSLOCK for good...
In-Reply-To: jtkohl@zk3.dec.com's message of Mon, 26 Jul 1993 17:10:51 GMT
Message-ID: <1993Jul27.124733.8899@e2big.mko.dec.com>
Sender: usenet@e2big.mko.dec.com (Mr. USENET)
Organization: Digital Equipment Corporation
References: <22h1vs$6a6@aggedor.rmit.OZ.AU> <22lm8l$c0k@cleese.apana.org.au>
<22uoji$h3d@introl.introl.com> <1993Jul26.033520.19423@ucc.su.oz.au>
<230oil$os1@introl.introl.com>
<1993Jul26.171051.21986@e2big.mko.dec.com>
Date: Tue, 27 Jul 1993 12:47:33 GMT
Lines: 64
Here's my patch to x386Events.c to allow things like "xmodmap -L +C
Caps_Lock" to DTRT:
Apply this to x386Events.c:
*** /tmp/RCSA000325 Sun Mar 8 10:42:16 1992
--- x386Events.c Sun Mar 8 02:38:33 1992
***************
*** 247,257 ****
x386Info.scanPrefix = scanCode; /* special prefixes */
return;
- case KEY_CapsLock:
- case KEY_NumLock:
- case KEY_ScrollLock:
- updateLeds = TRUE; /* led changes by firmware */
- break;
}
}
--- 247,252 ----
***************
*** 338,344 ****
* LockKey special handling:
* ignore releases, toggle on & off on presses.
*/
! if (keysym[0] == XK_Caps_Lock ||
keysym[0] == XK_Scroll_Lock ||
keysym[0] == XK_Num_Lock)
{
--- 333,343 ----
* LockKey special handling:
* ignore releases, toggle on & off on presses.
*/
! /*
! * Caps_Lock is special, since we really only want to toggle its light/state
! * if the key is a modifier mapping to the Caps_Lock function.
! */
! if (keyc->modifierMap[keycode] & LockMask ||
keysym[0] == XK_Scroll_Lock ||
keysym[0] == XK_Num_Lock)
{
***************
*** 352,358 ****
else
flag = TRUE;
! if (keysym[0] == XK_Caps_Lock) x386Info.capsLock = flag;
if (keysym[0] == XK_Num_Lock) x386Info.numLock = flag;
if (keysym[0] == XK_Scroll_Lock) x386Info.scrollLock = flag;
updateLeds = TRUE;
--- 351,357 ----
else
flag = TRUE;
! if (keyc->modifierMap[keycode] & LockMask) x386Info.capsLock = flag;
if (keysym[0] == XK_Num_Lock) x386Info.numLock = flag;
if (keysym[0] == XK_Scroll_Lock) x386Info.scrollLock = flag;
updateLeds = TRUE;
--
John Kohl <jtkohl@zk3.dec.com> or <jtkohl@mit.edu>
working for but not representing: Digital Equipment Corporation
What are you pretending not to know?