🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ti.explorer
Article #358

Re: Keyboard Lock Keys

#358
From: Jamie Zawinski
Date: Fri, 03 May 1991 07:59
25 lines
1897 bytes
In article <9105022032.AA07060@gensym.com> mhd@gensym.UUCP (Mark H David) wrote:
> 
> Is there any way in lisp on the Explorer to tell if 
> if the MODE LOCK key is down (has its light on) or not?

Yeah, real simple: see which bits are set in SYS:LOCK-BITS.  To toggle the
state of the lights on those keys, use TV:WRITE-KEYBOARD with certain magic
symbols, like 'TV:BOLD-KEY-LED-ON and 'TV:BOLD-KEY-LED-OFF.

But remember that the mode-lock key already has a meaning: when it's on, the
cursor keys move the mouse pointer in 1-pixel increments.

Check out the code in spice.cs.cmu.edu:/usr/jwz/public/bold-lock.lisp for
examples of how to do this stuff.  This file defines a Zmacs minor-mode that
sets the current font to a bold version of the current font (and interacts
properly with electric-font-lock-mode.)  Terribly convenient.

You may be tempted to make the lights on those four keys cycle in some kind of
nifty pattern.  There are two problems with this: when the caps light is on,
it is as if the caps key is down, which is certainly not something you want
happening spontaneously; and calling TV:WRITE-KEYBOARD too frequently will
cause the keyboard to start reporting parity errors with the frightenly large
"system monitor" popup window.  (At least in older versions of the os.)

	-- Jamie
Technical Details
Message-ID: <JWZ.91May3035948@thalidomide.lucid.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!lucid.com!campeau!jwz
References: <9105022032.AA07060@gensym.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!lucid.com!campeau!jwz
From: jwz@lucid.com (Jamie Zawinski)
Newsgroups: comp.sys.ti.explorer
Subject: Re: Keyboard Lock Keys
Message-ID: <JWZ.91May3035948@thalidomide.lucid.com>
Date: 3 May 91 07:59:48 GMT
References: <9105022032.AA07060@gensym.com>
Sender: usenet@lucid.com
Distribution: inet
Organization: Lucid, Inc., Menlo Park, CA
Lines: 25
In-Reply-To: mhd@gensym.UUCP's message of 2 May 91 20:32:17 GMT
X-Windows: Dissatisfaction guaranteed.