How to make NumLock behavior just like in Windows?
Posted
by
???
on Super User
See other posts from Super User
or by ???
Published on 2010-12-22T03:48:02Z
Indexed on
2010/12/26
4:55 UTC
Read the original article
Hit count: 238
The NumLock and the keypad is so weired in Ubuntu.
I have two computers, A
is a desktop, with USB keyboard, B
is a laptop, with laptop keyboard and another USB keyboard.
On the desktop A
, whether the NumLock is on or off, the number keys on the keypad just don't work. Also the NumLock
LED is always off.
The logs shown in xev
:
KeyPress event, serial 36, synthetic NO, window 0x6800001,
root 0xb0, subw 0x0, time 9541332, (172,-12), root:(1846,452),
state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x6800001,
root 0xb0, subw 0x0, time 9541412, (172,-12), root:(1846,452),
state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
And on the laptop B
, I found that, when the NumLock is on, then many key combinations won't work. For example, generally Ctrl-A is used to select all, but it won't work when NumLock is on.
The logs shown in xev
:
(no log when pressed Fn+NumLock on the laptop keyboard)
Logs when pressed the NumLock on the USB keyboard:
(Switch On)
KeyPress event, serial 40, synthetic NO, window 0xb600001,
root 0xac, subw 0x0, time 22187595, (102,107), root:(1198,133),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
PropertyNotify event, serial 40, synthetic NO, window 0xb600001,
atom 0x1b8 (XKLAVIER_STATE), time 22187601, state PropertyNewValue
KeyRelease event, serial 40, synthetic NO, window 0xb600001,
root 0xac, subw 0x0, time 22187723, (102,107), root:(1198,133),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
(Switch Off)
KeyPress event, serial 40, synthetic NO, window 0xb600001,
root 0xac, subw 0x0, time 22187899, (102,107), root:(1198,133),
state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
PropertyNotify event, serial 40, synthetic NO, window 0xb600001,
atom 0x1b8 (XKLAVIER_STATE), time 22187904, state PropertyNewValue
KeyRelease event, serial 40, synthetic NO, window 0xb600001,
root 0xac, subw 0x0, time 22188003, (102,107), root:(1198,133),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
© Super User or respective owner