Menu

Fix touchy remote

Help
Naoi
2008-04-14
2013-04-23
  • Naoi

    Naoi - 2008-04-14

    Hi and thank you for this cool program!

    I'm using Gizmod with a Hauppauge 350 remote and it's working fine in MythTV except it's almost always giving me double presses when I push a button, i.e. skips down two menu options when I press the down button on the remote.

    I see a function called "setDisableFirstRepeats" in the Gizmod::GizmoLIRC class reference but I don't know Python and how to best incorporate this function into the scripts.

    I tried just sticking in

    GizmoLIRC.setDisableFirstRepeats(1)

    in the 510-LIRC-Hauppauge-MythTV.py script but that gives me a bunch of errors.

    But rather than going through what I tried and (didn't work! can anyone please tell me the right way?  I searched through the wiki and other forum posts and didn't see anything on how to this.

    Thanks for any help :)

     
    • Naoi

      Naoi - 2008-04-14

      Hmmm I'm not sure why I am getting multiple keypresses, but looking at the output of gizmod -g I see the following when I hit the down button on the remote:

      [R] onEvent: LIRC -- /dev/lircd | [0000000000001795] Down <Hauppauge_350> Repeat: 0
      onEvent: Standard -- /dev/input/event1 | [EV_KEY] <KEY_DOWN> c: 0x6c v: 0x1
      ^[[BonEvent: Standard -- /dev/input/event1 | [EV_KEY] <KEY_DOWN> c: 0x6c v: 0x0

      So it looks like the remote device and the keyboard device are both sending "down" when I press the remote button?  So if I fix it where I don't get a remote and keyboard press then I won't need the "setDisableFirstRepeats" function after all?

      PS

      Just to complete my story I did have problems at first using my HOLTEK wireless keyboard, at first Gizmod was listing two keyboards and no mice (since my keyboard description is "HOLTEK Wireless Keyboard/Mouse(2.4G)" when Gizmod starts).  So I changed my GizmoDeviceStrings.py script to replace the keyboad and mouse gizmo list to:

      KEYBOARD_GIZMOS = ["/dev/input/event1"]
      MOUSE_GIZMOS = ["/dev/input/event2"]

      Now when I start Gizmod it shows both a mouse and keyboard and seems to work (other than my problem!):

      Registering Devices:

          Standard - Directory [input]
          Standard - Macintosh mouse button emulation [event0] vId: 0x1 pId: 0x1
          Keyboard - HOLTEK Wireless Keyboard/Mouse(2.4G) [event1] vId: 0x1241 pId: 0xf761
             Mouse - HOLTEK Wireless Keyboard/Mouse(2.4G) [event2] vId: 0x1241 pId: 0xf761
          Standard - PC Speaker [event3] vId: 0x1f pId: 0x1
          Standard - Power Button (FF) [event4] vId: 0x0 pId: 0x2
          Standard - Power Button (CM) [event5] vId: 0x0 pId: 0x1
              LIRC - LIRC [lircd]

      I don't see what script handles the "onEvent: Standard" , but I thought it shouldn't be called anyway if the LIRC event script handler got the event first?

      thanks again!

       
    • Naoi

      Naoi - 2008-04-15

      Well I think I figured out what's going, silly of me really ..

      With lirc and Gizmod both processing keys I was getting double key presses. 

      I experimented by setting my MythTV lircrc file to any empty file and I no longer got double entries.  Then I restored my original lircrc file then commented out the line in 510-LIRC-Hauppauge-MythTV.py that processed the down button for Gizmod and sure enough the down button was a single keypress and all others were still duplicated.

      I'm not sure atm whether to use only Gizmod or a Gizmod/lircrc mix. 

      I normally run MythTV on Desktop1 and use Desktop 2 for websurfing, etc and I wanted a way to switch from Desktop 2 to Desktop 1 with the remote and without having to pull out the keyboard.

      Anyway maybe this will help someone having the same confusion figure out what's going on :)

       

Log in to post a comment.