delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/28/11:34:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 28 Feb 2003 09:33:58 -0700
Message-Id: <200302281633.h1SGXwAF028677@wolf.cimsoft.com>
From: Robert Mecklenburg <mecklen AT cimsoft DOT com>
To: Cygwin XFree List <cygwin-xfree AT cygwin DOT com>
cc: Cygwin Users List <cygwin AT cygwin DOT com>
Subject: 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019