Spontaneous numlock
#57
Having more fun, in /etc/default (in Debian anyway) are files keyboard and locale among others.  I changed my locale to en_GB.UTF-8 as a test but in the keyboard file XKBLAYOUT is still "us".  I thought those were linked.  At one point I had a GB layout and the # key printed the Pounds Sterling symbol.  XKBVARIANT and XKBOPTIONS are both empty ("").  But XKBMODEL is pc105, so that's where that comes from.  There are 78 keys, not 105.

Try apropos keyboard.  There's an xkbprint (with a man page) which is supposed to print the layout for any compiled .xkm file.  But locate doesn't find any.  You can enable symbols (or codes?).  Man page from 1998 though.   This stuff has been around for 40 years but much has been gutted.

There's xkbcomp which is a compiler that makes .xkm files from .xkb.  /usr/share/X11/xkb might have some, but no, there are none.  Obsolete I guess.

In Debian xev is in a package called x11-utils.  There's another, x11-xkb-utils hat has xkbprint, also xkbwatch which lights up on modifier keys.

Keycodes are supposed to be changeable, scancodes shouldn't be, they should come from the hardware.  They get processed through the mapping and become keycodes.  Except I've also seen something about sometimes the mapping provides scancodes by working backwards.  I've got to open this thing up to fix the hinge sometime soon.  Usually there are rows of wires going one way and columns of wires going the other, when you press a key it connects a row to a column, that should give a scancode.

Like this: https://www.dribin.org/dave/keyboard/one_html/  What's wired isn't going to be changeable by software.

One of my first computers was an Interact 8080, which had really cheap keys that acted up after a month or so. So I got this industrial grade surplus keyboard and hooked it up on a big fat cable. Painted the keycaps white, lettered them with ink, put varnish over them. I learned how keyboards work.

Code:
From man 7 X:

KEYBOARDS
       The X keyboard model is broken into two layers:  server-specific  codes
       (called  keycodes)  which represent the physical keys, and server-inde‐
       pendent symbols (called keysyms) which represent the letters  or  words
       that  appear  on  the keys.  Two tables are kept in the server for con‐
       verting keycodes to keysyms:

       modifier list
               Some keys (such as Shift, Control, and Caps Lock) are known  as
               modifier  and are used to select different symbols that are at‐
               tached to a single key (such as Shift-a generates a capital  A,
               and  Control-l  generates  a control character ^L).  The server
               keeps a list of keycodes corresponding to the various  modifier
               keys.  Whenever a key is pressed or released, the server gener‐
               ates an event that contains the keycode of the indicated key as
               well  as  a  mask that specifies which of the modifier keys are
               currently pressed.  Most servers set up this list to  initially
               contain  the various shift, control, and shift lock keys on the
               keyboard.

       keymap table
               Applications translate event keycodes and modifier  masks  into
               keysyms  using  a  keysym table which contains one row for each
               keycode and one column for various modifier states.  This table
               is initialized by the server to correspond to normal typewriter
               conventions.  The exact semantics of how the  table  is  inter‐
               preted  to  produce  keysyms depends on the particular program,
               libraries, and language input method used,  but  the  following
               conventions  for  the first four keysyms in each row are gener‐
               ally adhered to:

       The first four elements of the  list  are  split  into  two  groups  of
       keysyms.   Group  1 contains the first and second keysyms; Group 2 con‐
       tains the third and fourth keysyms.  Within each group,  if  the  first
       element  is alphabetic and the the second element is the special keysym
       NoSymbol, then the group is treated as equivalent to a group  in  which
       the first element is the lowercase letter and the second element is the
       uppercase letter.

       Switching between groups is controlled by the keysym named MODE SWITCH,
       by  attaching that keysym to some key and attaching that key to any one
       of the modifiers Mod1  through  Mod5.   This  modifier  is  called  the
       ``group  modifier.''   Group  1 is used when the group modifier is off,
       and Group 2 is used when the group modifier is on.

       Within a group, the modifier state determines which keysym to use.  The
       first  keysym  is  used when the Shift and Lock modifiers are off.  The
       second keysym is used when the Shift modifier is on, when the Lock mod‐
       ifier  is on and the second keysym is uppercase alphabetic, or when the
       Lock modifier is on and is interpreted as ShiftLock.   Otherwise,  when
       the  Lock  modifier  is on and is interpreted as CapsLock, the state of
       the Shift modifier is applied first to select a  keysym;  but  if  that
       keysym is lowercase alphabetic, then the corresponding uppercase keysym
       is used instead.
  Reply


Messages In This Thread
Spontaneous numlock - by ab1jx - 04-06-2021, 03:00 PM
RE: Spontaneous numlock - by KC9UDX - 04-06-2021, 04:15 PM
RE: Spontaneous numlock - by ab1jx - 04-06-2021, 04:35 PM
RE: Spontaneous numlock - by dsimic - 04-07-2021, 05:11 PM
RE: Spontaneous numlock - by ab1jx - 04-07-2021, 06:56 PM
RE: Spontaneous numlock - by dsimic - 04-07-2021, 07:27 PM
RE: Spontaneous numlock - by ab1jx - 04-10-2021, 01:29 PM
RE: Spontaneous numlock - by dsimic - 04-10-2021, 01:33 PM
RE: Spontaneous numlock - by ab1jx - 04-10-2021, 02:47 PM
RE: Spontaneous numlock - by dsimic - 04-10-2021, 03:11 PM
RE: Spontaneous numlock - by ab1jx - 04-10-2021, 03:53 PM
RE: Spontaneous numlock - by dsimic - 04-11-2021, 12:31 AM
RE: Spontaneous numlock - by ab1jx - 04-11-2021, 02:00 AM
RE: Spontaneous numlock - by dsimic - 04-11-2021, 02:34 AM
RE: Spontaneous numlock - by ab1jx - 04-11-2021, 06:39 AM
RE: Spontaneous numlock - by dsimic - 04-11-2021, 07:25 AM
RE: Spontaneous numlock - by ab1jx - 04-11-2021, 04:04 PM
RE: Spontaneous numlock - by dsimic - 04-11-2021, 11:10 PM
RE: Spontaneous numlock - by ab1jx - 04-12-2021, 02:00 AM
RE: Spontaneous numlock - by dsimic - 04-12-2021, 02:10 AM
RE: Spontaneous numlock - by ab1jx - 04-12-2021, 06:59 AM
RE: Spontaneous numlock - by dsimic - 04-12-2021, 08:11 AM
RE: Spontaneous numlock - by ab1jx - 04-12-2021, 09:40 AM
RE: Spontaneous numlock - by dsimic - 04-12-2021, 10:08 AM
RE: Spontaneous numlock - by wdt - 04-12-2021, 11:05 AM
RE: Spontaneous numlock - by dsimic - 04-12-2021, 12:10 PM
RE: Spontaneous numlock - by ab1jx - 04-13-2021, 05:25 AM
RE: Spontaneous numlock - by dsimic - 04-14-2021, 10:17 AM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 10:44 AM
RE: Spontaneous numlock - by dsimic - 04-14-2021, 11:04 AM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 12:24 PM
RE: Spontaneous numlock - by dsimic - 04-14-2021, 12:45 PM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 01:06 PM
RE: Spontaneous numlock - by dsimic - 04-14-2021, 01:24 PM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 01:53 PM
RE: Spontaneous numlock - by dsimic - 04-14-2021, 01:57 PM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 02:14 PM
RE: Spontaneous numlock - by KC9UDX - 04-14-2021, 04:09 PM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 05:40 PM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 07:55 PM
RE: Spontaneous numlock - by wdt - 04-14-2021, 09:02 PM
RE: Spontaneous numlock - by ab1jx - 04-14-2021, 10:26 PM
RE: Spontaneous numlock - by ab1jx - 04-15-2021, 06:44 AM
RE: Spontaneous numlock - by KC9UDX - 04-15-2021, 09:57 AM
RE: Spontaneous numlock - by ab1jx - 04-15-2021, 10:46 AM
RE: Spontaneous numlock - by ab1jx - 04-15-2021, 05:14 PM
RE: Spontaneous numlock - by KC9UDX - 04-15-2021, 08:19 PM
RE: Spontaneous numlock - by ab1jx - 04-15-2021, 08:46 PM
RE: Spontaneous numlock - by KC9UDX - 04-15-2021, 11:07 PM
RE: Spontaneous numlock - by ab1jx - 04-16-2021, 04:52 AM
RE: Spontaneous numlock - by KC9UDX - 04-16-2021, 07:36 AM
RE: Spontaneous numlock - by ab1jx - 04-16-2021, 08:30 AM
RE: Spontaneous numlock - by ab1jx - 04-16-2021, 07:44 PM
RE: Spontaneous numlock - by KC9UDX - 04-17-2021, 02:26 AM
RE: Spontaneous numlock - by ab1jx - 04-17-2021, 05:50 AM
RE: Spontaneous numlock - by KC9UDX - 04-17-2021, 02:57 PM
RE: Spontaneous numlock - by ab1jx - 04-17-2021, 07:49 PM
RE: Spontaneous numlock - by KC9UDX - 04-18-2021, 04:25 AM
RE: Spontaneous numlock - by ab1jx - 04-18-2021, 06:54 AM
RE: Spontaneous numlock - by KC9UDX - 04-18-2021, 01:15 PM
RE: Spontaneous numlock - by ab1jx - 04-18-2021, 01:59 PM
RE: Spontaneous numlock - by KC9UDX - 04-18-2021, 02:32 PM
RE: Spontaneous numlock - by ab1jx - 04-18-2021, 04:25 PM
RE: Spontaneous numlock - by KC9UDX - 04-18-2021, 05:02 PM
RE: Spontaneous numlock - by ab1jx - 04-18-2021, 05:42 PM
RE: Spontaneous numlock - by KC9UDX - 04-18-2021, 06:19 PM
RE: Spontaneous numlock - by ab1jx - 04-19-2021, 05:24 AM
RE: Spontaneous numlock - by KC9UDX - 04-19-2021, 06:50 AM
RE: Spontaneous numlock - by ab1jx - 04-19-2021, 07:48 AM
RE: Spontaneous numlock - by KC9UDX - 04-19-2021, 08:58 AM
RE: Spontaneous numlock - by ab1jx - 04-19-2021, 10:02 AM
RE: Spontaneous numlock - by ab1jx - 04-19-2021, 11:05 AM
RE: Spontaneous numlock - by KC9UDX - 04-19-2021, 04:35 PM
RE: Spontaneous numlock - by ab1jx - 04-19-2021, 05:24 PM
RE: Spontaneous numlock - by KC9UDX - 04-20-2021, 05:13 AM
RE: Spontaneous numlock - by ab1jx - 04-20-2021, 07:09 AM
RE: Spontaneous numlock - by dsimic - 04-20-2021, 08:22 AM
RE: Spontaneous numlock - by ab1jx - 04-20-2021, 08:59 AM
RE: Spontaneous numlock - by slyecho - 04-20-2021, 01:50 PM
RE: Spontaneous numlock - by ab1jx - 04-20-2021, 03:09 PM
RE: Spontaneous numlock - by dsimic - 04-20-2021, 03:18 PM
RE: Spontaneous numlock - by ab1jx - 04-20-2021, 11:21 PM
RE: Spontaneous numlock - by dsimic - 04-21-2021, 12:15 AM
RE: Spontaneous numlock - by ab1jx - 04-21-2021, 01:08 AM
RE: Spontaneous numlock - by KC9UDX - 04-21-2021, 01:09 AM
RE: Spontaneous numlock - by ab1jx - 04-21-2021, 02:07 AM
RE: Spontaneous numlock - by dsimic - 04-21-2021, 02:55 AM
RE: Spontaneous numlock - by ab1jx - 04-21-2021, 03:43 AM
RE: Spontaneous numlock - by KC9UDX - 04-21-2021, 04:49 AM
RE: Spontaneous numlock - by dsimic - 04-21-2021, 10:43 AM
RE: Spontaneous numlock - by ab1jx - 04-21-2021, 05:34 AM
RE: Spontaneous numlock - by ab1jx - 04-21-2021, 11:48 AM
RE: Spontaneous numlock - by dsimic - 04-21-2021, 11:53 AM
RE: Spontaneous numlock - by ab1jx - 04-21-2021, 02:18 PM
RE: Spontaneous numlock - by dsimic - 04-21-2021, 02:33 PM
RE: Spontaneous numlock - by KC9UDX - 04-21-2021, 04:36 PM
RE: Spontaneous numlock - by dsimic - 04-21-2021, 04:55 PM
RE: Spontaneous numlock - by KC9UDX - 04-22-2021, 12:05 AM
RE: Spontaneous numlock - by dsimic - 04-25-2021, 12:18 PM
RE: Spontaneous numlock - by ab1jx - 04-23-2021, 09:09 PM
RE: Spontaneous numlock - by KC9UDX - 04-24-2021, 05:23 AM
RE: Spontaneous numlock - by ab1jx - 04-24-2021, 07:05 AM
RE: Spontaneous numlock - by ab1jx - 04-24-2021, 06:57 PM
RE: Spontaneous numlock - by KC9UDX - 04-25-2021, 11:59 AM
RE: Spontaneous numlock - by ab1jx - 04-25-2021, 12:55 PM
RE: Spontaneous numlock - by dsimic - 04-25-2021, 01:26 PM
RE: Spontaneous numlock - by KC9UDX - 04-25-2021, 03:09 PM
RE: Spontaneous numlock - by ab1jx - 04-25-2021, 04:38 PM
RE: Spontaneous numlock - by dsimic - 04-25-2021, 05:39 PM
RE: Spontaneous numlock - by ab1jx - 04-25-2021, 07:16 PM
RE: Spontaneous numlock - by dsimic - 04-25-2021, 07:32 PM
RE: Spontaneous numlock - by ab1jx - 04-25-2021, 09:05 PM
RE: Spontaneous numlock - by dsimic - 04-25-2021, 09:22 PM
RE: Spontaneous numlock - by KC9UDX - 04-25-2021, 10:11 PM
RE: Spontaneous numlock - by ab1jx - 04-26-2021, 05:15 AM
RE: Spontaneous numlock - by KC9UDX - 04-26-2021, 05:44 PM
RE: Spontaneous numlock - by ab1jx - 04-26-2021, 08:00 PM
RE: Spontaneous numlock - by dsimic - 04-30-2021, 01:46 AM
RE: Spontaneous numlock - by ab1jx - 04-30-2021, 03:44 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)