This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Trouble getting shift keypad events


I'm not sure if this is a cygwin emacs problem or a cygwin XFree
problem, but here goes.


Using emacs under xfree started with:

    start XWin -screen 0 830 1124 -rootless -clipboard

I am not getting shift-keypad events as expected.  When I type C-h c
<keypad 3> I get the message "<kp-next> runs the command ..." in the
minibuffer display area.  When I type C-h c <shift keypad 3> I get the
message "<next> runs the command ..." in the minibuffer display area.
Under nt emacs 


I run xev in an xterm and when I press keypad 3 I get:

KeyPress event, serial 22, synthetic NO, window 0xe00001,
    root 0x36, subw 0xe00002, time 342208796, (44,51), root:(153,118),
    state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 22, synthetic NO, window 0xe00001,
    root 0x36, subw 0xe00002, time 342208968, (44,51), root:(153,118),
    state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
    XLookupString gives 0 characters:  ""


when I press shift keypad three I get:

KeyPress event, serial 22, synthetic NO, window 0xe00001,
    root 0x36, subw 0xe00002, time 342277421, (31,30), root:(140,97),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyPress event, serial 22, synthetic NO, window 0xe00001,
    root 0x36, subw 0xe00002, time 342277609, (31,30), root:(140,97),
    state 0x1, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 characters:  "3"

KeyRelease event, serial 22, synthetic NO, window 0xe00001,
    root 0x36, subw 0xe00002, time 342277734, (31,30), root:(140,97),
    state 0x1, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 characters:  "3"

KeyRelease event, serial 22, synthetic NO, window 0xe00001,
    root 0x36, subw 0xe00002, time 342277937, (31,30), root:(140,97),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 characters:  ""


I have no idea if the xev output is correct.

Debugging this issue is made slightly more complex by an interesting
feature of emacs.  If a function is not bound to a keypad key, C-h c
reports a different keypress than if a function is bound.  If no
function is bound to keypad Enter C-h c reports RET as the keypress.
If a function is bound C-h c reports kp-enter.  So to reproduce the
problem I'm seeing you must bind some function to the keypad key:

	(global-set-key [kp-next] 'forward-word)
	(global-set-key [S-kp-next] 'forward-word)


Any suggestions on how to get cygwin emacs to recognize shift-keypad-3
as <S-kp-next> as nt emacs does?

Thanks,
-- 
Robert


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]