0

I am attempting to install a custom symbols file in my keyboard mapping in XKB, as found here. I would like to overwrite how the J key is handled (the first step in emulating a numpad, but for now I am simply applying the same mapping as found in the us symbols file). However, at the step where I load the file using xkbcomp, I get an error. Please find the error state and file contents below:

The map, which was created by modifying the output of setxkbmap -print, adding "+altkeypad_symbols(altkeypad)" to the end of the xkb_symbols include statement.

~$ cat .xkb/altkeypad_map 
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+us:2+inet(evdev)+altkeypad_symbols(altkeypad)"   };
    xkb_geometry  { include "pc(pc105)" };
};

The custom symbols file, a simple toy case of "remapping" the J key to its normal function.

~$ cat .xkb/symbols/altkeypad_symbols 
// Emulate the keypad using {j k l u i o 7 8 9} as KP_{1 2 3 4 5 6 7 8 9}

default partial alphanumeric_keys modifier_keys
xkb_symbols "altkeypad" {
    key <AC07> {        [         j,    J               ]       };
}

Attempting to install the new map, yielding an error, made increasingly odd given the fact that the symbol "J" appears on line 5 of the file, not line 7.

~$ xkbcomp -I$HOME/.xkb $HOME/.xkb/altkeypad_map $DISPLAY
syntax error: line 7 of altkeypad_symbols
last scanned symbol is: J
Error:            Error interpreting include file "altkeypad_symbols"
                  Exiting
                  Abandoning symbols file "(null)"
Error:            success in unknown
                  Couldn't write keyboard description to :0

As far as I know, I've very closely matched the syntax of other custom symbols mapping. Any help resolving the error would be greatly appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.