Where should my custom setxkbmap us_programmer goto to make it persistent when I log into Ubuntu graphically and also from SSH?

  • Have you tried to add it to your input sources in Settings -> Keyboard ? Mar 20 at 13:55
  • is apprantly does not show up... i used github.com/eren/programmer-qwerty/blob/master/linux/…
    – Gabriel
    Mar 21 at 9:23
  • Well, apparently not if you didn't edit evdev.xml accordingly. But you may want to try to add the setxkbmap command to your ~/.profile file. Mar 21 at 10:09
  • 1
    OTOH it's not clear to me what it is you want to achieve. If you enable the file that way, only the first "basic" section is used. The rest of the file is unnecessary noise. I'd say that the GitHub page you linked to does not apply to a desktop with a modern graphical interface. Mar 21 at 10:19

1 Answer 1


If I would want to use that layout, this is how I would probably do it.

First add this variant to the bottom of /usr/share/X11/xkb/symbols/us:

partial alphanumeric_keys
xkb_symbols "programmer" {

    include "us(basic)"
    name[Group1] = "English (US, programmer)";

    key <AE01> {    [      exclam,  1   ]   };
    key <AE02> {    [          at,  2   ]   };
    key <AE03> {    [  numbersign,  3   ]   };
    key <AE04> {    [      dollar,  4   ]   };
    key <AE05> {    [     percent,  5   ]   };
    key <AE06> {    [ asciicircum,  6   ]   };
    key <AE07> {    [   ampersand,  7   ]   };
    key <AE08> {    [    asterisk,  8   ]   };
    key <AE09> {    [   parenleft,  9   ]   };
    key <AE10> {    [  parenright,  0   ]   };

Then add this entry to /usr/share/X11/xkb/rules/evdev.xml within the <variantList></variantList> of the us layout:

            <description>English (US, programmer)</description>

After next login I can then add the layout in Settings -> Keyboard and use it as any other keyboard layout.

enter image description here

  • Really strange, i tried everything, but it does not work. Reboot etc. Is there anything else needed, it just does not show up in the menu. I added it correctly to the xml.
    – Gabriel
    Mar 22 at 10:05
  • @Gabriel: There is nothing else AFAIK. I actually did it successfully on my machine. Where in the menu did you look? You should choose "English (United States)", and then it should be included in the sub menu. Mar 22 at 10:14
  • 1
    strange, it seems I had some issues with spaces not sure, however the thing was buggy, eventually it workes like you explained
    – Gabriel
    Apr 12 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.