Customizing XKB layout files has no effect on keyboard layouts

Bug #1486857 reported by Watson-dominic
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
elementary OS
New
Medium
Unassigned

Bug Description

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.

As a workaround, the custom layout can be set with `setxkbmap my_layout`. However, whenever you then enter the keyboard settings dialog, your custom setxkbmap options are reset and you need to reapply. If the custom layout was in the UI, this would not be an issue.

http://elementaryos.stackexchange.com/questions/1264/how-to-provide-and-select-a-custom-keyboard-layout-xkb-methods-failing/1323#1323

Tags: keyboard
tags: added: keyboard
description: updated
description: updated
Changed in elementaryos:
milestone: none → loki-beta1
Cody Garver (codygarver)
Changed in elementaryos:
importance: Undecided → Medium
Changed in elementaryos:
milestone: loki-beta1 → none
Revision history for this message
Evgenii Frolov (frol-onn) wrote :

I have just made the change to an existing xkb/symbols file (added my custom layout) and edited

evdev.xml
evdev.lst
base.xml
base.lst

The layout has appeared in the menu instantly.
Have you tried also changing the appropriate .lst file?

Revision history for this message
Evgenii Frolov (frol-onn) wrote :

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.

Revision history for this message
Watson-dominic (watson-dominic) wrote :

I'm not currently using elementary (in part due this issue), but will definitely check that approach out @Evgenii, thank you.

Have never had to set anything in xkb/symbols/xx before. From responses I've had to this (or similar ticket), the keyboard layouts were hardcoded somewhere. Either this wasn't true at all, or this has changed so that the issue is now resolved.

Will post back here if this solution works for me but can't promise any investigation in the very near future.

Revision history for this message
Santiago (santileortiz) wrote :

This was just fixed in Loki with these two branches added for Wingpanel and the keyboard plug on Switchboard

https://code.launchpad.net/~davidmhewitt/switchboard-plug-keyboard/fix-1650986-load-xml-config
https://code.launchpad.net/~davidmhewitt/wingpanel-indicator-keyboard/fix-1650986-xml-config

So, I think updating your system will fix this.

Revision history for this message
Watson-dominic (watson-dominic) wrote :

I'm just running a live CD of loki and confirm that the steps you provide @frol-onn work for me also. I still need to run a script to set the other xkb "options". But having the single layout that can't get switched out of is working a treat.

Great work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.