1

I'm on Ubuntu 22.04.1 (jammy) LTS. My ultimate goal is to have the following keyboard layout configuration:

  • U.S. international (with AltGr dead keys) and Russian keyboard layouts;
  • switching between them using Alt+Shift (toggle) and Caps Lock (temporarily);
  • Having left Logo key as the compose key.

The behaviour I'm getting is that I seem to have two U.S. layouts, and one of them ignores AltGr in console.


My /etc/default/keyboard:

BACKSPACE="guess"
XKBLAYOUT="us,ru"
XKBMODEL="pc105"
XKBOPTIONS="compose:lwin,grp:caps_switch,grp:lalt_lshift_toggle,nbsp:level3n,terminate:ctrl_alt
_bksp"
XKBVARIANT="altgr-intl,"

The output of setxkbmap -print -verbose 10:

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};

The output of gsettings list-recursively 'org.gnome.desktop.input-sources':

org.gnome.desktop.input-sources current uint32 0
org.gnome.desktop.input-sources mru-sources [('xkb', 'us+altgr-intl'), ('xkb', 'ru')]
org.gnome.desktop.input-sources per-window false
org.gnome.desktop.input-sources show-all-sources false
org.gnome.desktop.input-sources sources [('xkb', 'us+altgr-intl'), ('xkb', 'ru')]
org.gnome.desktop.input-sources xkb-options ['terminate:ctrl_alt_bksp', 'nbsp:level3n', 'grp:lalt_lshift_toggle', 'grp:caps_switch', 'lv3:ralt_switch', 'compose:lwin']

I've tried both sudo dpkg-reconfigure console-setup and sudo dpkg-reconfigure keyboard-configuration, rebooting and all. No effect.

Is there anything I'm forgetting?

Ainar-G
  • 161
  • 1
  • 8

1 Answers1

0

I'm not entirely sure, which thing fixed it, but I did the following:

  1. Removed ~/.xinputrc.

  2. Used im-config to set input method selection to default.

  3. Did what this comment recommends: Ubuntu 17.10 and later: can't change the input switching shortcut to alt+shift.

This seems to have fixed the switching issue, although I cannot access my English layout's third level by pressing Caps Lock and AltGr simultaneously. But I guess, that will be another question, heh.

Ainar-G
  • 161
  • 1
  • 8