[mythtv-users] Looking for clarity on MythTV, to LIRC, or not to LIRC, ir-keytable, and key mappings

Roger Siddons dizygotheca at ntlworld.com
Sat Apr 21 22:39:52 UTC 2012


On Sat Apr 14 15:59:15 UTC 2012,  Ian Evans <dheianevans at gmail.com >  
wrote:

> On Sat, Apr 14, 2012 at 11:39 AM, Larry K <lunchtimelarry at gmail.com>  
> wrote:
> > Let me try this again with perhaps a more clear, direct question:
> > In the absence of lirc, how can I tell what keystrokes are being  
> received on
> > my MCE USB IR receiver? For lirc, I use irw to determine this.
> > Once I know what keystrokes are being received, again, in the absence  
> of
> > lirc, how do these get mapped to commands that myth understands? For  
> lirc,
> > I set this up the ~/.mythtv/lircrc file.

> That's exactly where I am now. My coffee-deprived brain just wants to
> know what to expect when I reboot the first time after moving to
> 11.04. Will my remote work at all? Will most commands work except
> some? And how do I fix it? unfortunately I've seen so many emails,
> blog entries, and the like about different methods that my head is
> spinning especially as some go back a few months and things have
> changed. Don't want to install a horse and buggy when everyone's gonna
> be in a car. :-)

I agree there's too much 'helpful' info out there. Allow me to add my  
own....

I set this up last week on Mythbuntu 11.10 and it's actually pretty easy.  
This page inspired me to experiment;-

http://wyliecoyoteuk.wordpress.com/2012/01/30/how-to-forget-lirc-for-mythtv-remotes/

Essentially /etc/rc_maps.cfg determines the keytable to load (equivalent  
of lircd.conf) and the keytable translates the remote scancodes into  
keycodes (equivalent of lircrc).

You'll probably find that /lib/udev/rc_keymaps/rc6_mce already lists all  
your scan codes. Otherwise you can determine them using "ir-keyable -t".  
If you create a keytable from scratch I gather the first line comment is  
important. I simply copied the appropriate one to /etc/rc_keymaps, changed  
rc_maps.cfg to pick it up and started hacking. There's no need for udev  
rules etc.

The keycode symbols used by the keytables puzzled me for a while but the  
full list is defined in /usr/include/linux/input.h. Some keys work out of  
the box (for example, numbers, UP/DOWN, VOLUME for me), many don't (OK,  
AUDIO, RED etc). I've no idea why; I guess it's a new evolving standard.  
Simply edit them to suit your Myth hotkeys, as you would lircrc.

I guess sending modified keycodes (ie. ALT+T) aren't possible because they  
lie above the 255 limit mentioned by others. On my remote I only needed 6  
hotkeys where the Myth default used a modifier (Home, TV, Video, Music,  
Pictures, Status). I also had a problem with Mute. So I just send function  
keys and added then as Myth hotkeys via Edit Keys. One of the great things  
about Myth is that you can define multiple hotkeys for each function so  
adding a new one won't screw anything else up.

When editing your keytable it's not necessary to reboot. Save it, run  
"sudo ir-keytable -vc -w <your keytable file>" and test the key in Myth.  
It shouldn't take long to do.

I hope that answers your questions and encourages you to have a go.

Here's my keytable for a Hauppuage NovaT 500 (snowboard) remote as an  
example. I use every button except Power. The comments describe the remote  
button

# table dib0700_rc5, type: RC5
0x1e00 KEY_0
0x1e01 KEY_1
0x1e02 KEY_2
0x1e03 KEY_3
0x1e04 KEY_4
0x1e05 KEY_5
0x1e06 KEY_6
0x1e07 KEY_7
0x1e08 KEY_8
0x1e09 KEY_9
0x1e0a KEY_i         # asterisk
0x1e0b KEY_W       # red
0x1e0c KEY_F7      # radio
0x1e0d KEY_M       # menu
0x1e0e KEY_GRAVE
0x1e0f KEY_F9       # mute
0x1e10 KEY_VOLUMEUP
0x1e11 KEY_VOLUMEDOWN
0x1e12 KEY_H       # prev channel
0x1e14 KEY_UP
0x1e15 KEY_DOWN
0x1e16 KEY_LEFT
0x1e17 KEY_RIGHT
0x1e18 KEY_F4      # video
0x1e19 KEY_F5      # music
0x1e1a KEY_F6      # pictures
0x1e1b KEY_S        # epg
0x1e1c KEY_F3       # tv
0x1e1e KEY_END    # next
0x1e1f KEY_ESC     # exit
0x1e20 KEY_CHANNELUP
0x1e21 KEY_CHANNELDOWN
0x1e24 KEY_HOME  # last
0x1e25 KEY_ENTER # ok
0x1e29 KEY_U         # blue
0x1e2e KEY_K         # green
0x1e30 KEY_P         # pause
0x1e32 KEY_PAGEUP # rewind
0x1e34 KEY_PAGEDOWN # ffwd
0x1e35 KEY_P         # play
0x1e36 KEY_O        # stop
0x1e37 KEY_R         # record
0x1e38 KEY_J          # yellow
0x1e3b KEY_F8       # home
0x1e3d 0                 # power
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120421/f474082c/attachment.html>


More information about the mythtv-users mailing list