How to Switch Keyboard Layouts?

36 views
Skip to first unread message

J. Eppler

unread,
Jul 4, 2017, 5:11:56 PM7/4/17
to qubes-users
Hello,

how can I switch keyboard layouts in a AppVM? I tried to use the XCFE menu item to switch layouts. However, it only works for Dom0. In addition, I tried to use xkb-switch, but without much success. Interesting about xkb-switch is the fact, that it shows I use a US layout in the VM, which is surprising because I use a QWERTZ (German) layout and it works. I wonder where the keyboard layout information are stored.

Back to the keyboard layout switching. I would like to be able to switch my keyboard layout multiple times while working in a VM. Does anybody has a solution or idea on how to achieve it?

0spin...@gmail.com

unread,
Jul 4, 2017, 5:19:59 PM7/4/17
to qubes-users

rightclicking the entry in the Qubes Manager, set keyboard layout, doesn't work?

J. Eppler

unread,
Jul 5, 2017, 9:34:59 PM7/5/17
to qubes-users, 0spin...@gmail.com
Awesome, That works. Thanks. However, how can I change the keyboard layout very fast between to different layouts. Basically, just with a shortcut? Any idea?

Noor Christensen

unread,
Jul 6, 2017, 4:38:32 AM7/6/17
to qubes-users
I configure this in /etc/X11/xorg.conf.d/20-keyboard.conf on dom0:

Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"

# Primary layout: US
# Secondary layout: Swedish
Option "XkbLayout" "us,se"

# Both shifts Switch to next layout
# Right Alt Toggle next layout while pressed
Option "XkbOptions" "grp:shifts_toggle,grp:switch"
EndSection


As you can see in the comments, I have layout switching bound to
pressing Left Shift + Right Shift together. I also use AltGr to
temporarily switch to the next layout while key is pressed.

There is a list of available values for XkbOptions here:

/usr/share/X11/xkb/rules/base.lst


Kind regards,

-- noor

|_|O|_|
|_|_|O| Noor Christensen
|O|O|O| no...@fripost.org ~ 0x401DA1E0
signature.asc

Noor Christensen

unread,
Jul 6, 2017, 6:17:54 AM7/6/17
to qubes-users
On Thu, Jul 06, 2017 at 10:38:27AM +0200, Noor Christensen wrote:
> On Wed, Jul 05, 2017 at 06:34:58PM -0700, J. Eppler wrote:
> > Awesome, That works. Thanks. However, how can I change the keyboard
> > layout very fast between to different layouts. Basically, just with a
> > shortcut? Any idea?
>
> I configure this in /etc/X11/xorg.conf.d/20-keyboard.conf on dom0:
>
> [...]
>
> There is a list of available values for XkbOptions here:
>
> /usr/share/X11/xkb/rules/base.lst

You can also set these options in a running X11 session using
setxkbmap(1). Example:

$ setxkbmap -layout us,se -option grp:alt_shift_toggle
signature.asc

J. Eppler

unread,
Jul 6, 2017, 6:08:10 PM7/6/17
to qubes-users, kchr+qub...@fripost.org
Noor Christensen,

thank you very much. I changed the settings with the following command: setxkbmap -layout us,se -option grp:alt_shift_toggle

Now, I am able to switch layouts in my VM with ALT + Left Shift. However, I replaced the layouts with my choice of layout options.

Reply all
Reply to author
Forward
0 new messages