1

In a start to understand xkb as a preparation to create my own personal keyboard layout, I created an xkb config file. This is (a representative part of the start ofstrong text) my X keyboard configuration file:

xkb_keymap {
        xkb_keycodes "de|ru" {
                minimum = 8;
                maximum = 255;

[...]
                <F11>         =  95; // <FK11>
                <F12>         =  96; // <FK12>
//              <SYSRQ>       = 107; // <PRSC>
//              <SCROLL_LOCK> =  78; // <SCLK>
//              <PAUSE>       = 127; // <PAUS>

//              <CIRCUMFLEX>  =  49; // <HZTG>, <TLDE>
                <1>           =  10; // <AE01>
                <2>           =  11; // <AE02>
[...]

Now, I try to actually use it on my secondary keyboard, but when running the command xkbcomp -i 12 $FILE $DISPLAY I get this errors:

syntax error: line $LINE of $FILE
last scanned symbol is: $SYMBOL
Errors encountered in $FILE; not compiled.

With SYMBOL being any of SYSRQ, SCROLL_LOCK, PAUSE or CIRCUMFLEX (the list goes on later in unpasted parts). When I comment out those lines like shown here, xkbcomp just fails on later problems of the same kind. So why do I get a syntax error on SYSRQ but not on ESC or F12? The lines all are syntactically identical. Are there any reserved names? Or are the names I can use actually predetermined? Where can I find any useful documentation on this? (I already consulted the manpages and Google, came up with incomplete and contradictionary tutorials with don't even reveal any idea why I could get this kind of errors.)

1
  • Have you tried ckbcomp? I found it via apropos xkb ... It seems to be related to the lot, in particular to setxkbmap. Commented Feb 7, 2023 at 21:05

1 Answer 1

2

The closest to a description I have is from The X Keyboard Extension: Protocol Specification:

Each key has a four-byte symbolic name. The key name links keys with similar functions or in similar positions on keyboards that report different scan codes. Key aliases allow the keyboard layout designer to assign multiple names to a single key, to make it easier to refer to keys using either their position or their "function."

The names are often just positions, like <AB02> meaning row B key 2 from the bottom left, as in the picture in An Unreliable Guide to XKB Configuration section Key Codes (PDF version).

You must log in to answer this question.

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