How can I automatically change the system keyboard layout when plugging in an external keyboard?

Posted by Andrew Bolster on Ask Ubuntu See other posts from Ask Ubuntu or by Andrew Bolster
Published on 2011-11-09T15:59:05Z Indexed on 2012/04/13 11:45 UTC
Read the original article Hit count: 513

I have a US-Style laptop, which is fine, but I also have a UK-style Ergonomic USB keyboard.

As such I usually have the US key layout set, but when I settle in at my desk and use the UK USB keyboard I find myself making stupid mistakes on symbols (normally a pretty good touch typist on either ergo or standard kbd).

Can anyone think of a clean way of setting the keyboard layout based on the inferred layout/USBID of any plugged in Keyboard?

Even having a custom setting such as adding a specific USB ID to a runtime script that checks if its plugged in or not. Can this be done without the user having to logout/in? I remember doing something similar with xorg.conf, but that required logout.

© Ask Ubuntu or respective owner

Related posts about keyboard

Related posts about laptop