[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X11 with different keyboards



On Thu, 21 Aug 2003 06:40:11 +0200, Christian Lynbech wrote:

> I am currently spending quite some time at work travelling back and
> forth between Denmark and Sweden.
> 
> I have a laptop that I bring with me and a screen and keyboard at the
> office in Sweden that I can hook up to.
> 
> Now the fun part is that the laptop has an american keyboard layout
> while the external keyboard is swedish, and I would like a more
> convenient way of controlling the situation than reconfiguring the X
> server whenever I switch :-)
> 
> First of all, is there anybody who knows of a way to sample
> programmtically whether there is an external ketboard hooked up to the
> laptop?
> 
> Secondly, is there any other way to switch keyboard layout on the fly
> under X11 (just like I can with `loadkeys' on the console) other than
> generating a set of command files for xmodmap?

Generating a set of command files for xmodmap is a good idea. There may
already be files generated however in /usr/share/xmodmap/ that may save
you some or all of the work involved.

You may also be able to use xkbcomp to use xkb files to change your
layout. There are lots of files serving lots of different purposes, but
the ones you would want to select from would be found in
/etc/X11/xkb/symbols/
(This is what I do for hebrew, but I took time to create my own phonetic
keyboard for that, so ymmv with the ones in this directory.)

-- 
I usually have a GPG digital signature included as an attachment.
See http://www.gnupg.org/ for info about these digital signatures.
My key was last signed 6/10/2003. If you use GPG, *please* see me about 
signing the key. ***** My computer can't give you viruses by email. ***



Reply to: