Subject: Re: Different Keyboard Mappings in X11
To: Curt Sampson <cjs@cynic.net>
From: Matthieu Herrb <matthieu.herrb@laas.fr>
List: current-users
Date: 02/23/2004 18:48:13
This is a cryptographically signed message in MIME format.
--------------ms000600060004030008070406
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Curt Sampson wrote:
> I've got two keyboards hooked up to my system, a PS/2 and a USB. I use
> them both under X11 (with a pair-programming partner), and I'd like to
> be able to use different mappings for each keyboard. (I like to have ESC
> and backquote/tilde reversed, for example, but my partner often doesn't.
> Worse, in another situation, a partner wants to use a Japanese layout
> keyboard when I want to use a US layout.)
>
> X11 itself normally reads from the keyboard multiplexer, and thus hasn't
> even an idea which keyboard a key press came from. I briefly considered
> hooking up /dev/wskbd0 and /dev/wskbd1 as separate input devices in the
> XF86Config file, but I don't see any way to get xmodmap to map them
> differently, and xev does not seem to have a field to distinguish which
> keyboard an event is coming from, so it's not looking like that option
> will work.
>
> So I turned to wscons mappings, but it turns out that X11 uses the
> keyboard in "raw" mode, which returns keycodes directly, so the mappings
> seem to have no effect.
>
> So has anybody got any ideas for what I can do?
Turning wsmux off and using 2 different 'InputDevice' sections, you
should be able to use different XKB configurations for the 2 keyboards.
But I haven't tried it. See <http://pascal.tsu.ru/en/xkb/> for details
on configuring XKB.
--
Matthieu Herrb
--------------ms000600060004030008070406
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIM+zCC
A20wggJVoAMCAQICAQIwDQYJKoZIhvcNAQEEBQAwKzELMAkGA1UEBhMCRlIxDTALBgNVBAoT
BENOUlMxDTALBgNVBAMTBENOUlMwHhcNMDEwNDI3MDU0NjQ5WhcNMTEwNDI1MDU0NjQ5WjA0
MQswCQYDVQQGEwJGUjENMAs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