3

Since 14.04 default keyboard switch key is Super+Space

I preparing sample system for clone on hundreds of pc's and want to assign another default keys to switch layout with command line.

I cannot find where this setting is defined in 14.04.

I search /etc, dconf, gconf but cannot find any appropriate configuration in fresh install of Ubuntu 14.04.

Also I want to manage this setting with chef for supporting idempotent configuration in future. So I need to know where it's stored.

Help me to find where it's stored.

2 Answers 2

3

You can change this setting by going to System Settings -> Keyboard, then go to the Shortcuts tab and choose Typing on the left. The setting you're looking for is Switch to next source.

Changing the keyboard layout switch hotkey in Ubuntu

This setting is stored by GSettings. I think these settings are stored in ~/.config/dconf/user, but this is a database file managed by some applications and I would not touch it. Better to use dconf to change the setting if you would like to do it via the command line.

You can use dconf watch / to see settings that are being changed while you change Ubuntu's system settings via the GUI. E.g., if I run this command, then change the keyboard switcher to Super+Tab via the GUI, that command outputs:

/org/gnome/desktop/wm/keybindings/switch-input-source
  ['<Super>Tab']

So, you could change this switch to Super+Tab (as an example) via the command line by issuing the command

dconf write /org/gnome/desktop/wm/keybindings/switch-input-source "['<Super>Tab']"
3
  • Thank you. This is very complete answer and how-to on the future
    – vskubriev
    Jul 30, 2014 at 8:57
  • Nevertheless, making the change following these instructions didn't work for me (under Ratpoison rather than Unity). Aug 10, 2014 at 0:23
  • 1
    @JoeCorneli Obviously, this will not work under Ratpoison. Ratpoison is an entirely different window manager, and does not use any of those /org/gnome/ settings as Unity does. I am not a user of Ratpoison and can't tell you how to achieve the same thing there - but simply ask the same question for Ratpoison here on AskUbuntu, someone will surely help you out :-) Aug 10, 2014 at 9:36
0

Sorry, but i need a little more, then i publish my own complete answer. This is my complete workaround:

  1. First creating an override file:

    sudo vim /usr/share/glib-2.0/schemas/60_orgname_custom.gschema.override

    [org.gnome.desktop.wm.keybindings]

    switch-input-source=['you_keycode']

    switch-input-source-backward=['you_keycode']

  2. I use <Alt>Shift_L and <Alt>Shift_R in you_keycode

  3. Recompile schemas:

    sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

1
  • These instructions did not work for me under the Ratpoison WM. Aug 10, 2014 at 0:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .