[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: remapping keys on a SPECIFIC USB keyboard
From: Peter Hutterer <peter.hutterer () who-t ! net>
Date: 2010-04-27 23:53:04
Message-ID: 20100427235304.GA4167 () barra ! bne ! redhat ! com
[Download RAW message or body]
On Tue, Apr 27, 2010 at 03:49:39PM -0700, Dirk Hohndel wrote:
> I use my laptop in several different locations - in one of them the
> keyboard that I connect to it is an Apple keyboard that has Alt_L and
> Multi_key (aka, Windows key but in that case, Option and Meta) reversed
> compared to all of my other keyboards. So instead of Ctrl, Multi_key,
> Alt_L as the three keys next to each other, I get Ctrl, Alt_L,
> Multi_key.
>
> Needless to say, this is a real pain for "muscle memory" when typing.
>
> Is there a way to configure X to detect when this specific keyboard is
> connected (it identifies itself as Apple keyboard) and to remap those
> two keys?
yes and no, you can add config snippets based on the device name to apply
different XKB models and rules. for more info and examples, see
https://fedoraproject.org/wiki/Input_device_configuration
however, in this particular case you'll run into two issues:
- I don't know off-heart if there are any xkb options that do exactly that.
- if you're using e.g. GNOME, it will overwrite your settings with the
session-configured xkb layout. so you'd need to disable the keyboard
gnome plugin, or apply it manually.
you can also do it at runtime with setxkbmap, that supports a device id
(again, provided there's an xkb option for it)
Cheers,
Peter
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic