[solved] HID commands are not processed when multiple applications with HID support are open (1 Viewer)

horned_reaper

Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Thanks for your replies.

    In my case iTunes permanently runs to backup my iPhone since I don't want to have my data in the cloud.
    Hence, in my case closing iTunes for HID commands to work with MediaPortal isn't a solution.

    Is there a way to override/intercept HID commands system-wide?
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    Is there a way to override/intercept HID commands system-wide?
    The AutoHotKey tool can be used to filter and/or modify keystrokes.

    For the "Centarea HID" support pack, I provided an AutoHotKey script to improve usability (it was my first ever AutoHotKey script!). The script checks if the window with the focus is the MP client, and then checks for specific keystrokes, and performs specific processing for them. The bulk of keystrokes pass straight through without change. However...

    The question (to which I don't know the answer) is whether iTunes steals the keystrokes before the AutoHotKey script sees them. If iTunes does this, AutoHotKey is not a solution.

    I think that you should browse the AutoHotKey forum, and look for threads dealing with keystrokes in WMC. Since WMC suffers the same problem, this problem may already have been solved. There are also sample scripts on that web site, and there may be one for WMC. If there is, it probably needs only minor changes to work with MP.

    If there are no relevant threads or sample scripts, you should ask a question on that web site. Explain the problem, and then ask whether AutoHotKey is capable of solving that problem. An AutoHotKey expert should be able to answer "yes" or "no" immediately. If you are lucky, he may even provide some sample code for you to try. If you are unlucky, you may have to learn AutoHotKey programming yourself.

    Another possibility is the tool EventGhost. I think that it works at a similar level to AutoHotKey, but as I have never used it I don't know whether it could do what you want.

    -- from CyberSimian in the UK
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Thank you for this valuable note!
    I've been using EventGhost for a long time and I'm pretty sure that it can react on events but not intercept them.
    But AutoHotKey can. Nice hint, thank you very much! (y)
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    yes, we updated latest 3rd party lib for HID
    Did you?

    Is there a way to control which application handles HID commands or at least for MediaPortal to react on HID commands even if other applications with HID support are open?

    If MP1 is still using SharpLibHid there is a way in the code to make it so that MP1 will always receive HID events. So in theory we could implement a setting option to do something like that.
    Is there no option in Windows Media Player and iTune to tell them not to handle HID events when in the background? It looks like they are stealing those events from MP1.
     
    Last edited:

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Unfortunately the option to not handle HID events is missing in Windows Media Player and iTunes, and I found no solution on the web.
    However, if both applications are open, both handle HID events, but MediaPortal not. So I'm not sure if the other applications really "steal" those events or if MediaPortal simply doesn't handle HID events if they are processed by other applications.
     

    Users who are viewing this thread

    Top Bottom