You are not logged in.
Is there a way to switch keyboard layout on the fly ideally using a key combination, say English to French and vice versa, with OpenBox
Offline
Directly from openbox it isn't possible, but there are other ways to do it. jbromley made a ruby script to switch and determine current keyboard layout. Still you have to define the layouts in xorg.conf, like this:
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,fr"
Option "XkbOptions" "grp:shifts_toggle"
EndSection
With this you will have english and french layout and you switch between them with both shifts pressed. Not all shortcuts work, last time when I tried grp:alts_toggle didn't work.
For option details see: /usr/share/X11/xkb/rules/xorg.lst
Offline
Have you tried grp:mod1s_toggle? Maybe it uses mod1 instead of alt.
(lambda ())
Offline
Have you tried grp:mod1s_toggle? Maybe it uses mod1 instead of alt.
still no luck
Offline
Anyone has any success?
I tried this:
Option "XkbRules" "xorg"
Option "XkbLayout" "us,fr-ca"
Option "XkbOptions" "grp:shifts_toggle"
It does not work, and on top of that, all my openbox shortcut keys are broken
Offline
Well, it is fixed for me now.
Option "XkbLayout" "us,ca"
Option "XkbVariant" ",fr"
Option "XkbOptions" "grp:shifts_toggle"
Offline
I had trouble with that as well. It just wouldn't work no matter what I put in xorg.conf
So I just put something like this in ~/.xbindkeysrc
"setxkbmap us euro"
alt + shift + 1
"setxkbmap rs latinyz"
alt + shift + 2
Works so much better for me than a single switch button.
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline