I want to create and set a custom keyboard layout with setxkbmap. I created a file in ~/.xkb/prog with this content:
partial default alphanumeric_keys
xkb_symbols "basic" {
include "latin(type4)"
name[Group1]="es for developers";
key <AE01> {[ 1, exclam, exclamdown, bar ]};
key <AD03> {[ e, E, EuroSign, sterling ]};
key <AB06> {[ n, N, ntilde, Ntilde ]};
key <AB07> {[ m, M, mu, mu ]};
key <AB10> {[ slash, question, questiondown, dead_hook ]};
include "level3(ralt_switch)"
};
And I tried to load it with setxkbmap -I$HOME/.xkb "prog", but I get a ‘Error loading new keyboard description’
I also tried it with setxkbmap -I$HOME/.xkb "prog" -print | xkbcomp -I$HOME/.xkb - $DISPLAY, but I get this error: ‘Can’t find file “prog” for symbols include’
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Try that last one, i.e.:
% setxkbmap -I ~/.xkb prog -print | xkbcomp -I$HOME/.xkb - $DISPLAY
But put your layout in ~/.xkb/symbols/prog (note the symbols subdirectory).
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0