hill@siemens.UUCP (04/22/87)
Several weeks ago the following article was posted: > A long time ago there was a discussion of using the Option key as Control in > Red Ryder. The problem is that certain option key combinations (eg., > Option-e) are dead keys and don't generate a character until the next key is > typed. > Contrary to the messages posted at the time, it is very easy to disable > dead keys in the keyboard driver (although I'm not sure that this has been > documented). MacTerminal does it, in fact. > Basically, there are 2 resources (pieces of code, actually) that map raw > keycodes, generated by the keyboard, into ASCII characters. One resource > handles the main keyboard and the other the external keypad. It is > possible to completely replace these resources if you want to modify the > mapping in some unusual way. > Turning off dead keys, however, is very easy and already provided in the > system. Low memory location $29E contains the address of the main mapping > function. The resource begins with a 2-byte BRA instruction, followed by a > 1-byte flag. > If the flag is $FF then dead keys are on, if it is $00, then dead keys are > off (ie., typing option-E will give you an accent character immediately). > It's as easy as that. Programs that turn off dead keys should make sure to > re-enable them when they terminate. > It would be trivial to write a desk accessory that allows you to > enable/disable dead keys at any time. Then it might be more convenient to > use the Option key in Red Ryder. > I hope this helps current and future terminal emulators. > Larry Rosenstein > Object Specialist > Apple Computer Using MACSBUG's display memory command and MBASIC's peek command to examine memory locations $29E..$2A0, I do not find the posted data. I would like to know what exactly is meant by low memory location $29E. Is the address absolute, or is it offset from another location. If it is an offset, what is the offset, and will it always be the same offset, or is it subject to change in the future? If it isn't an offset, what's the problem? My system is one of the first Macintoshes produced, and was upgraded (Apple upgrade) to a 512k Mac, and then later to a 512ke (Apple upgrade). I am running System 3.2 and Finder 5.3. The disk cache was on and set to 96k. I didn't try turning the cache off, but I don't think that this has anything to do with the problem (I hope). A source code solution would be appreciated. Turbo Pascal source would be ideal (since it's the only compiler I own), but any C or Pascal source would be great. Thanks in advance, John Hill ============================================================================== John Hill Siemens RTL {ihnp4|astrovax|allegra|dshovax}!siemens!hill Princeton, NJ If I go insane, please don't put your wires in my brain. - Pink Floyd
dwb@apple.UUCP (04/24/87)
>> It would be trivial to write a desk accessory that allows you to >> enable/disable dead keys at any time. Then it might be more convenient to >> use the Option key in Red Ryder. >> Larry Rosenstein >> Object Specialist >> Apple Computer In fact this has been done. Some months ago I posted a Desk Accessory called "Set Option Key" which did just that. If folks would like I can repost it. It also allows the change to be made permanent by modifying the system file. -- David W. Berry dwb@well.uucp dwb@Delphi dwb@apple.com 293-0752@408.MaBell