Re: X11 with different keyboards

2003-08-21 Thread gaspard


On Thu, 21 Aug 2003, Christian Lynbech wrote:

> 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?

See the webpage at

http://irg.cs.ohiou.edu/~eblanton/i18n/russkb.html

It's for russian/qwerty layout, but it should work for everything.

Just keep in mind there is an error in it, down the page:

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbLayout"  "ru"
Option "XkbOptions" "ctrl:nocaps,grp:shift_toggle"
EndSection

The line

Option "XkbLayout"  "ru"

should be replaced by

Option "XkbLayout"  "us,ru"

of course replace "us,ru" with the two layouts you want. Then just shift
with shift+shift.

wfg,

Gaspard



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: X11 with different keyboards

2003-08-21 Thread Colin Watson
On Thu, Aug 21, 2003 at 05:53:03AM +0200, Christian Lynbech wrote:
> 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?

Yep, it's quite easy. Use 'setxkbmap se', 'setxkbmap us', etc. There are
switches available if you need something more complicated.

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: X11 with different keyboards

2003-08-20 Thread Ken Bloom
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. ***


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: X11 with different keyboards

2003-08-20 Thread Nick Hastings
Hi,

* Christian Lynbech <[EMAIL PROTECTED]> [030821 13:39]:

> 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?

apt-cache search keyboard switch

Cheers,

Nick.

-- 
Debian testing/unstable
Linux twofish 2.6.0-test3-looxt93c1 i686 GNU/Linux


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



X11 with different keyboards

2003-08-20 Thread Christian Lynbech
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?


+-
Christian Lynbech   | email:  [EMAIL PROTECTED] 
+-
Hit the philistines three times over the head with the Elisp reference manual.
- [EMAIL PROTECTED] (Michael A. Petonic)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]