Mapping Remote Control Buttons
Bernie Hoefer
LUG-Member at TheMoreIKnow.info
Mon Nov 17 02:11:58 EST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm having trouble finding exactly how to map a button on my
MythTV computer's remote control. (Shows up in the output of lsusb as
"ID 05a4:9881 Ortek Technology, Inc. IR receiver [VRC-1100 Vista MCE
Remote Control]".)
The remote shows up as both a keyboard and a mouse:
# ls /dev/input/by-id/usb-05a4_9881-*
/dev/input/by-id/usb-05a4_9881-event-kbd
/dev/input/by-id/usb-05a4_9881-if01-event-mouse
/dev/input/by-id/usb-05a4_9881-if01-mouse
When I run xev (a program that prints the contents of X events) I
see this when I press the button:
FocusOut event, serial 33, synthetic NO, window 0x2800001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 33, synthetic NO, window 0x2800001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 33, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...so it doesn't register as a regular key press. This button
apparently registers as a mouse event, as the following demonstrates:
# evtest /dev/input/by-id/usb-05a4_9881-event-kbd
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x5a4 product 0x9881 version 0x110
Input device name: "HID 05a4:9881"
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
{Output of supported events excluded for brevity.}
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Event type 17 (EV_LED)
{Output of supported events excluded for brevity.}
Event type 20 (EV_REP)
Properties:
Testing ... (interrupt to exit)
{Nothing shows up when the button on the remote is pressed.}
^C
# evtest /dev/input/by-id/usb-05a4_9881-if01-event-mouse
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x5a4 product 0x9881 version 0x110
Input device name: "HID 05a4:9881"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
{Output of supported events excluded for brevity.}
Event type 2 (EV_REL)
{Output of supported events excluded for brevity.}
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1416207570.039546, type 4 (EV_MSC), code 4 (MSC_SCAN),
value 10082
Event: time 1416207570.039546, type 1 (EV_KEY), code 142 (KEY_SLEEP),
value 1
Event: time 1416207570.039546, type 1 (EV_KEY), code 142 (KEY_SLEEP),
value 0
Event: time 1416207570.039546, -------------- SYN_REPORT ------------
^C
So, I'm left with the problem of how to map the above *mouse*
button press to a keyboard key press so that MythTV can register and
act on it. From my online research, I think (but am not 100% sure) I
have to make a /etc/X11/xorg.conf.d/99-custom-keyboard.conf file that
contains something like this line:
Option "event_key_remap" "142=150"
...but I'm just not getting it right. (Key code 150 is for the
XF86Sleep key symbol.) It isn't working.
Has anybody encountered a similar problem or have suggestions on
how to go about solving this? Thanks for you help!
- --
Bernie Hoefer
PGP e-mail is welcome! Get my 1024 bit signature key from:
<http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x446A6F93>.
"The more I know, the more I realize how much I do not understand."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlRpn7MACgkQckGmqURqb5MCGgCfUyNXFg2YEcooPM8H0tQutvlf
nLcAn1Io10/zfaeyc0028reJaCg46kfm
=/0zr
-----END PGP SIGNATURE-----
More information about the cinlug
mailing list