all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Num_Lock under solaris 5.8
@ 2006-05-12 10:01 Klaus Zeitler
  2006-05-12 10:18 ` Jan Djärv
  0 siblings, 1 reply; 12+ messages in thread
From: Klaus Zeitler @ 2006-05-12 10:01 UTC (permalink / raw)


My emacs doesn't seem to recognize the Num_Lock key (xkeycaps does).
Does this work for anybody else? Any hints what I should check?
My guess it's somewhere around line 6364 in xterm.c

#ifdef XK_Num_Lock
                             || ((unsigned)(orig_keysym) == XK_Num_Lock)
#endif

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the Cat
                                                     -- Lewis Carrol

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 10:01 Num_Lock under solaris 5.8 Klaus Zeitler
@ 2006-05-12 10:18 ` Jan Djärv
  2006-05-12 11:02   ` Klaus Zeitler
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Djärv @ 2006-05-12 10:18 UTC (permalink / raw)
  Cc: emacs-devel



Klaus Zeitler skrev:
> My emacs doesn't seem to recognize the Num_Lock key (xkeycaps does).
> Does this work for anybody else? Any hints what I should check?
> My guess it's somewhere around line 6364 in xterm.c
> 
> #ifdef XK_Num_Lock
>                              || ((unsigned)(orig_keysym) == XK_Num_Lock)
> #endif
> 

Start xev (you may have to get it from somewhere) and press Num_Lock and see 
what keysym it generates.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 10:18 ` Jan Djärv
@ 2006-05-12 11:02   ` Klaus Zeitler
  2006-05-12 11:39     ` Jan Djärv
  0 siblings, 1 reply; 12+ messages in thread
From: Klaus Zeitler @ 2006-05-12 11:02 UTC (permalink / raw)


>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
    Jan> 
    Jan> Start xev (you may have to get it from somewhere) and press Num_Lock
    Jan> and see what keysym it generates.

Num_Lock alone:

KeyPress event, serial 29, synthetic NO, window 0x8400001,
    root 0x25, subw 0x0, time 673410572, (125,124), root:(201,244),
    state 0x0, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 characters:  ""


Num_lock + KP_End:

KeyPress event, serial 29, synthetic NO, window 0x8400001,
    root 0x25, subw 0x0, time 675139460, (118,91), root:(238,255),
    state 0x20, keycode 96 (keysym 0xff9c, KP_End), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 29, synthetic NO, window 0x8400001,
    root 0x25, subw 0x0, time 675139556, (118,91), root:(238,255),
    state 0x20, keycode 96 (keysym 0xff9c, KP_End), same_screen YES,
    XLookupString gives 0 characters:  ""


KP_End alone:

KeyPress event, serial 29, synthetic NO, window 0x8400001,
    root 0x25, subw 0x0, time 675241060, (57,119), root:(177,283),
    state 0x0, keycode 96 (keysym 0xff9c, KP_End), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 29, synthetic NO, window 0x8400001,
    root 0x25, subw 0x0, time 675241180, (57,119), root:(177,283),
    state 0x0, keycode 96 (keysym 0xff9c, KP_End), same_screen YES,
    XLookupString gives 0 characters:  ""


This looks good to me (though it doesn't tell me much). state is set to 0x20
when Num_lock is pressed.

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Experience is something you don't get until
just after you need it.          -- Olivier

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 11:02   ` Klaus Zeitler
@ 2006-05-12 11:39     ` Jan Djärv
  2006-05-12 11:40       ` Jan Djärv
  2006-05-12 11:47       ` Klaus Zeitler
  0 siblings, 2 replies; 12+ messages in thread
From: Jan Djärv @ 2006-05-12 11:39 UTC (permalink / raw)
  Cc: emacs-devel



Klaus Zeitler skrev:
> 
> This looks good to me (though it doesn't tell me much). state is set to 0x20
> when Num_lock is pressed.
> 

That is as it should be.  If you press 7 on the keypad with and without 
Num-lock pressed, doesn't Emacs see them as separate keys (7 and <kp-7>)?  Use 
C-h l to see the last keys Emacs thinks was pressed.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 11:39     ` Jan Djärv
@ 2006-05-12 11:40       ` Jan Djärv
  2006-05-12 11:47       ` Klaus Zeitler
  1 sibling, 0 replies; 12+ messages in thread
From: Jan Djärv @ 2006-05-12 11:40 UTC (permalink / raw)
  Cc: emacs-devel



Jan Djärv skrev:
> 
> 
> Klaus Zeitler skrev:
>>
>> This looks good to me (though it doesn't tell me much). state is set 
>> to 0x20
>> when Num_lock is pressed.
>>
> 
> That is as it should be.  If you press 7 on the keypad with and without 
> Num-lock pressed, doesn't Emacs see them as separate keys (7 and 
> <kp-7>)?  Use C-h l to see the last keys Emacs thinks was pressed.
> 


Sorry, that should be <kp-7> and <kp-home>.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 11:39     ` Jan Djärv
  2006-05-12 11:40       ` Jan Djärv
@ 2006-05-12 11:47       ` Klaus Zeitler
  2006-05-12 12:11         ` Jan Djärv
  1 sibling, 1 reply; 12+ messages in thread
From: Klaus Zeitler @ 2006-05-12 11:47 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
    Jan> 
    Jan> If you press 7 on the keypad with and without Num-lock pressed,
    Jan> doesn't Emacs see them as separate keys (7 and <kp-home>)?

No, C-h l reveals:
<kp-home> <kp-home> C-h l

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Good advice is something a man gives when he is too
old to set a bad example.      -- La Rouchefoucauld

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 11:47       ` Klaus Zeitler
@ 2006-05-12 12:11         ` Jan Djärv
  2006-05-12 12:30           ` Klaus Zeitler
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Djärv @ 2006-05-12 12:11 UTC (permalink / raw)
  Cc: emacs-devel



Klaus Zeitler skrev:
>>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
>     Jan> 
>     Jan> If you press 7 on the keypad with and without Num-lock pressed,
>     Jan> doesn't Emacs see them as separate keys (7 and <kp-home>)?
> 
> No, C-h l reveals:
> <kp-home> <kp-home> C-h l
> 

And xev says...?

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 12:11         ` Jan Djärv
@ 2006-05-12 12:30           ` Klaus Zeitler
  2006-05-12 12:57             ` Jan Djärv
  0 siblings, 1 reply; 12+ messages in thread
From: Klaus Zeitler @ 2006-05-12 12:30 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
    Jan> 
    Jan> And xev says...?

Pressing Num_lock, then KP_7, then Num_lock and KP_7 again I get:

KeyRelease event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680513068, (31,48), root:(48,594),
    state 0x20, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyPress event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680514916, (31,48), root:(48,594),
    state 0x0, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyPress event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680523252, (31,48), root:(48,594),
    state 0x20, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680523428, (31,48), root:(48,594),
    state 0x20, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680525507, (31,48), root:(48,594),
    state 0x20, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyPress event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680526923, (31,48), root:(48,594),
    state 0x0, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyRelease event, serial 29, synthetic NO, window 0x9800001,
    root 0x25, subw 0x9800002, time 680527043, (31,48), root:(48,594),
    state 0x0, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
    XLookupString gives 0 characters:  ""

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 12:30           ` Klaus Zeitler
@ 2006-05-12 12:57             ` Jan Djärv
  2006-05-12 13:20               ` Klaus Zeitler
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Djärv @ 2006-05-12 12:57 UTC (permalink / raw)
  Cc: emacs-devel



Klaus Zeitler skrev:
>>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
>     Jan> 
>     Jan> And xev says...?
> 
> Pressing Num_lock, then KP_7, then Num_lock and KP_7 again I get:
> 
> KeyRelease event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680513068, (31,48), root:(48,594),
>     state 0x20, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 
> KeyPress event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680514916, (31,48), root:(48,594),
>     state 0x0, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 
> KeyPress event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680523252, (31,48), root:(48,594),
>     state 0x20, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 
> KeyRelease event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680523428, (31,48), root:(48,594),
>     state 0x20, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 
> KeyRelease event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680525507, (31,48), root:(48,594),
>     state 0x20, keycode 90 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 
> KeyPress event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680526923, (31,48), root:(48,594),
>     state 0x0, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 
> KeyRelease event, serial 29, synthetic NO, window 0x9800001,
>     root 0x25, subw 0x9800002, time 680527043, (31,48), root:(48,594),
>     state 0x0, keycode 102 (keysym 0xff95, KP_Home), same_screen YES,
>     XLookupString gives 0 characters:  ""
> 

Since XLookupString gives 0 characters, that is what Emacs gets too.  Your 
NumLock seems to be mapped to Mod3, I recognize this problem, I had it on Suns 
also (years ago).  Are you using a Sun keyboard?  Does your AltGr produce Mod2 
(state 0x10)?  You can perhaps use xmodmap to change that.  What does
% xmodmap -pm

show?

	Jan D.


	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 12:57             ` Jan Djärv
@ 2006-05-12 13:20               ` Klaus Zeitler
  2006-05-12 13:57                 ` Jan Djärv
  0 siblings, 1 reply; 12+ messages in thread
From: Klaus Zeitler @ 2006-05-12 13:20 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
    Jan> 
    Jan> Since XLookupString gives 0 characters, that is what Emacs gets too.
    Jan> Your NumLock seems to be mapped to Mod3, I recognize this problem, I
    Jan> had it on Suns also (years ago).

yes, it's on Mod3

    Jan> Are you using a Sun keyboard?

yes

    Jan> Does your AltGr produce Mod2 (state 0x10)?

yes

    Jan> What does % xmodmap -pm

xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0xe8),  Shift_R (0xec)
lock        Caps_Lock (0x4e)
control     Control_L (0xe7)
mod1        Meta_L (0xea)
mod2        Mode_switch (0xed)
mod3        Num_Lock (0x5a)
mod4        Alt_L (0xe9)
mod5        Super_R (0xee)

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
What makes the universe so hard to comprehend
is that there's nothing to compare it with.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 13:20               ` Klaus Zeitler
@ 2006-05-12 13:57                 ` Jan Djärv
  2006-05-15  9:10                   ` Klaus Zeitler
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Djärv @ 2006-05-12 13:57 UTC (permalink / raw)
  Cc: emacs-devel



Klaus Zeitler skrev:

> 
> xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):
> 
> shift       Shift_L (0xe8),  Shift_R (0xec)
> lock        Caps_Lock (0x4e)
> control     Control_L (0xe7)
> mod1        Meta_L (0xea)
> mod2        Mode_switch (0xed)
> mod3        Num_Lock (0x5a)
> mod4        Alt_L (0xe9)
> mod5        Super_R (0xee)

Well, then all I can suggest is you try to experiment with xmodmap.  Do for 
example xmodmap -pk and you should see for the keypad keys
      79         0xff95 (KP_Home)        0xffb7 (KP_7)

You can try to change Num_Lock to some other Mod.  A bit of research on the 
web indicates that there is indeed problems with X and Sun keyboards.  Why it 
hasn't been fixed is beyond me.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Num_Lock under solaris 5.8
  2006-05-12 13:57                 ` Jan Djärv
@ 2006-05-15  9:10                   ` Klaus Zeitler
  0 siblings, 0 replies; 12+ messages in thread
From: Klaus Zeitler @ 2006-05-15  9:10 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Jan" == Jan Djärv <jan.h.d@swipnet.se> writes:
    Jan> 
    Jan> You can try to change Num_Lock to some other Mod.

I have also tried things like:
add Mod3 = Mode_switch
keycode 0x60 = KP_End KP_1 1 1
in my xmodmap file with the hope that pressing the Mode_switch key would 
give me keys 3 and 4, i.e "1" from the xmodmap definitions.
(This works fine for e.g. "keycode 0x0B = a A adiaeresis Adiaeresis"
but not for the keypad). xev (similar to the Num_Lock problem) says:
XLookupString gives 0 characters.

Besides (even more annoying) it looks as if every modifier that I try to
define as Mod3 becomes automatically sticky, that's why I gave up the idea
of redefining Mod3.

Rumor has it that we'll switch to Solaris 5.10 in a few months. Maybe
that'll help.

Thanks for your quick and detailed support.

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Rule of Defactualization:
 Information deteriorates upward through bureaucracies.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-05-15  9:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-12 10:01 Num_Lock under solaris 5.8 Klaus Zeitler
2006-05-12 10:18 ` Jan Djärv
2006-05-12 11:02   ` Klaus Zeitler
2006-05-12 11:39     ` Jan Djärv
2006-05-12 11:40       ` Jan Djärv
2006-05-12 11:47       ` Klaus Zeitler
2006-05-12 12:11         ` Jan Djärv
2006-05-12 12:30           ` Klaus Zeitler
2006-05-12 12:57             ` Jan Djärv
2006-05-12 13:20               ` Klaus Zeitler
2006-05-12 13:57                 ` Jan Djärv
2006-05-15  9:10                   ` Klaus Zeitler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.