3

The MS Windows introduced ability to switch current keyboard layout by press specific hotkey for each specific language. I found very comfortable to have acyclic shortcuts to switch layout to target language with following shortcuts: Alt+Shift+1, Alt+Shift+2, Alt+Shift+3.

When i moved to Linux i run into problem with configure same shortcuts.

I tried to create custom ~/.config/xkb/my file with following content:

xkb_keymap {
xkb_keycodes  { include "evdev+aliases(qwerty)" };
xkb_types     { include "complete"  };
xkb_compat    { 
    include "complete"  
    interpret ISO_Second_Group {
        action= LockGroup(group=2);
    };
    interpret ISO_Third_Group {
        action= LockGroup(group=3);
    };
};
xkb_symbols   { 
    include "pc+us:1+ru:2:ua:3+inet(evdev)+group(ctrl_shift_toggle)"    

    key <AE01> { [ ISO_First_Group ] };
    key <AE02> { [ ISO_Second_Group ] };
    key <AE03> { [ ISO_Third_Group ] };
};
xkb_geometry  { include "pc(pc104)" };
};

to future load via:

$xkbcomp ~/.config/xkb/my $DISPLAY

Howto properly define ALT and SHIFT modifiers?

slonma
  • 115
  • 1
  • 5
  • Are you sure that `ISO_Second_Group` and `ISO_Third_Group` work? I tried something similar and I got [this error](https://pastebin.com/55aWHsU7). It doesn’t make the whole `setxkbmap` invocation fail so it is easy to miss, and the error is at the top. Did you define these keysyms elsewhere? – Guildenstern Nov 12 '17 at 17:04
  • 1
    ISO_Second_Group and ISO_Third_Group defined as alias for LockGroup action in code above – slonma Nov 14 '17 at 07:15

0 Answers0