1

I need to mention that I know about this bug.

The problem is that in Ubuntu 14.04 (I use Gnome classic as DE) I still can't switch keyboard layout with (Super).

It's not a problem to set this key in Text Entry settings dialog.

It just does not switch the layout.

Can anyone suggest any workarounds how to make it work?

2
  • 1
    Have you tried it with the key combination <Super>+<Space>? – A.B. Apr 15 '15 at 11:14
  • Yes, combinations work fine. But I want to do it with one key, as I do now in 12.04. – dds Apr 15 '15 at 12:04
0

I use a workaround which in itself is not dependent on Dash, but for that very reason can be used with Dash or any launcher - like Synapse, but also launchers specific to each desktop like Xfce, KDE etc.

The idea is to create layout-specific desktop-files and put them in /usr/share/applications, so that they can be launched like any other application.

In action:

enter image description here

The launcher sees them as applications, each selecting a specific keyboard layout.

The command executed by each such launcher should be a setxkbmap command, which has the following form:

setxkbmap <keyboard-layout>

For example, for French it should be setxkbmap fr. For US International with dead keys: setxkbmap us intl, where us is US English and intl is the variant.

To see the proper forms of layouts and variants, look in /usr/share/X11/xkb/rules/xorg.lst.

Each desktop file should be created by opening a text editor, putting inside lines similar to the below and saving the file with a name similar to keyboard_FR.desktop, keyboard_US, keyboard_US-deadkeys.desktop, etc. (The name of the .desktop file may be different than the one set in the line Name=. The later is the one seen by the launcher.)

[Desktop Entry]
Name=US - Keyboard US International dead Keys
Exec=setxkbmap us intl
Icon=path/to/some/icon/file
Terminal=false
Type=Application
Categories=Application;Utility;

So, create a desktop file for each keyboard layout that you need, changing accordingly the name, command variables and icons.

Pay attention to the first letters of the line Name= because Dash and any launcher will find according to the beginning of the name. You may choose to start with a short-name of the layout (FR for French, US for US English, etc) or with a common form like Keyboard to see them all together.

Icon= is also a useful line, to display it all better. You may find country flags or letters ready made icons on the internet by searching "icons flags" or "icons letters". (Or use Shutter to create your own png icons by selecting a monochrome field and writing on that the short-name of the layout etc.)

On Synapse - here.

0

Finally I found solution to this problem. I switched from Gnome classic (fallback, flashback) to Mate desktop environment. There it works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.