Path: utzoo!attcan!uunet!super!udel!princeton!njin!rutgers!tut.cis.ohio-state.edu!osu-cis!att!ttrdc!ttrde!ttrdf!fjo
From: fjo@ttrdf.UUCP (Frank Owen )
Newsgroups: comp.sys.mac
Subject: Re: Is there a MacPlus Keyboard with a Control Key?
Message-ID: <744@ttrdf.UUCP>
Date: 26 Sep 88 16:29:13 GMT
References: <10113@dartvax.Dartmouth.EDU>
Sender: uucp@super.ORG
Organization: AT&T, Skokie, IL
Lines: 44

in article <10113@dartvax.Dartmouth.EDU>, earleh@eleazar.dartmouth.edu (Earle R. Horton) says:
> 
>      A simpler solution exists, if you are willing to do without your
> Caps Lock key.  It is possible to write an INIT to patch the
> GetNextEvent() trap call to convert characters to control characters
> when the event received is a keyboard event and when the Caps Lock key
> is down.  On a stock Mac Plus or original Macintosh keyboard, it is
> possible to remove a little locking mechanism from the Caps Lock key
> switch, and make this key behave mechanically like other keys.  This
> solution will fool all applications which use GetNextEvent() to get
> keyboard input into thinking that a control character was generated by
> the keyboard when, in fact, the Caps Lock key had been held down.

Aha! I have done something like this already. I think I also had to patch
KeyTrans() to get it to work.  
  My patches really just convert the CapsLock key into another "command"
key. This may NOT be the same as the true control key on the ADB keyboards,
but it is good enough for my applications.
  I have also included a "software" Caps Lock, so that you don't
have to really give up the Caps Lock function. To enable the Caps Lock,
just hold down the command key while pressing the Caps Lock (now another "command"
key). Repeat this operation to release the software CapsLock. There
is no physical designation that the CapsLock is on, however, so you
just have to remember.
   The hardware modification to disable the physical lockking mechanism
of the key IS reversible, so if you decide you like the stock setup, you
can revert.
   I have 2 complaints with my setup:
     1) Apparently not all programs use GetNextEvent to detect key-stroke
	events. Desk Accesories (like KeyCaps for example) seem to
	fall into this catagory.
     2) The spring that keeps the CapsLock key up is a little stiffer
	than the other keys. This is just a minor complaint.

  Other than the above two problems, I have been happy with my keyboard
hack. The patch does take about 700 bytes of system heap space.
(Nothing is free).
  If people are interested, I'd be happy to post the INIT to the .binaries.

-- 
Frank Owen (fjo@ttrdf)  312-982-2182
AT&T Bell Laboratories 
5555 Touhy Ave., Skokie, IL  60077
PATH:  ...!att!ttrdf!fjo