[comp.emacs] Epoch help with numeric key pad key

carroll@m.cs.uiuc.edu (07/06/90)

/* Written  6:23 pm  Jul  2, 1990 by dare@bcsfse.uucp in m.cs.uiuc.edu:comp.emacs */
/* ---------- "Epoch help with numeric key pad key" ---------- */

System: Apollo DN3500
OS: SR 10.2
X:  R3
Epoch:  18.55


Problem: I would like some help in getting my Numeric keypad keys tied
to functions.  All I can ever trap them to do is 12345679+-. 
/* End of text from m.cs.uiuc.edu:comp.emacs */
Here's what I would do:
Run the "xev" client. This should give you a small window, and a lot of text
spewed out. Ignore the text for now. Move the mouse cursor into the xev
window, and press 1 on the numberpad keys. You should get something like

KeyPress event, serial 15, synthetic NO, window 0x700001,
    root 0x80067, subw 0x0, time 2971874180, (109,96), root:(111,98),
    state 0x0, keycode 100 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 15, synthetic NO, window 0x700001,
    root 0x80067, subw 0x0, time 2971874300, (109,96), root:(111,98),
    state 0x0, keycode 100 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 characters:  ""

Note the keysym field. Remember the name there. Go back into Epoch, and use
(epoch::rebind-key 0 "<the name from xev>" "<some unique key sequence>")
This will cause pressing keypad 1 to look like you pressed the key sequence.
You can then bind this key sequence to whatever function you'd like.

If the keysym is named "1" (the same as the normal 1 key), you've got more of
a problem. You'll have to use xmodmap to map the keycode to some other keysym,
and then use epoch::rebind-key to rebind that keysym to something useful.

If you have any more questions/problems, send email.

Alan M. Carroll                Barbara/Marilyn in '92 :
carroll@cs.uiuc.edu            + This time, why not choose the better halves?
Epoch Development Team         
CS Grad / U of Ill @ Urbana    ...{ucbvax,pur-ee,convex}!cs.uiuc.edu!carroll