Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!portal!sv!news From: leonardr@sv.portal.com (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: Pseudo control key for a Plus? Message-ID: <1991Jun2.185554.7798@svc.portal.com> Date: 2 Jun 91 18:55:54 GMT References: Sender: usenet@svc.portal.com Reply-To: leonardr@sv.portal.com (Leonard Rosenthol) Organization: Software Ventures Corporation Lines: 32 Nntp-Posting-Host: 192.42.172.96 In article , d88-jwa@hemul.nada.kth.se (Jon W{tte) writes: > > leonardr@sv.portal.com (Leonard Rosenthol) writes: > > You could try and make your lines shorter than 80 chars, so people without > X or auto-linefeed can read your posts too. > Sorry about that, my news reader is stupider than I thought ;-) > > The correct way to do this is to patch _KeyTrans which is > > the trap which handles the 'mapping' of raw keycodes & modifiers into > > the events that the program gets via GNE/WNE. In the patch just check > > What's wrong with a jGNEFilter ? Foolproof, simple and elegant. > Just remember to chain-jump, unless the value you saved from the > hook was 0, in which case you RTS. Don't know if I've ever seen > it as 0, though... > jGNEFilter gets called too late in the game. Since the intention was to map something like the option key to the control key, you have to get in BEFORE dead key processing happens - remember that there are some keys which when used with the option key DO NOT generate events/keystrokes, but are instead stored for reference with the next key, ie. dead keys! The only way to handle this situation is to get in BEFORE the dead key processing, which happens during the _KeyTrans routine. Leonard Rosenthol ---------------------------------------------------------------------- + Leonard Rosenthol | AppleLink: MACgician + + Software Ventures | GEnie: MACgician + + Internet: leonardr@sv.portal.com | AOL: MACgician + ----------------------------------------------------------------------