[mythtv-users] Improving the remote control
Andrew Leech
coronasensei at gmail.com
Thu Nov 7 04:36:43 UTC 2013
On 7/11/2013 2:49 PM, Mike Carron wrote:
> I'm using an MCE remote control which has buttons to go directly to
> RecordedTV, Videos and LiveTV to control my Mythfrontend. I've been trying
> to find the proper codes to enable those buttons with no success. I've been
> through the keymaps, wikis and forums looking for a solution and have come
> up dry so far. Since these buttons, and other major function buttons, exist
> on MCE remotes I have to believe a straightforward implementation exists.
> Can someone point me in the right direction?
>
> Thanks,
> mike
>
>
Hi Mike,
On your computer, is the mce remote receiver detected as an rc device?
on a command line, run:
ir-keytable
and note the result. I've got a cheapy mce off ebay (a hp branded one,
not a fake usb-hid one like my first one) and I get:
$ ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event16) with:
Driver mceusb, table rc-rc6-mce
Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
Enabled protocols: RC-6
Repeat delay = 500 ms, repeat period = 125 ms
fwiw: I'm running Linux Mint 15 Olivia (GNU/Linux 3.8.0-32-generic x86_64)
If you're in a similar boat, I'm using said utility to remap the keys to
more palatable keystrokes. The problem is most of the fancy buttons are
sending keystroke id's > 255 which X can't handle.
I manually made my own keymap file with all the fancy buttons I wanted
set to keys X could recognise, then went through the mythtv keys editor
and set the functions to the buttons.
Here's my file:
cat /etc/rc_keymaps/rc6_mce_myth
# table rc6_mce, type: RC6
0x800f0400 KEY_NUMERIC_0
0x800f0401 KEY_NUMERIC_1
0x800f0402 KEY_NUMERIC_2
0x800f0403 KEY_NUMERIC_3
0x800f0404 KEY_NUMERIC_4
0x800f0405 KEY_NUMERIC_5
0x800f0406 KEY_NUMERIC_6
0x800f0407 KEY_NUMERIC_7
0x800f0408 KEY_NUMERIC_8
0x800f0409 KEY_NUMERIC_9
0x800f040a KEY_DELETE
0x800f040b KEY_ENTER
0x800f040c KEY_ESC
0x800f040d KEY_GRAVE
0x800f040e KEY_MUTE
0x800f040f KEY_M
0x800f0410 KEY_RIGHTBRACE
0x800f0411 KEY_LEFTBRACE
0x800f0412 KEY_PAGEUP
0x800f0413 KEY_PAGEDOWN
0x800f0414 KEY_FASTFORWARD
0x800f0415 KEY_REWIND
0x800f0416 KEY_PAUSE
0x800f0417 KEY_R
0x800f0418 KEY_P
0x800f046e KEY_P
0x800f0419 KEY_STOP
0x800f041a KEY_Z
0x800f041b KEY_Q
0x800f041c KEY_NUMERIC_POUND
0x800f041d KEY_NUMERIC_STAR
0x800f041e KEY_UP
0x800f041f KEY_DOWN
0x800f0420 KEY_LEFT
0x800f0421 KEY_RIGHT
0x800f0422 KEY_SPACE
0x800f0423 KEY_EXIT
0x800f0424 KEY_DVD
0x800f0425 KEY_TUNER
0x800f0426 KEY_EPG
0x800f0427 KEY_ZOOM
0x800f043a KEY_BRIGHTNESSUP
0x800f0446 KEY_TV
0x800f0447 KEY_AUDIO
0x800f0448 KEY_S
0x800f0449 KEY_CAMERA
#0x800f044a KEY_VIDEO
0x800f044a KEY_V
0x800f044c KEY_LANGUAGE
0x800f044d KEY_TITLE
0x800f044e KEY_PRINT
0x800f0450 KEY_RADIO
0x800f045a KEY_SUBTITLE
#0x800f045b KEY_RED
0x800f045b KEY_F8
0x800f045c KEY_GREEN
0x800f045d KEY_YELLOW
#0x800f045e KEY_BLUE
0x800f045e KEY_F9
0x800f0465 KEY_POWER2
0x800f046e KEY_PLAYPAUSE
0x800f046f KEY_MEDIA
0x800f0480 KEY_BRIGHTNESSDOWN
0x800f0481 KEY_PLAYPAUSE
#end file
Then in /etc/init.d/rcS I added a line:
chmod 777 /sys/class/rc/rc0/protocols
This allows me to run ir-keytable as a regular user.
Lastly in ~/.xinitrc I have the line
ir-keytable -c -w /etc/rc_keymaps/rc6_mce_myth
I found that if I had the ir-keytable line in the main startup script,
it got reset back to defaults when X started up, hance putting it in
.xinitrc
There's probably a better way to get my map loaded as default rather
than manually assigning it. Perhaps even replacing the original
/lib/udev/rc_keymaps/rc6_mce would be enough, but I like to keep my
manual mods like this away from replacing original files like that. This
seems to be working pretty well for me.
More info here: http://forum.xbmc.org/showthread.php?tid=114124 (I only
just found this, it's not neccesarily what I followed when I first did
this last year)
Best of luck,
Andrew
More information about the mythtv-users
mailing list