Keyboard-map related issue 2: Interaction between input sources switching ("Language and Region") and setxbkmap

Hello all,

Having used Ubuntu/Debian on servers I’m now migrating from OS X to Ubuntu Desktop. I’ve found it fairly hard to adjust my muscle memory, and have thus delved into the depth of the keyboard settings. (Some notes on the journal and tools built here: https://github.com/bjohas/Ubuntu-keyboard-map-like-OS-X/tree/master)

This issue concerns the interaction between input sources switching (“Language and Region”) and setxbkmap

I am not sure whether this is a bug or not - but it seems to me that something is note quite right in the interaction between input sources switching (“Language and Region”) and xkb. While some people I’ve asked didn’t have a solution for this, they had also observed that the input source switcher seems to work differently from the command-line xkb switcher.

For example, when I take this xkbd map

partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {

     include "us(basic)"
     name[Group1]= "enHT (English, US, Hyper-Terminal)";
 
     key <CAPS> { [ Control_L, Control_L ] };
     // shift
     replace key <LCTL> { [ Super_L ] };
     replace key <LWIN> { [ Alt_L, Meta_L ] };
     replace key <LALT> { [ Hyper_L, Hyper_L ] };
     // space
     replace key <RALT> { [ Control_R, Control_R ] };
     replace key <RCTL> { [ Hyper_R, Hyper_R ] };
     // Modifiers
     modifier_map Mod1    { <LWIN> };
     modifier_map Mod4    { <LCTL> };
     modifier_map Mod5    { <LALT>, <RCTL> };
     modifier_map Control { <CAPS>, <RALT> };
};

and save it to /usr/share/X11/xkb/symbols/testmap I can then run ‘setxbkmap testmap’ and get the keys as required.

However, if I edit evdev (/usr/share/X11/xkb/rules) accordingly, and select the map via the GUI, it doesn’t work.

Is this a bug in the GUI switcher? Is there another reason this doesn’t work?

Description also available here: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/782 in case it’s a bug.

(I’m on Ubuntu 19.04.)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.