Spontaneous numlock - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112) +--- Thread: Spontaneous numlock (/showthread.php?tid=13576) |
RE: Spontaneous numlock - wdt - 04-14-2021 If you have systemsettings5.......... input devices ->keyboard -> hardware tab -> keyboard model For me,, Generic | Generic 86-key PC layout tab us English (US) us RE: Spontaneous numlock - ab1jx - 04-14-2021 Probably everybody has localectl since it's command line, My Debian and Manjaro both have it without installing anything special. In Debian I see: Code: System Locale: LANG=C.UTF-8 Try apropos keyboard. or setxkbmap -query Linux has been dealing with keymaps since there was Linux. And some documentation is outdated too. RE: Spontaneous numlock - ab1jx - 04-15-2021 I think we want to look at scancodes to start, not the keycodes they're mapped to. A scancode involves a row and column on the physical keyboard. https://en.wikipedia.org/wiki/Keyboard_layout AKA keysyms showkey -s will give scancodes. dumpkeys, loadkeys, keymaps, xmodmap are all involved. showkey -s tells me that Esc has a scancode of 0x01 which I believe because of the rows and columns thing. But like most Linux documentation it may be 20 years old and wrong. Yup, the showkey man page is dated 1 Feb 1998. Some things and be old and still correct. Somewhere else it mentions some scenario where when you ask for scancodes they're generated from keycodes by applying an inverse mapping. RE: Spontaneous numlock - KC9UDX - 04-15-2021 I suspect the keyboard doesn't send scan codes over USB. I could be wrong. But what I'm thinking is that if it did, you'd get one for Fn and the like. RE: Spontaneous numlock - ab1jx - 04-15-2021 Yes, the modifier keys like shifts have their own scancodes. I got this with dumpkeys -f while on my PBP in Debian. But I'm not sure it's not just dumping some theoretical table in ROM instead of reading through the USB. The full 127 maps went over the 65k limit for a post so I only kept 3. Looks the same when I do it on a Raspberrry Pi with a 101-key USB keyboard. Code: keymaps 0-127 (only 3 here) Seems like I've seen, for some keyboards, the scan codes the keyboard can output in a 2d array printed on a data sheet. It's rows and columns, when you push a key a switch there connects the row wires with the column wires at that point. It would probably be in a manufacturer's datasheet, thought I had one for this. The left and right shifts, ctrl, alt are different from each other. Software can tell which shift key you use. OK, shift is 42 and 54 here. RE: Spontaneous numlock - ab1jx - 04-15-2021 In Debian we can just do: dpkg-reconfigure keyboard-configuration if you can remember that. It's what raspi-config calls on a Raspberry Pi, but they borrowed it from Debian. Nothing in there about how many keys a keyboard has, I'm set to a 105 key one which is probably why my numlock doesn't work, it's on the wrong keycode. It asks for numbers of keys or brand and model, then in the 2nd step it asks for country. Screenshot image: https://imgur.com/gallery/qPcs0jp Ah, /usr/share/console-setup/KeyboardNames.pl. And it comes down to the way it's been done since 1995. http://xfree86.org/current/XKBproto.pdf It's not that hard to make a custom layout I think but first there's this 155 page PDF to at least skim. But wait, you don't have to do it by hand, there's xkeycaps (in the debs). https://imgur.com/gallery/4oCkVAA Looks like the Athena widget set I think. Right-click in the top of a scrollbar to scroll up. Click in the bottom to scroll down. The scrollbars are why I like Motif better. RE: Spontaneous numlock - KC9UDX - 04-15-2021 Try it with Fn. I suspect it doesn't report at all for Fn and most keys at the same time as Fn. RE: Spontaneous numlock - ab1jx - 04-15-2021 (04-15-2021, 08:19 PM)KC9UDX Wrote: Try it with Fn. I suspect it doesn't report at all for Fn and most keys at the same time as Fn.I have been. If it's in blue I use Fn. My NumLock is on the Print Screen and Pause buttons for some reason. Which are both keycode 69 by showkey. NumLock shows as 70. Using Fn. I can do showkey -s and get scancodes instead but each key shows 2 numbers, one for press and one for release I think. My numlock key gets 0x46 and 0x66. I thought I had better specs on this keyboard. RE: Spontaneous numlock - KC9UDX - 04-15-2021 What I'm getting at though I'd that you're not seeing hardware scan values. Else a key with Fn would be the same code as if you pressed it without Fn, and Fn would report as a separate key, the way the other modifier keys do. RE: Spontaneous numlock - ab1jx - 04-16-2021 I guess you're right. Fn by itself doesn't register. I was working along the top row keys and something killed my mouse cursor. Letting it sit off and using a phone. |