Martin

I use Gnome on Gentoo Linux with a UK keyboard but occasionally plug in a
Spanish keyboard when doing some language learning. With that as a core set
up, I have to change the keyboard settings manually.

I've never tried to do this automatically but I think it might be possible
based on the following things I do know:

1. Xorg.conf supports separate configuration options for multiple input
devices so if you have options in there for each of your keyboards, then you
can assign a different keymap to each of those - so that might be one thing
worth looking at.

2. You could write a simple rule in udev that runs a program or a script
when the new keyboard is plugged in, and likewise one for when you unplug
it. Therefore, you could change some piece of configuration when it's
plugged in, and put the changes back when you unplug it.

Other than that, I've never gone any deeper into this problem, but hopefully
that's a start for you.

Regards

Peter

On 12 August 2011 13:58, Martin Elliott <sli...@slipnet.org.uk> wrote:

> Hi all
>
> I've had a quick glance around the interweb but not found anything
> concrete, so thought I'd ask here for some tips.
>
> I'm in the US at the moment, and use my UK laptop for most of my work.
> I've just picked up an old MS Natural Pro (I love these things), but it is -
> of course - US layout.  I'm using Crunchbang (Debian Squeeze based) with
> xfce and wondered if anybody knows how to automate switching of layouts in
> some way.
>
> What I'd -really- like is to be able to plug in the keyboard and have that
> one set to US layout, with the laptop keyboard on UK.  However I imagine
> that's overly hopeful.  Does anybody know a way I can detect when the
> keyboard is plugged in, then switch the layout...  switching back when it's
> unplugged?
>
> Or am I always going to have to manually switch :)
>
> Any pointers in the right direction would be appreciated!
>
> Cheers
>
> M
>
>
>
> --
> Please post to: Hampshire@mailman.lug.org.uk
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>
--
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

Reply via email to