After long time after upgrade 18.04 -> 20.04 finally solved this bug.
In 18.04 before upgrade switching key was caps-lock. After upgrade - caps-lock still switch layout, but floating indicator windows RU|EN appears on the screen which eats keys pressed for 1 second and sometimes switches caps-lock mode instead or with layout change.
Solution is:
1. Go Settings, keyboard shortcuts, set layout switch combination to "Super + Space" (was CapsLock).
Настройки -> Комбинации клавиш -> Переключиться на следующий источник ввода -> Win+пробел
2. Go dconf editor, search org.gnome.desktop.input-sources xkb-options
Change its value from: 'grp:alt_shift_toggle' to 'grp:caps_toggle'.
3. PROFIT:
a) Layout correctly switches with Caps-Lock key. Fast. No delays. No indicator window appear. No keystrokes lost. No CapsLock mode accidental switch.
b) Caps-Lock mode can be switched with Shift+Caps-Lock, without layout change.
c) Win+Space worked as well: QUICK press - no indicator appears. If you hold Win key more then 400 ms after space - then indicator window appears - and you can cycle layouts by pressing space multiple times (holding win key).
After long time after upgrade 18.04 -> 20.04 finally solved this bug.
In 18.04 before upgrade switching key was caps-lock. After upgrade - caps-lock still switch layout, but floating indicator windows RU|EN appears on the screen which eats keys pressed for 1 second and sometimes switches caps-lock mode instead or with layout change.
Solution is: desktop. input-sources xkb-options shift_toggle' to 'grp:caps_toggle'.
1. Go Settings, keyboard shortcuts, set layout switch combination to "Super + Space" (was CapsLock).
Настройки -> Комбинации клавиш -> Переключиться на следующий источник ввода -> Win+пробел
2. Go dconf editor, search org.gnome.
Change its value from: 'grp:alt_
3. PROFIT:
a) Layout correctly switches with Caps-Lock key. Fast. No delays. No indicator window appear. No keystrokes lost. No CapsLock mode accidental switch.
b) Caps-Lock mode can be switched with Shift+Caps-Lock, without layout change.
c) Win+Space worked as well: QUICK press - no indicator appears. If you hold Win key more then 400 ms after space - then indicator window appears - and you can cycle layouts by pressing space multiple times (holding win key).