Keymapping hal/fdi
Dirk Wallenstein
halsmit at t-online.de
Mon Apr 25 00:34:20 PDT 2011
On Sun, Apr 24, 2011 at 10:48:02AM +0100, David Woodfall wrote:
> On (02:25 24/04/11), David Woodfall <dave at dawoodfall.net> put forth the proposition:
> >Hi, I've have a usr9600 usb phone, which is an extra keyboard. I have
> >setup a 20-phone.fdi for it and set layout etc. Now I'm trying to map
> >keys 1-0 to keypad 1-0 but I'm having problems with that.
> >
> >lshal shows the mapping but it looks like the hex codes are the wrong
> >ones. I got the codes with xev. This is the mapping section:
> >
> > <append key="input.keymap.data" type="strlist">0030:KP0</append>
> > ...
> > <append key="input.keymap.data" type="strlist">0039:KP9</append>
> >
> >Is xev the right tool to get these codes? Any ideas why this isn't working?
> >
> >Cheers
> >
> >Dave
> >
> >--
> >Don't look back, the lemmings are gaining on you.
>
> Not having any luck with this so I tried the old xorg.conf way:
>
> Section "InputDevice"
> Identifier "Keyboard1"
> Driver "evdev"
> Option "XkbModel" "pc105"
> Option "Device" "/dev/input/by-id/usb-Yealink_Network_Technology_Ltd. _VOIP_USB_Phone-event-if03"
> Option "event_key_remap" "10=87, 11=88, 12=89, 13=83, 14=84, 15=85, 16=79, 17=80, 18=81, 19=90"
> Option "XkbLayout" "us"
> Option "XkbRules" "xorg"
> EndSection
>
> This also doesn't work. I got the event_key_remap option by googling.
> I couldn't really find anything else on this. It's a pit xmodmap
> doesn't support multiple devices.
xkbcomp can since 1.2.1, and switching keys is easy:
Get the keymap:
xkbcomp -i <deviceid> $DISPLAY keymap.xkb
Edit keymap.xkb: Exchange the keycodes at the top. For example switch:
<KP3> = 89;
<AE03> = 12;
Install the keymap:
xkbcomp -i <deviceid> keymap.xkb $DISPLAY
--
Cheers,
Dirk
More information about the xorg
mailing list