I have a custom keyboard config. It worked like a charm on Fedora 34. I have just upgraded to Fedora 36 and reinstalled the keyboard layout.

The custom layout is picked up, except for the <SPCE> (space bar) key definition:

key <SPCE> { [ space, nobreakspace, underscore, U202F ] }; // ␣ (espace insécable) _ (espace insécable fin)

The concrete issue is that only a regular space is printed when pressing spacebar (i.e., the modifiers — Shift, Alt, and Alt Gr/Level 3 shift — aren't effective); instead of, notably, an underscore (_) when pressing Alt Gr+spacebar.

Yet at the same time, I can get Alt Gr to work with the other keys (i.e. Alt Gr+<AD01> does print | as expected). I have tried to move the key <SPCE> definition in an other position within the xkb_symbols {} block without success. I have also looked at other (embedded) keyboard definitions and can't seem to find that something has changed…

How to fix my /usr/share/X11/xkb/symbols/fr definition so that modifiers are applied to the spacebar?

1 Answer 1


I have fixed the issue by adding the type[group1] = "FOUR_LEVEL_SEMIALPHABETIC" modifier to the spacebar definition as follows:

key <SPCE> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ space, nobreakspace, underscore, U202F ] };

(Note that the no-break space (U+00A0) isn't working… but at least I got the underscore back!)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .