Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!maverick.ksu.ksu.edu!altair!jxf From: jxf@altair.cis.ksu.edu (Jerry Frain) Newsgroups: comp.sys.mac.programmer Subject: Re: Solution: swapping keys on extended keyboard Message-ID: <1991Jan4.064141.19223@maverick.ksu.ksu.edu> Date: 4 Jan 91 06:41:41 GMT References: <1991Jan3.084459.24275@maverick.ksu.ksu.edu> <1991Jan4.041359.848@eng.umd.edu> Sender: news@maverick.ksu.ksu.edu (The News Guru) Organization: Kansas State University Lines: 51 russotto@eng.umd.edu (Matthew T. Russotto) writes: >In article <1991Jan3.084459.24275@maverick.ksu.ksu.edu> jxf@altair.cis.ksu.edu (Jerry Frain) writes: >> >>A while back I posted a request for help swapping the control key >>and caps lock key on the Apple extended keyboard. >> >>I didn't receive any replies on how to _logically_ swap the keys >>(I did receive one very helpful reply on how to physically swap the >>lock-down mechanism) >Say, could you post that in comp.sys.mac.hardware???? Sure thing, I'll take care of that as soon as I finish this follow-up. [ I (logically) swapped the keys by swapping virtual keycodes in KMAP ] >[the hard way of using ResEdit to do it omitted]. Not really hard, only about 20 seconds of my time once I figured out what I wanted to change was in KMAP. >Hate to tell you this, but ResEdit 2.0 has a KCHR editor that would have >allowed you to do so in a much more intuitive way. Um, maybe, but it wasn't to my satisfaction. As I understand it, KCHR is a table for mapping virtual keycodes to the ascii values. I, however, modified the KMAP resource which interprets the raw keycodes to virtual keycodes. IMHO, Apple screwed up by placing the caps lock and control key where they are (were :-) on the extended keyboard. I permanently modified the keyboard, and modifying the virtual keycodes comes as close as I can (without some fancy hardware work) to permanently modifying the key mapping. Now, when I use ResEdit to look at the KCHR resource, I press the control key and ResEdit highlights *the caps lock key*. Neato, eh? Hence, I went one level lower in the key mappings than KCHR lets me go, and that's right where I wanted my key mapping -- as close to the hardware as possible. Cheers, --Jerry -- Jerry Frain -- Systems Programmer Kansas State University Department of Computing & Info Sciences Internet : jxf@cis.ksu.edu Manhattan, Kansas UUCP : ...!rutgers!ksuvax1!jxf