Control: found -1 1.223
Control: retitle -1 console-setup: disagrees with xorg on what X keys exist 
("WARNING: Unknown X keysym")

On Wed, Jul 25, 2018 at 03:00:03PM +0800, Ben Hutchings wrote:
> This is not a bug in initramfs-tools.  The warning comes from console-
> setup and is triggered by a change to the German keyboard layout
Indeed, on my system (I use a customised German layout, attached)
console-setup.service fails, even though the layout works under X.org:
  $ systemctl status console-setup.service
  × console-setup.service - Set console font and keymap
       Loaded: loaded (/lib/systemd/system/console-setup.service; enabled; 
preset: enabled)
       Active: failed (Result: exit-code) since Thu 2023-11-16 06:35:40 CET; 
16h ago
     Main PID: 2308 (code=exited, status=1/FAILURE)
          CPU: 158ms
  
  Nov 16 06:35:40 rozbian systemd[1]: Starting console-setup.service - Set 
console font and keymap...
  Nov 16 06:35:40 rozbian console-setup.sh[2351]: WARNING: Unknown X keysym 
"Ssharp"
  Nov 16 06:35:40 rozbian console-setup.sh[2351]: WARNING: Unknown X keysym 
"Ssharp"
  Nov 16 06:35:40 rozbian console-setup.sh[2316]: /usr/bin/setupcon: 999: 
cannot open /tmp/tmpkbd.OzTB9k: No such file
  Nov 16 06:35:40 rozbian systemd[1]: console-setup.service: Main process 
exited, code=exited, status=1/FAILURE
  Nov 16 06:35:40 rozbian systemd[1]: console-setup.service: Failed with result 
'exit-code'.
  Nov 16 06:35:40 rozbian systemd[1]: Failed to start console-setup.service - 
Set console font and keymap.

The interesting bit is
  $ grep sharp /usr/share/X11/xkb/symbols/de2
      key <AC02>  { [         s,          S,       ssharp,       Ssharp ] };
i.e. M-s -> ß and M-S -> ẞ, which correspond as expected to
  $ ą
  ß     (U+00DF, UTF-8 c3 9f    ): LATIN SMALL LETTER SHARP S
  ẞ     (U+1E9E, UTF-8 e1 ba 9e ): LATIN CAPITAL LETTER SHARP S

So Ssharp definitely exists but isn't in <X11/keysymdef.h>:
  $ grep -i sharp /usr/include/X11/keysymdef.h
  #define XK_ssharp                        0x00df  /* U+00DF LATIN SMALL LETTER 
SHARP S */
  #define XK_musicalsharp                  0x0af5  /* U+266F MUSIC SHARP SIGN */
or, indeed, anywhere?
  $ grep -ri ssharp /usr/include/
  /usr/include/gtk-3.0/gdk/gdkkeysyms-compat.h:#define GDK_ssharp 0x0df
  /usr/include/gtk-3.0/gdk/gdkkeysyms.h:#define GDK_KEY_ssharp 0x0df
  /usr/include/xkbcommon/xkbcommon-keysyms.h:#define XKB_KEY_ssharp             
           0x00df  /* U+00DF LATIN SMALL LETTER SHARP S */
  /usr/include/gtk-4.0/gdk/gdkkeysyms.h:#define GDK_KEY_ssharp 0x0df
  /usr/include/X11/keysymdef.h:#define XK_ssharp                        0x00df  
/* U+00DF LATIN SMALL LETTER SHARP S */

xev says
  KeyPress event, serial 35, synthetic NO, window 0x7800001,
      root 0x6c6, subw 0x0, time 59127073, (215,-26), root:(966,406),
      state 0x2080, keycode 39 (keysym 0xdf, ssharp), same_screen YES,
      XKeysymToKeycode returns keycode: 28
      XLookupString gives 2 bytes: (c3 9f) "ß"
      XmbLookupString gives 2 bytes: (c3 9f) "ß"
      XFilterEvent returns: False
  KeyPress event, serial 35, synthetic NO, window 0x7800001,
      root 0x6c6, subw 0x0, time 59129097, (215,-26), root:(966,406),
      state 0x2081, keycode 39 (keysym 0x1001e9e, U1E9E), same_screen YES,
      XLookupString gives 3 bytes: (e1 ba 9e) "ẞ"
      XmbLookupString gives 3 bytes: (e1 ba 9e) "ẞ"
      XFilterEvent returns: False

So whatever the source of truth w.r.t. keys xinput-or-whatever uses,
console-setup probably needs to use as well, or not error after warnings.

~ roz
default partial alphanumeric_keys
xkb_symbols "basic" {

    // Visualisation and description: http://podziemie.net/xkb/pl
    // Contact: Michał Górny <zrchos+freedesk...@gmail.com>

    include "latin"

    name[Group1]="Niemiecki";

    key <TLDE>  { [     grave, asciitilde,      notsign,    logicalor ] };
    key <AE01>  { [         1,     exclam,     notequal,   exclamdown ] };
    key <AE02>  { [         2,         at,  twosuperior, questiondown ] };
    key <AE04>  { [         4,     dollar,         cent,   onequarter ] };
    key <AE05>  { [         5,    percent,     EuroSign,        U2030 ] };
    key <AE06>  { [         6, asciicircum,     onehalf,   logicaland ] };
    key <AE07>  { [         7,  ampersand,      section,        U2248 ] };
    key <AE08>  { [         8,   asterisk, periodcentered, threequarters ] };
    key <AE09>  { [         9,  parenleft, guillemotleft,   plusminus ] };
    key <AE10>  { [         0, parenright, guillemotright,     degree ] };
    key <AE11>  { [     minus, underscore,       endash,       emdash ] };

    key <AD01>  { [         q,          Q,     Greek_pi,  Greek_OMEGA ] };
    key <AD02>  { [         w,          W,           oe,           OE ] };
    key <AD03>  { [         e,          E,      eogonek,      Eogonek ] };
    key <AD04>  { [         r,          R,    copyright,   registered ] };
    key <AD05>  { [         t,          T,       ssharp,    trademark ] };
    key <AD07>  { [         u,          U,   udiaeresis,   Udiaeresis ] };
    key <AD08>  { [         i,          I,   rightarrow,        U2194 ] };
    key <AD09>  { [         o,          O,   odiaeresis,   Odiaeresis ] };

    key <AC01>  { [         a,          A,   adiaeresis,   Adiaeresis ] };
    key <AC02>  { [         s,          S,       ssharp,       Ssharp ] };
    key <AC04>  { [         f,          F,           ae,           AE ] };
    key <AC06>  { [         h,          H, rightsinglequotemark, U2022 ] };
    key <AC07>  { [         j,          J,        schwa,        SCHWA ] };
    key <AC08>  { [         k,          K,     ellipsis,  dead_stroke ] };

    key <AB01>  { [         z,          Z,    zabovedot,    Zabovedot ] };
    key <AB02>  { [         x,          X,       zacute,       Zacute ] };
    key <AB03>  { [         c,          C,       cacute,       Cacute ] };
    key <AB04>  { [         v,          V, doublelowquotemark, 
leftsinglequotemark ] };
    key <AB05>  { [         b,          B, rightdoublequotemark, 
leftdoublequotemark ] };
    key <AB06>  { [         n,          N,       nacute,       Nacute ] };
    key <AB07>  { [         m,          M,           mu,     infinity ] };
    key <AB08>  { [     comma,       less, lessthanequal,    multiply ] };
    key <AB09>  { [    period,    greater, greaterthanequal, division ] };

    key <SPCE>  { [     space,      space, nobreakspace, nobreakspace ] };

    include "kpdl(comma)"

    include "level3(ralt_switch)"
};

Attachment: signature.asc
Description: PGP signature

Reply via email to