[mythtv-commits] Ticket #4658: Lirc Improvment

MythTV mythtv at cvs.mythtv.org
Wed Feb 13 20:40:12 UTC 2008


#4658: Lirc Improvment
-------------------------+--------------------------------------------------
 Reporter:  xavier       |       Owner:  ijr    
     Type:  enhancement  |      Status:  new    
 Priority:  minor        |   Milestone:  unknown
Component:  mythtv       |     Version:  unknown
 Severity:  medium       |     Mlocked:  0      
-------------------------+--------------------------------------------------
 Hi,

 I am trying to improve lirc support in myth:
 My goal is :
 - to be able to configure lirc without simulating QKeyEvent
 - To get ride of the .lircrc and use the socket which should make easier
 to configure (without restarting mythtv)
 - to be able to program each remote control differently (as long as their
 are not the same make)
 - Potentially each Input would be configurable individually

 This patch is just a draft.
 I implement the MythInputEvent as well as the child class MythLircEvent
 (future class could be MythKeyEvent,MythKeyExternalEvent...)
 I create the inputEvent method only in mythmenuthemed as a example.

 If well written, this patch could also make MythMainWindow unaware of the
 different kinds of InputEvent (remove some ifdef ...).

 If adopted, Widget would have to use inputEvent methods to handle it and
 get rid of the keyPressEvent

 I still need :
 - to create the MythKeyEvent (which will encapsulate a QKeyEvent) and
 redirect the main keyPressEvent to inputEvent
 - make the jump work the same way
 - replace my dirty mapping in keyContext by something else

 I am facing few problem also:
 - I am not to sure how to manage the retro compatibility, maybe by using
 the old way if a .lircrc file is found ?
 - To make this work, I have to replace all keyPressEvent method by
 inputEvent, And there is quite a lot :). Any idea to allow some kind of
 cohabitation?

 Is there a chance that such patch would be applied (when it will be
 finished and clean of course) or do I waste my time?

 The bz2 contain the diff file, the mythinputevent file and an example of
 keybindings table

 I did change my keybinding table too:
 - add a column input which should include 'keyboard', 'lirc' as retrieved
 by MythInputEvent::getInputName
 - replace the primary key on context,action,hostname by
 context,action,hostname,input

 I wonder if this primary key is a good idea as we could have a primary key
 as context,action,hostname,input,keylist and have only on bindings per row
 (in keylist i mean). The present modele us QKeySequence which have a
 limitation of 4 QKeyEvent, I don't this this limitation is a good idea. To
 have only on key per keylist would simplify the parsing too.

 No change have been done in MythControl neither, Is there any reason to
 have MythControl as a plugin ? Would be better to have this in the core,
 Each plugin/dialog/context could be configurable from their menu (may be
 in the help page). it make more sense for the user point of view and it
 would be also easier to bind a missing key quickly without quiting what
 the user is doing.

 Any review, suggestion would be a great help.


 Regards,
 Xavier

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4658>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list