Is is possible to switch between keyboard and input languages on raspbian? My wife needs to type thai language and I need english. In windows we have a hot key swap between keyboards.
Can this be done on the Pi?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.
Sign up to join this communityIs is possible to switch between keyboard and input languages on raspbian? My wife needs to type thai language and I need english. In windows we have a hot key swap between keyboards.
Can this be done on the Pi?
I haven't tested this, but I assume that you can change the keyboard layout in the same way as on a normal Debian install. Raspbian uses LXDE as its desktop environment, so you can follow their instructions:
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,th
See http://wiki.lxde.org/en/Change_keyboard_layouts (and also http://wiki.debian.org/Keyboard) for more information.
There is a quick graphical way to change the keyboard layouts, the toggle key-combination and have a panel indicator at the same time.
Add/Remove Panel Items
Add
Close
Keep system layouts
try for Raspbian GNU/Linux 9.4 (stretch)
sudo nano /home/pi/.config/lxpanel/LXDE-pi/panels/panel
At the end of the file change to
Plugin {
type=xkb
Config {
Model=pc105
LayoutsList=us,ru
VariantsList=,
ToggleOpt=grp:alt_shift_toggle
KeepSysLayouts=0
DisplayType=0
}
}
Save and reboot system.
LayoutsList=us,ir
for double keyboard layout Persian and English. Thanks!
This Keyboard Layout Handler is broken since May 2015 and still doesn-t work even with the new Pixel interface. That's why I still use the old February 2015 version of Raspbian. I tested all the newer versions with many keyboards with no success. It seems it is a bug in the software. Whatever you do, the close button doesn-t work. You may try to manually edit "/home/pi/.config/lxpanel/LXDE-pi/panels/panel" and add the languages you prefer, but when you reboot you have to uncheck again "keep system layouts" from the Keyboard Layout Handler, which is somehow inconvenient.
Anyway, this is only a temporary solution. We hope they will fix the broken button once for all and make a functional system.
change this file:
/etc/default/keyboard
for keyboard languages (for example):
XKBLAYOUT="us,ir"
XKBOPTIONS="grp:switch,grp:alt_shift_toggle,grp_led:scroll"
It is true that after rebooting the settings aren't saved. Although, there is one way to fix it fast every time. You can create a bash executable that fixes it and run it at the start of raspberry pi.
Command Line: sudo nano language.sh
Now type the following:
#!/bin/bash
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,gr
echo "You can now use more than one languages!"
Exit nano
with CTRL-X.
Command Line: sudo chmod +x hello-world.sh
When you start the raspi you just run on command line: ./language.sh