8

Recently i installed Ubuntu 18.04. I added a Bengali keyboard layout and set the shortcut to switch between languages. The problem is when i press the shortcut key a popup notification appears and the keyboard fridges for about 3 seconds.

How can i disable this notification popup and get relief from the keyboard fridge issue.

I installed gnome-tweak-tool application and there is a way out of this. There is a list of preset shortcut keys to switch languages and can be enabled any or multiple of them.

For a long time i use F12 as the shortcut key. I want to use F12 and the popup disabled too.

enter image description here

nasirkhan
  • 595

3 Answers3

4

Assuming you only have two languages set..

create a script with below content..

#!/bin/bash

CURRENT=gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().currentSource.index"

if [ "$CURRENT" == "(true, '1')" ]; then gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()" else gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[1].activate()" fi

Create a keyboard shortcut with F12 like below..

enter image description here

enter image description here

You can see the language changing with F12 button pressed in the above gif.

Further Reading

2

I developed Quick Lang Switch Gnome-shell extension to do exactly that, no popup appears and switching languages happens instantly. Plus, it does not require a custom-shortcut (the regular one changes behavior), so gnome-tweak-tool works just fine.

Disclaimer: I am the developer of the Quick Lang Switch...

andrew.46
  • 39,359
ankostis
  • 255
0

It's a bug and not a typical behaviour. The popup disapears immediatelly after unpressing a shortcut, by default it's: super + space

It could be possible if you are using one key for switching a language, in my case it was right Shift
If you want a thrill it you can try to reproduce it:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['Shift_R']"

akpp
  • 171
  • 1
  • 5