Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: page up and friends Message-ID: <16397@well.sf.ca.us> Date: 25 Feb 90 21:06:52 GMT References: <1990Feb6.205957.27722@ux1.cso.uiuc.edu> <1990Feb9.163118.5726@intercon.com> <38830@apple.Apple.COM> <2967@murtoa.cs.mu.oz.au> <14233@reed.UUCP> <6870@internal.Apple.COM> <14258@reed.UUCP> Reply-To: oster@well.UUCP (David Phillip Oster) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 45 Here is a fragment of my personal include file for handling the keyboard. Remember, the numeric keypad has a key that says "Clear" on it, so it should be a synonym for Clear on the Edit menu, even though it generates the same ascii code as the Escape key. The escape key of course, should be a synonym for - or, in a dialog, for (Cancel). /* ascii code definitions returned by macintosh special keys */ #define HOMECHAR 1 #define ENTERCHAR 3 #define ENDCHAR 4 #define HELPCHAR 5 #define BACKSPACECHAR 8 #define PAGEUPCHAR 11 #define PAGEDOWNCHAR 12 #define RETURNCHAR 13 /* ascii code definitions returned by arrow keys */ #define ESCCHAR 27 #define CLEARCHAR 27 #define LEFTCHAR 28 #define RIGHTCHAR 29 #define UPCHAR 30 #define DOWNCHAR 31 #define DELCHAR 127 /* * clear, escape, and ^[ all generate the same code. * on the small american adb keyboard, the following keyboard * numbers apply: * CLEARCHAR (0x47) in the 2nd byte, * an escape (0x35). * an ^[ has 0x21. * * LEFTCHAR (0x7B) = ^~() * RIGHTCHAR (0x7C) = ^ () * UPCHAR (0x7D) = ^~() * DOWNCHAR (0x7E) = ^_ (1B) * * With 1 keyboard, the 3rd byte reports "2" */ -- -- David Phillip Oster - Note new address. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster