04-17-2021, 05:50 AM
(This post was last modified: 04-17-2021, 10:17 AM by ab1jx.
Edit Reason: dpkg-reconfigure locales
)
OK, I tried that. But what you can't tell from this is that where it says scroll lock I was actually pressing num lock. It did log num lock a few times but I was pressing something else. I more or less started with F9 and went through F12, a few times. I pressed Esc between. I had 3 rxvt windows open, one for xev, one to paste into later, and one to pkill xev. I used the Shift-Fn-Pageup to backscroll up, then point-click, shift and drag down to get the whole thing highlighted, then clicked in the log window and did shift-fn-insert to paste. The F8/insert key seems normal. Then I saved as text, copied to /tmp, opened in Firefox and copied and pasted here.
The KeymapNotify with zeroes is a start of an xev run. When I press Fn by itself nothing gets logged in xev. This was all F9 to F12 except Esc between to mark run ends.
I think it's a matter of keymaps, because there are 3 levels at least. There's one set by locale (I'm using C.UTF-8), then one by "keyboard model" (I'm using "Generic 105key PC (int)") then a 3rd by "keyboard layout" (I'm using English (US)). Not Cherokee, dvorak, etc.
Using dpkg-reconfigure locales which brings up a Whiptail dialog box like when you install or like raspi-config gets you. I have a few Raspberry Pi computers too and Raspbian is mostly like Debian.
I think if you open up a PBP and write down the numbers on the back of the keyboard, then Google them you might be able to find a manufacturer's data sheet that will list raw hardware scan codes. I think I've seen them for other keyboards. I'm not sure I trust what xev says, I'd rather trust showkey -s because that doesn't need X running. My Numlock key, shifted with Fn, gives me 0x46 0xC6 each time I push it. That's 70, 198 in decimal. I see the same thing if I ctrl-alt-f2 and look at a raw console without X. That 70 should probably be 71 or 72 to be NumLock.
Code:
KeymapNotify event, serial 44, synthetic NO, window 0x0,
keys: 68 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PropertyNotify event, serial 44, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 75841993, state PropertyNewValue
PropertyNotify event, serial 45, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 75842108, state PropertyNewValue
PropertyNotify event, serial 45, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 75842162, state PropertyNewValue
KeyPress event, serial 45, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75848254, (-1276,-458), root:(463,398),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75848374, (-1276,-458), root:(463,398),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75858102, (-1276,-458), root:(463,398),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75858230, (-1276,-458), root:(463,398),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75898582, (-1276,-458), root:(463,398),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "
XmbLookupString gives 1 bytes: (1b) "
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75898702, (-1276,-458), root:(463,398),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75916213, (-1276,-458), root:(463,398),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75916325, (-1276,-458), root:(463,398),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75928365, (-1276,-458), root:(463,398),
state 0x0, keycode 76 (keysym 0xffc7, F10), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75928493, (-1276,-458), root:(463,398),
state 0x0, keycode 76 (keysym 0xffc7, F10), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75944221, (-1276,-458), root:(463,398),
state 0x0, keycode 95 (keysym 0xffc8, F11), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75944381, (-1276,-458), root:(463,398),
state 0x0, keycode 95 (keysym 0xffc8, F11), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75950637, (-1276,-458), root:(463,398),
state 0x0, keycode 96 (keysym 0xffc9, F12), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75950709, (-1276,-458), root:(463,398),
state 0x0, keycode 96 (keysym 0xffc9, F12), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75958869, (-1276,-458), root:(463,398),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "
XmbLookupString gives 1 bytes: (1b) "
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75958957, (-1276,-458), root:(463,398),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75965285, (-1276,-458), root:(463,398),
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 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75965397, (-1276,-458), root:(463,398),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75968045, (-1276,-458), root:(463,398),
state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75968173, (-1276,-458), root:(463,398),
state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75970533, (-1276,-458), root:(463,398),
state 0x10, keycode 127 (keysym 0xff13, Pause), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75970677, (-1276,-458), root:(463,398),
state 0x10, keycode 127 (keysym 0xff13, Pause), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75974109, (-1276,-458), root:(463,398),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 75974261, (-1276,-458), root:(463,398),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76023356, (-1276,-458), root:(463,398),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "
XmbLookupString gives 1 bytes: (1b) "
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76023452, (-1276,-458), root:(463,398),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76029892, (-1276,-458), root:(463,398),
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 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76030052, (-1276,-458), root:(463,398),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76032044, (-1276,-458), root:(463,398),
state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76032196, (-1276,-458), root:(463,398),
state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76033884, (-1276,-458), root:(463,398),
state 0x10, keycode 127 (keysym 0xff13, Pause), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76034100, (-1276,-458), root:(463,398),
state 0x10, keycode 127 (keysym 0xff13, Pause), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76035700, (-1276,-458), root:(463,398),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76035852, (-1276,-458), root:(463,398),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76038468, (-1276,-458), root:(463,398),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76038804, (-1276,-458), root:(463,398),
state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
XLookupString gives 1 bytes: (03) ""
XmbLookupString gives 1 bytes: (03) ""
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76038876, (-1276,-458), root:(463,398),
state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
XLookupString gives 1 bytes: (03) ""
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76039276, (-1276,-458), root:(463,398),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 48, synthetic NO, window 0x4e00001,
mode NotifyNormal, detail NotifyNonlinear
PropertyNotify event, serial 48, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 76049291, state PropertyNewValue
Terminated
root@pbp:/data/mp3/Pink_Floyd#
=======================================
KeymapNotify event, serial 43, synthetic NO, window 0x0,
keys: 68 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PropertyNotify event, serial 44, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 76621652, state PropertyNewValue
PropertyNotify event, serial 45, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 76621753, state PropertyNewValue
KeyPress event, serial 45, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76635623, (728,-67), root:(731,425),
state 0x0, keycode 76 (keysym 0xffc7, F10), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76635791, (728,-67), root:(731,425),
state 0x0, keycode 76 (keysym 0xffc7, F10), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76640839, (728,-67), root:(731,425),
state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76640959, (728,-67), root:(731,425),
state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 48, synthetic NO, window 0x4e00001,
mode NotifyNormal, detail NotifyNonlinear
PropertyNotify event, serial 48, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 76653986, state PropertyNewValue
Terminated
root@pbp:/data/mp3/Pink_Floyd#
===================================== again, just numlock
KeyPress event, serial 45, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76788156, (728,-80), root:(731,412),
state 0x0, keycode 76 (keysym 0xffc7, F10), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76788244, (728,-80), root:(731,412),
state 0x0, keycode 76 (keysym 0xffc7, F10), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76793821, (728,-80), root:(731,412),
state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x4e00001,
root 0x22b, subw 0x0, time 76793933, (728,-80), root:(731,412),
state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 48, synthetic NO, window 0x4e00001,
mode NotifyNormal, detail NotifyNonlinear
PropertyNotify event, serial 48, synthetic NO, window 0x4e00001,
atom 0x18d (_NET_WM_ICON_GEOMETRY), time 76801809, state PropertyNewValue
Terminated
The KeymapNotify with zeroes is a start of an xev run. When I press Fn by itself nothing gets logged in xev. This was all F9 to F12 except Esc between to mark run ends.
I think it's a matter of keymaps, because there are 3 levels at least. There's one set by locale (I'm using C.UTF-8), then one by "keyboard model" (I'm using "Generic 105key PC (int)") then a 3rd by "keyboard layout" (I'm using English (US)). Not Cherokee, dvorak, etc.
Using dpkg-reconfigure locales which brings up a Whiptail dialog box like when you install or like raspi-config gets you. I have a few Raspberry Pi computers too and Raspbian is mostly like Debian.
I think if you open up a PBP and write down the numbers on the back of the keyboard, then Google them you might be able to find a manufacturer's data sheet that will list raw hardware scan codes. I think I've seen them for other keyboards. I'm not sure I trust what xev says, I'd rather trust showkey -s because that doesn't need X running. My Numlock key, shifted with Fn, gives me 0x46 0xC6 each time I push it. That's 70, 198 in decimal. I see the same thing if I ctrl-alt-f2 and look at a raw console without X. That 70 should probably be 71 or 72 to be NumLock.