[ltp] NumLock

D. Sen linux-thinkpad@www.bm-soft.com
Sat, 05 May 2001 21:01:42 -0400


Tino,

Thanks for that. It seems that the behaviour I was observing on friday night,
was an intermittent state of the TP. It seems to have fixed itself. I havent
rebooted the machine, restarted X. Everything is exactly as it was friday night
(it *has* gone through a few suspend cycles).....yet my numlock is behaving
perfectly. On friday night, I couldnt get the keyboard to produce a keycode
77......and I spent a long time trying to generate it, using different
combinations of keys.

I hope that the TP doesnt get into that state when I dont have access to an
external keyboard.

Thanks again for the response.
DS

Tino Keitel wrote:

> On Saturday,  5. May 2001 14:47, D. Sen wrote:
> > But here is the problem: I used xev to see what keycode was associated with
> > the numlock/scrolllock button. It  turns out to be 78 (even with
> > shift+scrolllock/numlock). It would need to be 77 for the (keycode 77 =
> > Num_Lock) to work. Right?
>
> Here is my xev output for the scroll and num lock key strokes:
>
> Scroll lock:
> ------------
>
> KeyPress event, serial 24, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225182007, (98,77), root:(317,318),
>     state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225182079, (98,77), root:(317,318),
>     state 0x80, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> Scroll unlock:
> --------------
>
> KeyPress event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225183574, (98,77), root:(317,318),
>     state 0x80, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225183661, (98,77), root:(317,318),
>     state 0x80, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> Num lock:
> ---------
>
> KeyPress event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225189350, (98,77), root:(317,318),
>     state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyPress event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225189548, (98,77), root:(317,318),
>     state 0x1, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225189635, (98,77), root:(317,318),
>     state 0x11, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225189827, (98,77), root:(317,318),
>     state 0x11, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> Num unlock:
> -----------
>
> KeyPress event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225193082, (98,77), root:(317,318),
>     state 0x10, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyPress event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225193272, (98,77), root:(317,318),
>     state 0x11, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225193376, (98,77), root:(317,318),
>     state 0x11, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
>     root 0x31, subw 0x0, time 1225193640, (98,77), root:(317,318),
>     state 0x1, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
>     XLookupString gives 0 characters:  ""
>
> xmodmap -pm shows this:
>
> shift       Shift_L (0x32),  Shift_R (0x3e)
> lock        Caps_Lock (0x42)
> control     Control_L (0x25),  Control_R (0x6d)
> mod1        Alt_L (0x40)
> mod2        Num_Lock (0x4d)
> mod3        Mode_switch (0x71)
> mod4        Meta_L (0x73)
> mod5        Scroll_Lock (0x4e)
>
> Maybe this it's of some use to you.
>
> Tino
>
> ----- The Linux ThinkPad mailing list -----
> The linux-thinkpad mailing list home page is at:
> http://www.bm-soft.com/~bm/tp_mailing.html

--
D. Sen, Room E167
AT&T Labs-Research
Shannon Laboratory
180 Park Ave.
Florham Park NJ 07932-0971
Ph: 973-360-8546
http://www.research.att.com/~dsen



----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html