Keymapping hal/fdi

David Woodfall dave at dawoodfall.net
Mon Apr 25 05:47:22 PDT 2011


On (09:34 25/04/11), Dirk Wallenstein <halsmit at t-online.de> put forth the proposition:
>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

I'm finding that regardless of deviceid it changes my main keyboard as
well as the phone.

I got the device id from xinput list and used

xkbcomp -i 8 keymap.xkb :0.0



>
>--
>Cheers,
>  Dirk
>_______________________________________________
>xorg at lists.freedesktop.org: X.Org support
>Archives: http://lists.freedesktop.org/archives/xorg
>Info: http://lists.freedesktop.org/mailman/listinfo/xorg
>Your subscription address: dave at dawoodfall.net

-- 
Don't look back, the lemmings are gaining on you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20110425/0db5efdc/attachment.pgp>


More information about the xorg mailing list