You are not logged in.

#1 2023-06-24 18:19:35

zooky
Member
Registered: 2013-01-27
Posts: 20

[Solved] Custom xkb layout stopped working, modifiers not recognized

Hi,

recently my xkb layout has stopped working properly  (I guess after last update but not sure what the culprit could be). I use a custom layout with key type EIGHT_EVEL_ALPHABETIC_LEVEL_FIVE_LOCK, with ALTGR and CAPS LOCK to access the different levels. Everything was working well before, and now only the standard keys and the Shift keys work, the AltGR and Caps lock have no effect anymore (e.g. altgr+e produces just "e" while it is mapped to something else in my symbols file). I have no error in the terminal when loading the layout with setxkbmap.

The only error of /var/log/Xorg.0.log that that could be relevant (not sure what it means, indeed the file does not exist but should it? no idea if I already had this error before or not).

[  2850.384] (EE) Error loading keymap /var/lib/xkb/server-0.xkm


Result of xmodmap -pm:   

xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock     
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_L (0xcc),  Meta_L (0xcd)
mod2        Num_Lock (0x4d),  BadKey (0xcf)
mod3        ISO_Level5_Shift (0xcb)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce)
mod5        ISO_Level3_Shift (0x5c)


xev event when I press ALT R:

KeyPress event, serial 34, synthetic NO, window 0x3400001,
    root 0x735, subw 0x0, time 13180923, (448,-350), root:(452,1666),
    state 0x0, keycode 108 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,


xev event when I press CAPS LOCK:

KeyPress event, serial 28, synthetic NO, window 0x3400001,
    root 0x735, subw 0x0, time 13224806, (1235,-220), root:(1239,1796),
    state 0x0, keycode 66 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,

Any ideas of where it could come from?

Last edited by zooky (2023-06-24 21:39:38)

Offline

#2 2023-06-24 18:46:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,687

Re: [Solved] Custom xkb layout stopped working, modifiers not recognized

What does xev report for altgr+e ?

[  2850.384] (EE) Error loading keymap /var/lib/xkb/server-0.xkm

If that's in response to a valid attempt to set the layout then it matters, yet.
Post the custom layout as well as the exactl, full and complete command to set it.

Offline

#3 2023-06-24 20:51:14

zooky
Member
Registered: 2013-01-27
Posts: 20

Re: [Solved] Custom xkb layout stopped working, modifiers not recognized

Thanks for the answer, how should I interpret the error message about server-0.xkm? This file should exist?

Here is the content of /etc/X11/xorg.conf.d/00-keyboard.conf:

Section "InputClass"
	Identifier "system-keyboard"
	MatchIsKeyboard "on"
	Option "XkbLayout" "custom,fr"
	Option "XkbModel" "pc105"
	Option "XkbVariant" "neobepoforty,latin9"
	Option "XkbOptions" "grp:ctrls_toggle"
EndSection

and I also tried explicitly setting the layout with "setxkbmap -layout custom -variant neobepoforty".

Here is what xev reports when pressing t, releasing t, pressing and holding AltGr, pressing t:

KeyPress event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4776340, (747,-468), root:(751,1864),
    state 0x0, keycode 44 (keysym 0x74, t), same_screen YES,
    XLookupString gives 1 bytes: (74) "t"
    XmbLookupString gives 1 bytes: (74) "t"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4776422, (747,-468), root:(751,1864),
    state 0x0, keycode 44 (keysym 0x74, t), same_screen YES,
    XLookupString gives 1 bytes: (74) "t"
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4777866, (747,-468), root:(751,1864),
    state 0x0, keycode 108 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 94
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4778241, (747,-468), root:(751,1864),
    state 0x20, keycode 44 (keysym 0x74, t), same_screen YES,
    XLookupString gives 1 bytes: (74) "t"
    XmbLookupString gives 1 bytes: (74) "t"
    XFilterEvent returns: False

and for reference the same when using an azerty layout:
   

KeyPress event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4705266, (554,-410), root:(558,1922),
    state 0x4000, keycode 44 (keysym 0x6a, j), same_screen YES,
    XKeysymToKeycode returns keycode: 33
    XLookupString gives 1 bytes: (6a) "j"
    XmbLookupString gives 1 bytes: (6a) "j"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4705388, (554,-410), root:(558,1922),
    state 0x4000, keycode 44 (keysym 0x6a, j), same_screen YES,
    XKeysymToKeycode returns keycode: 33
    XLookupString gives 1 bytes: (6a) "j"
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4706971, (554,-410), root:(558,1922),
    state 0x4000, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 51
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1c00001,
    root 0x735, subw 0x0, time 4707453, (554,-410), root:(558,1922),
    state 0x4080, keycode 44 (keysym 0xdb, Ucircumflex), same_screen YES,
    XLookupString gives 2 bytes: (c3 9b) "Û"
    XmbLookupString gives 2 bytes: (c3 9b) "Û"
    XFilterEvent returns: False

Here is the layout in xkb/symbols/custom:

partial alphanumeric_keys modifier_keys keypad_keys
xkb_symbols "neobepoforty_base" {

    key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";

    // normal / SHIFT / MATH / MATH+SHIFT / ALT / ALT+SHIFT / ALT+MATH / ALT+MATH+SHIFT

    // First row
    key <TLDE> { [        NoSymbol,   numbersign, NoSymbol, NoSymbol,       endash,       paragraph, NoSymbol, NoSymbol ] }; 
    key <AE01> { [        codedbl,            1,    U2081,    U00B9,     emdash,doublelowcodemark, NoSymbol, NoSymbol ] };
    key <AE02> { [   guillemotleft,            2,    U2082,    U00B2,      less,leftdoublecodemark,    U2282, NoSymbol ] };
    key <AE03> { [  guillemotright,            3,    U2083,    U00B3,  greater,rightdoublecodemark, NoSymbol, NoSymbol ] };
    key <AE04> { [       parenleft,            4,    U226A,    U2329,  bracketleft,   lessthanequal,    U2286, NoSymbol ] };
    key <AE05> { [      parenright,            5,    U226B,    U232A, bracketright,greaterthanequal, NoSymbol, NoSymbol ] };
    key <AE06> { [              at,            6, 	 U27E6, NoSymbol,  asciicircum,        NoSymbol, NoSymbol, NoSymbol ] };
    key <AE07> { [            plus,            7, 	 U27E7, NoSymbol,    plusminus,         notsign, NoSymbol, NoSymbol ] };
    key <AE08> { [           minus,            8,    U221E, NoSymbol,        U2212,      onequarter, NoSymbol, NoSymbol ] };
    key <AE09> { [           slash,            9, NoSymbol, NoSymbol,     division,         onehalf, NoSymbol, NoSymbol ] };
    key <AE10> { [        asterisk,            0,    U2080,   U2070,     multiply,   threequarters,    U2205, NoSymbol ] };
    key <AE11> { [           equal,       degree,    U2248, NoSymbol,     notequal,         minutes, NoSymbol, NoSymbol ] };
    key <AE12> { [         percent,        grave, NoSymbol, NoSymbol,        U2030,         seconds, NoSymbol, NoSymbol ] };

    // Second row
    key <AD01> { [          z,       Z,  	 bar,     U2016,      dead_acute,       EuroSign, 	 U03B6, NoSymbol ] }; 
    key <AD02> { [          w,       W, codedbl, U03A9,    dollar,  doublelowcodemark, U03C9, NoSymbol ] }; 
    key <AD03> { [               p,            P,    ampersand,	   U03A0,     braceleft,         leftdoublecodemark, 	 U03C0, NoSymbol ] }; 
    key <AD04> { [               o,            O,    U2218,   U0153,    braceright,      rightdoublecodemark,    U03C4, NoSymbol ] }; 
    key <AD05> { [      egrave,       NoSymbol,      U2203, NoSymbol,    dead_grave,          U20AC, U03B7, NoSymbol ] }; 
    key <AD06> { [ dead_circumflex,       exclam,    U21D4, NoSymbol,    exclamdown,        NoSymbol, NoSymbol, NoSymbol ] }; 
    key <AD07> { [               v,            V,    NoSymbol,     U03A8,    7,        NoSymbol, U03C8, NoSymbol ] }; 
    key <AD08> { [               d,            D,    BackSpace, U0394,           8,           U00B0,   U03B4,   NoSymbol ] }; 
    key <AD09> { [               l,            L,     Delete,     U039B,   9,        U2113, U03BB, NoSymbol ] }; 
    key <AD10> { [               j,            J,    U221E, NoSymbol,         asterisk,           multiply, NoSymbol, NoSymbol ] }; 
	key <AD11> { [              b,            B,    U222B,  NoSymbol,        plus,           plusminus, U03B2, NoSymbol ] }; 
    key <AD12> { [  dead_caron,            U2665,    NoSymbol,     NoSymbol,    dead_breve,        NoSymbol, NoSymbol, NoSymbol ] }; 

    // Third row
    key <AC01> { [               a,            A, 	 at,   U00E6,         agrave,         Agrave,   U03B1,  NoSymbol ] }; 
    key <AC02> { [               u,            U,    U222A,     U2229,         dead_diaeresis,         Ugrave, NoSymbol, NoSymbol ] }; 
    key <AC03> { [               i,            I,    bracketleft,    U220A, parenleft,  guillemotleft, U03B9, NoSymbol ] }; 
    key <AC04> { [               e,            E,    bracketright,    U21D4,      parenright, guillemotright,   U03B5, NoSymbol ] }; 
    key <AC05> { [           comma,    semicolon, emdash, NoSymbol, minus, endash, NoSymbol, NoSymbol ] }; 
    key <AC06> { [               c,            C,    Left,    U2102,       ccedilla,       Ccedilla,    U03C7, NoSymbol ] };
    key <AC07> { [               t,            T,    Down,     U0398,         4,       U1D40,    U03B8, NoSymbol ] }; 
    key <AC08> { [               s,            S,    Up,    U03A3,         5,          U1E9E,   U03C3, NoSymbol ] }; 
    key <AC09> { [               r,            R,    Right,    U211D,     6,      U2192,  U03C1, NoSymbol ] }; 
    key <AC10> { [               n,            N,     Tab,   U2207,     slash,		U00F7, U03BD, NoSymbol ] };
    key <AC11> { [               m,            M,    U2248, NoSymbol,    equal,      notequal, U03BC, NoSymbol ] }; 
    key <BKSL> { [        ccedilla,     Ccedilla, ssharp, U1E9E,   dead_cedilla,dead_belowcomma, NoSymbol, NoSymbol ] }; 

    // Fourth row
    key <AB01> { [               x,           X,  U2020, U039E,       bar,     U2016, U03BE, NoSymbol ] }; 
    key <AB02> { [           y,            Y,    U2286, U226A,  less,lessthanequal, U227C, NoSymbol ] }; 
    key <AB03> { [          eacute,       Eacute,    U03BE,    U039E,greater,greaterthanequal,    U00D7, NoSymbol ] }; 
    key <AB04> { [          period,        colon, U220A, NoSymbol,       ellipsis, periodcentered, NoSymbol, NoSymbol ] }; 
    key <AB05> { [               k,            K, U03BA,  	U2096,    asciitilde,	    NoSymbol, U03BA, NoSymbol ] }; 
    key <AB06> { [      apostrophe,     question,    U00BD, NoSymbol,   0,      questiondown, U2E2E, NoSymbol ] }; 
    key <AB07> { [               q,            Q, numbersign, NoSymbol, 		1,  U27C2, NoSymbol, NoSymbol ] };
    key <AB08> { [               g,            G, 	 NoSymbol,    U0393,     2, U221D, 	    U03B3, NoSymbol ] }; 
    key <AB09> { [               h,            H, percent, NoSymbol,     3,   doubledagger, NoSymbol, NoSymbol ] };
    key <AB10> { [               f,            F,    U03C6,    U03A6,  U2200,    NoSymbol,    U03D5, NoSymbol ] }; 
    key <SPCE> { [           space,  nobreakspace,  backslash, NoSymbol,     underscore,          U202F, NoSymbol, NoSymbol ] }; 
};

partial alphanumeric_keys modifier_keys keypad_keys
xkb_symbols "neobepoforty" {
    include "custom(neobepoforty_base)"
    name[Group1]= "French (NeoBepoForty)";
	include "level3(caps_switch)"
    include "level3(bksl_switch)"
    include "level5(lsgt_switch_lock)"
    include "level5(ralt_switch_lock)"
};

Last edited by zooky (2023-06-24 21:31:03)

Offline

#4 2023-06-24 21:10:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,687

Re: [Solved] Custom xkb layout stopped working, modifiers not recognized

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

This file should exist?

No, it's a temporary helper, but the error indicates that you're asking for a lyout/variant that doesn't exist or the layout file is buggy.
Does the recent, suspcious update include https://archlinux.org/packages/extra/an … rd-config/ ?

Offline

#5 2023-06-24 21:26:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,687

Re: [Solved] Custom xkb layout stopped working, modifiers not recognized

- key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
+ key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL_FIVE_LOCK";

Offline

#6 2023-06-24 21:38:56

zooky
Member
Registered: 2013-01-27
Posts: 20

Re: [Solved] Custom xkb layout stopped working, modifiers not recognized

Thank you very much, xkeyboard-config 2.39-1 was indeed the problem, downgrading resolved the problem. Now the suggestion in your second message does not work with 2.39-1 but it does with the following:

- key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
+ key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";

Offline

Board footer

Powered by FluxBB