2

I have remapped the <LCTL> key to Tab in /usr/share/X11/xkb/symbols/en using

key <LCTL> { [    Tab,   Tab,       Tab,         Tab  ] };
key <MENU> { [ Alt_R,      Alt_R,         Alt_R,            Alt_R ] };

I now want to set a shortcut for Switch applications to Alt + Tab using the remapped left control key as Tab. However, two problems arise.

  1. The Keyboard -> Sortcuts interface in Ubuntu Gnome 15.04 does not recognize my currently active custom keyboard layout, but instead interprets my keystrokes as coming from standard QWERTY. And in QWERTY Alt + Ctrl is not enough to make a shortcut.

  2. Even after assigning Switch applications to Alt + Tab (by switching active keyboard layouts), pressing these keys in my custom layout has no effect! Only pressing the corresponding QWERTY keys does.

In short, the Shortcuts interface seems to completely ignore my custom layout.

What can I do to make my custom layout also work with shortcuts?

  • I think you need to reassign modifiers as well, otherwise parts of the system will still see LCTL as a Control modifier key and MENU as not an Alt modifier key. – Gilles 'SO- stop being evil' Aug 17 '15 at 21:52
  • Thanks for the hint! Do you know how I can reassign the Control modifier? – robust Aug 18 '15 at 1:20
  • (only for a specific layout and not universally) – robust Aug 18 '15 at 1:57
2

After reading a little bit on assigning modifiers, following the hint from Gilles, I came up with

key <TAB>  { [ BackSpace ] };
key <CAPS> { [ Control_L ] };
key <LCTL> { [ Tab ] };
key <MENU> { [ Alt_R ] };

modifier_map Control { <CAPS> };
modifier_map Mod1 { Alt_L, Alt_R, <MENU> };

This solves problems 1 and 2. Thanks a lot, Gilles!

(Unfortunately the modifier remappings stick across keyboard layouts, even though I have only configured them for one. But this might be better discussed in a separate question.)

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.