2

I use Xubuntu. As everyone knows, Keyboard Layouts Plugin is very, very buggy and it still forgets my settings. It drives me crazy - I have to set them again and again every time I wake up or turn on my laptop.

So I found a solution - put into my .bashrc this:

setxkbmap -option '' -option grp:alt_shift_toggle cz,us -variant querty

That should set my toggle to Alt+shift and my layouts to Czech QUERTY and plain US English as a second one. Voilà, that seems to work! I could use Keyboard Layouts Plugin only as an indicator, that's okay.

However, it doesn't work well. The problem is that it ignores -variant setting. More or less. In Keyboard Layouts Plugin I actually see Czech QUERTY selected, but in reality my keyboard types QUERTZ. That's insane :-(

Could anyone help, please?

1 Answer 1

0

Well, the right answer is: There is a typo. It's not Q U ERTY, but Q W ERTY! I promise next time I'll ask at the morning, being fresh.

However, until I realized it's typo, I searched and experimented even more and I came up with a different, less hackish solution:

I found out there is a /etc/default/keyboard file with keyboard settings. If I edit it and then dare to touch Keyboard Layouts Plugin, my changes are preserved even after multiple restarts. No need for any hacks with setxkbmap.

I edited the file in a following way:

# Check /usr/share/doc/keyboard-configuration/README.Debian for
# documentation on what to do after having modified this file.

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.

XKBMODEL="pc105"
XKBLAYOUT="cz,us"
XKBVARIANT="qwerty"
XKBOPTIONS="grp:alt_shift_toggle"

# If you don't want to use the XKB layout on the console, you can
# specify an alternative keymap.  Make sure it will be accessible
# before /usr is mounted.
# KMAP=/etc/console-setup/defkeymap.kmap.gz

This works. Hope it helps someone!

See also:

1

You must log in to answer this question.

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