[comp.windows.x] MacX keypad escape sequences

ghh@clarity.Princeton.EDU (Gilbert Harman) (11/07/90)

I am using MacX from within the Mac OS rather than AUX.  One
thing I do all the time is bring up an emacs window from a
remote machine.  I would like to have emacs recognize keypad
events as escape sequences rather than as numbers.  Has
anyone figured out how to do this, e.g. using xmodmap?


--
		       Gilbert Harman (ghh@clarity.princeton.edu)
                       Princeton University Cognitive Science Laboratory
	               221 Nassau Street, Princeton, NJ 08542
	               (609) 258-2824

abm@alan.aux.apple.com (Alan Mimms) (11/07/90)

In article <GHH.90Nov6110937@clarity.princeton.edu>, ghh@clarity.Princeton.EDU (Gilbert Harman) writes:
|> I am using MacX from within the Mac OS rather than AUX.  One
|> thing I do all the time is bring up an emacs window from a
|> remote machine.  I would like to have emacs recognize keypad
|> events as escape sequences rather than as numbers.  Has
|> anyone figured out how to do this, e.g. using xmodmap?
|> 

You can easily determine the keysyms associated with the keys on the
MacX keyboard by using the MIT-supplied client "xev" and pressing each
key you're interested in, or by looking at a copy of Inside Macintosh
(volume 1 for old keyboards and volume 4 or 5 for ADB keyboards) in the
Event Manager chapter to see the actual keyboard keycodes used
internally by the MacOS.  If you add "8" to these values, they precisely
match the MacX keycodes (for keycodes <= 127 + 8).  You can use the
output of "xmodmap -pk" to see what keycodes have what keysyms on them
by default.

Note that the Command key works to add more keycodes to the numeric
keypad and arrow keys as well.

This stuff wasn't particularly well documented (at all?) in MacX 1.0's
documentation.  I hope to rectify this in a future release.  If you have
the DEC product DEC LanWORKS for Macintosh, you'll have a chart for the
keys and their corresponding keysyms.  If you're REALLY stuck, I have
a document when I can send to you which details the keyboard layout (it's
in Microsoft Word 4.0 format).

|> 		     Gilbert Harman (ghh@clarity.princeton.edu)
|>                      Princeton University Cognitive Science Laboratory
|> 	             221 Nassau Street, Princeton, NJ 08542
|> 	             (609) 258-2824

-- 

Alan Mimms (alan@apple.com, ...!apple!alan)   | My opinions are generally
A/UX X group                                  | pretty worthless, but
Apple Computer                                | they *are* my own...
"Laugha whila you can, monkey boy..." -- John Whorfin in Buckaroo Bonzai
"Never rub another man's rhubarb" -- The Joker in BatMan