Switch Keyboard layout

From Fluxbox-wiki

Jump to: navigation, search

to switch keyboard layout in fluxbox you must take some effect and carefully read XKB Configuration . also you need to know which name have your language layout and which Variant name (if you use Variant). first configure your xorg.conf must correctly setting:

 # /etc/X11/xorg.conf

for example i use Danish (dk) keyboard layout and Iraq(iq) Kurdish-Arabic-Latin Variant(ku_ara):

Option		"XkbLayout"	"dk,iq"
Option		"XkbVariant"	",ku_ara"

more info about your keyboard layout

# cat /usr/share/X11/xkb/rules/base.lst | grep -i <YOURCOUNTRYCODE>

and to create small script to make switch keyboard simply and user friendly

#vim /home/<YOURUSERNAME>/.fluxbox/menu

this file content:

[begin] (fluxbox)
[include] (/etc/X11/fluxbox/fluxbox-menu)
[end]

change it to this:

[begin] (fluxbox)
[include] (/etc/X11/fluxbox/fluxbox-menu)
[submenu] (Keyboards)
[exec] (dk) {setxkbmap dk}
[exec] (ku) {setxkbmap iq -variant ku_ara}
[end]

this example for Danish (dk) and Iraq (iq) kurdish-arabic-latin (ku_ara). another example for German (de) and Danish (dk) layout without Variant.

[begin] (fluxbox)
[include] (/etc/X11/fluxbox/fluxbox-menu)
[submenu] (Keyboards)
[exec] (de) {setxkbmap de}
[exec] (dk) {setxkbmap dk}
[end]

now you see the Keyboards option in fluxbox menu at the end.

Personal tools
Google Ads