Change keyboard layouts
There is a good document explaining how to setup keyboard layout for your X11 in xorg.conf: http://www.xfree86.org/current/XKB-Config2.html
Layout switching is controlled by X-server . Layouts and switching method are defined either in xorg.conf or in hal configuration files (if X uses hal for input devices). Layout configuration can be changed/added on-fly.
You can add a Layout switch plugin to your lxpanel. It shows the current layout in graphical or text mode and can be configured to remember layouts for each window.
Tools used to switch keyboard layouts
- setxkbmap (for example, if you live in Belgium you could execute setxkbmap be in a terminal to have the azerty layout)
This is another issue and the setup could be distro-specific.
Hotkey solution using setxkbmap
Just put this command into your ~/.bashrc file:
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll de,tr,us
- alt_shift_toggle can be replaced by another key combination.
- grp_led:scroll is optional. Using it will turn on the scroll lock light if another layout than the first specified is active.
- de,tr,us can be any comma-separated list of keyboard layouts. In this case German, Turkish, and US English layout.
setxkbmap -option to reset these settings.
Remote LXDE sessions
LXDE can be launched as remote DE over NX session, so all above information is irrelevant - no X server configuration is allowed as X server is embedded into client.
But keyboard layout has to be recognized somehow on the server and it is through internal server function. Keyboard map is always the same as local.
There is a bug with neatx (Google NX server implementation) which leaves some Linux clients with some unusable keys (at least arrows). The bug is not resolved, but there is workaround discussed here: http://code.google.com/p/neatx/issues/detail?id=7
Confirmed on Gentoo, works, posting here because above information can be misleading.