LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Current xkbmap / X.org kb layout switching ? (https://www.linuxquestions.org/questions/linux-software-2/current-xkbmap-x-org-kb-layout-switching-470134/)

yacccobb 08-02-2006 12:27 PM

Current xkbmap / X.org kb layout switching ?
 
In fluxbox I use key combinations to switch to kb layouts with setxkbmap. I'd like to have 2 xkbmaps and with one key combination(like Alt+Shift) switch them. I need to know which one is currently active to select another... how can i het current xkbmap ? Or I somewhere read that if I specify more layouts in "XkbLayout" in xorg.conf, it's possible to switch between them through X... any ideas appreciated.

ciotog 08-04-2006 01:15 AM

You could create an environment variable which you export each time you change maps. Then read the variable to see which one is currently loaded.

yacccobb 08-04-2006 04:45 AM

That's not exactly what I wanted, but I guess it will do...

yacccobb 08-21-2006 04:15 AM

Solved.

OK, there are 2 ways. First is the script that greps layout from 'setxkbmap -v' and second(one I was looking for) - edit /etc/X11/xorg.conf (or /etc/X11/XF86Config-4) :

Code:

Section "InputDevice"
# ...

Option        "XkbLayout"        "us,cz_qwerty"
Option        "XkbOptions"        "grp:alt_shift_toggle,grp_led:scroll"
EndSection



All times are GMT -5. The time now is 05:37 AM.