[mythtv] Patch to accept remote buttons as logical identifiers (was: Question regarding LIRC support...)

Navaho Gunleg navahogunleg at gmail.com
Fri Jun 2 11:10:19 UTC 2006


OK -- attached is my preliminary patch that extends LIRC support as
discussed, allowing one to assign remote buttons to key-presses, just
like the usual keys are getting assigned, and have different actions
tied to them, depending on their 'context'.

In order for this to work one needs to specify, in the lircrc-file,
logical identifiers such as irMENU for the 'Menu' button, and irGUIDE
for the 'Guide' button, etcetera. So in stead of config=M sending the
keypress 'M', this can now be configured as config=irMENU.

Additionally, I've patched MythControls to accept these identifiers.
There's still a bug in MythControl that prevents the correct display
of these identifiers because they get passed as QString( QKeySequence
) and then they're gone. A MythKeySequence can solve this -- and will
be useful in both MythTV as MythControls as the QKeySequence tends to
ignore stuff it doesn't recognize (such as the irXXX identifiers, that
could, in the future also contain the joystick, bluetooth or other
types of external pointing / input devices.). Also, this new
MythKeySequence could also accept more than 4 keys in such a
sequence....

Note that the MythControl configure script doesn't pick up MythTV's
USE_LIRC define which I /did/ use in MythControl  -- you might have to
modify the Makefile to pass -DUSE_LIRC to enable the code.

A sample lircrc has been attached as well. Note that it's still
possible to configure a keypress in stead of a irXXXX identifier; it
shouldn't break existing config. I still use non-irXXX identifiers for
Left, Up, Down and Right so those strokes always work.

Still a remaining question; that I noticed that a prefix of "remote"
is already used in MythControls.  I assume that this is reserved for
remote buttons and would like to know for sure. If this is indeed
true, I'm a gonna rename the irXXXX stuff to remoteXXXXX to be
compliant.

Have fun! :)
NG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lircrc.example
Type: application/octet-stream
Size: 3589 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060602/50cded8b/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv-lirc-patch-20060602
Type: application/octet-stream
Size: 11412 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060602/50cded8b/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythcontrols-lirc-patch-20060602
Type: application/octet-stream
Size: 3302 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060602/50cded8b/attachment-0002.obj 


More information about the mythtv-dev mailing list