Saturday, June 15, 2019

bug reporting - Ubuntu 18.04 - how to change keyboard shortcuts without Gnome control center GUI?



I have the Ubuntu 18.04 installed.

When I open the Settings, then in Keyboard tab click on the shortcut - the app stops responding.



How can I change the keyboard shortcut for Typing (switch to another language) without using the Settings app ?



you can get the current key combination for switching the input-source and input-source-backward by running the below command look for the once matching



gsettings list-recursively | grep input-source


Example:




parrot@i7-4770U:~$ gsettings list-recursively | grep input-source
org.gnome.desktop.wm.keybindings switch-input-source ['space']
org.gnome.desktop.wm.keybindings switch-input-source-backward ['space']
ca.desrt.dconf-editor.Settings saved-view '/org/gnome/desktop/input-sources/xkb-options'
org.gnome.desktop.input-sources show-all-sources false
org.gnome.desktop.input-sources xkb-options @as []
org.gnome.desktop.input-sources per-window false
org.gnome.desktop.input-sources current uint32 0
org.gnome.desktop.input-sources mru-sources [('xkb', 'us'), ('xkb', 'de')]

org.gnome.desktop.input-sources sources [('xkb', 'us'), ('xkb', 'de')]
parrot@i7-4770U:~$


the above result says Super+space and Shift+Super+space are the ones..



you can put your own keycombinations with the below command but it does not guarantee that the key combo will work..



for example:




gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['i']"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['i']"


Edit:



if you want to make Ctrl+Shift as a Shortcut for Switching the Layout
you can either use gnome-tweaks like this



enter image description here




But you need to press Shift first and then Control or Control+2 times Shift for the first time..



the commandline way to achieve this is



gsettings set org.gnome.desktop.input-sources xkb-options "['grp:ctrl_shift_toggle']"


again in this way you will loose graphical representation that is not equivealent to changing the input-language via default shortcut Super+Space


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...