3

I am trying to provide a custom keyboard layout using the techniques outlined here: http://domwatson.codes/2014/11/who-needs-capslock-anyway-part-2.html.

In short, I create a new layout under /usr/share/X11/xkb/symbols/ and then edit /usr/share/X11/xkb/rules/evdev.xml to include the layout.

When I then go to select a keyboard layout, I expect my new layout to appear in list of layout choices, but it does not.

Is this a bug with the GUI tools that I may be able to work around by manually setting my layout? Or are keyboard layouts implemented differently and these xkb files ignored?

Any help appreciated.

| improve this question | | | | |
2

I think this is a problem with the GUI. Currently elementary has a hard coded list of keyboard settings that comes from the default xkb files, it will not look for new ones or reload the default file (evdev.xml). Maybe you will be able to switch to your layout on the command line by using setxkbmap your_layout.

Maybe it could be more clever about handling this sort of cases than having a hard coded list, but currently it hasn't been implemented.

| improve this answer | | | | |
  • This worked perfectly, thank you. To get my layout working, along with the key combinations I wanted to switch groups within the layout, I created a bash script to run on startup with: setxkbmap my_layout -option 'shift:both_capslock_cancel,grp:caps_switch,grp_led:scroll'. Problem solved (though would be "nice" to have it all in the GUI). – dom_watson Aug 21 '15 at 15:36
1

I have just added my custom layout to the gui in elementary OS Loki.

To add my custom layout I do the following:

  1. edit existing xkb/symbols/ru file to add my layout there;
  2. edit evdev.xml file to add the appropriate variant there;
  3. edit evdev.lst file to add the appropriate variant there;
  4. edit base.xml file to add the appropriate variant there;
  5. edit base.lst file to add the appropriate variant there;

It seems, you don't do the steps #3,4,5.

Could you try it and report back?

EDIT:

  1. I've made some testing and ready to say, that the layout definetely appears in the GUI after editing evdev.xml AND evdev.lst.

  2. The appropriate variant seems to be: xkb_symbols "alpha_arrows" so one should add to evdev.lst the following line:

    alpha_arrows gb: Doms l33t layout

  3. Editing base.xml and base.lst seems to be redundant and unnecessary.

EDIT2: Additionally, there seems to be an error in the initial guide. One should add to the evdev.xml

<layout>
  <configItem>
    <name>alpha_arrows</name>
    <shortDescription>endom</shortDescription>
    <description>Dom's l33t layout</description>
    <languageList>
      <iso639Id>eng</iso639Id>
    </languageList>
  </configItem>
  <variantList />
</layout>

Screen of Custom Layout in the GUI

| improve this answer | | | | |

Your Answer

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

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