You are not logged in.

#1 2008-07-18 00:37:30

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Openbox and Switching keyboard

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

#2 2008-07-18 07:59:07

lman
Member
From: CZ
Registered: 2007-12-18
Posts: 255

Re: Openbox and Switching keyboard

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

#3 2008-07-18 12:14:28

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: Openbox and Switching keyboard

Have you tried grp:mod1s_toggle? Maybe it uses mod1 instead of alt.


(lambda ())

Offline

#4 2008-07-18 16:04:51

lman
Member
From: CZ
Registered: 2007-12-18
Posts: 255

Re: Openbox and Switching keyboard

andre.ramaciotti wrote:

Have you tried grp:mod1s_toggle? Maybe it uses mod1 instead of alt.

still no luck

Offline

#5 2008-08-17 23:16:00

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Openbox and Switching keyboard

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 sad

Offline

#6 2008-08-19 23:57:59

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Openbox and Switching keyboard

Well, it is fixed for me now.

    Option "XkbLayout" "us,ca"
    Option "XkbVariant" ",fr"
    Option "XkbOptions" "grp:shifts_toggle"

Offline

#7 2008-08-20 01:04:05

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox and Switching keyboard

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

Board footer

Powered by FluxBB