tony_anderson at usa.net
Mon Nov 10 16:40:56 EST 2008
Thanks. That may do it. Sugar is set up so the XO key with % and x
(divide/multiply I suppose) is used to switch the keyboard layout.
Oops. No joy. The output of setxkbmap doesn't change when I switch layouts.
Ties Stuij wrote:
> On Mon, Nov 10, 2008 at 9:07 PM, Tony Anderson <tony_anderson at usa.net> wrote:
>> I am writing some python code which needs to interrogate the system
>> to determine which keyboard layout is currently selected. The goal is to
>> show an image of the keyboard for Nepali students with a US keyboard. I
>> checked /home/olpc/.i18n but this does not change with the % x key.
>> Anyone know how that can be determined?
> Hmm, I must confess I don't know what the % x key is.
> If no, or before, a more elegant solution surfaces, you can always
> grep through the 'setxkbmap -print' output, as Google told me.
> setxkbmap -print | grep xkb_symbols | sed 's|.*+\([^"]\+\)(.*|\1|'
> will print 'us' on my XO.
> If you've got it set to 'us' of course.
>> Devel mailing list
>> Devel at lists.laptop.org
More information about the Devel