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,155
    414
    Munich
    Home Country
    Germany Germany
    Country flag
    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,310
    1,403
    Southampton
    Home Country
    United Kingdom United Kingdom
    Country flag
    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,155
    414
    Munich
    Home Country
    Germany Germany
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Country flag
    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,155
    414
    Munich
    Home Country
    Germany Germany
    Country flag
    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

    Similar threads

    You're right, @ajs, thank you! After enabling HID in the MP config and editing the XML file it works! (y)
    You're right, @ajs, thank you! After enabling HID in the MP config and editing the XML file it works! (y)
    Common media players like Windows Media Player and iTunes support events for playback buttons (play/pause, next track, previous...
    Replies
    2
    Views
    805
    Thanks CyberSimian, I appreciate the reply. I have the source code for both 1.12 and 1.21 so one day if I have some time I might try to compare the two and see what I can find. I do suspect that the changes could be quite extensive though. I'll update here if I figure anything out of course, and in the meantime I still have a...
    Thanks CyberSimian, I appreciate the reply. I have the source code for both 1.12 and 1.21 so one day if I have some time I might...
    Hi all. I've been running MP 1.12 for quite a while and have recently upgraded to 1.21. I now have a remote control issue which...
    Replies
    3
    Views
    676
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me over the edge for sure.;)
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me...
    We are proud to present MediaPortal 2.3 MediaPortal 2.3 is a full-blown media center software that addresses the most common user...
    Replies
    4
    Views
    2K
    • Sticky
    EPG Scroll Fix MP 1.25 includes two new actions that can be assigned to buttons on the remote control: TVGuide Next Timeblock TVGuide Prev Timeblock These actions scroll the EPG horizontally by an amount equal to the width of the EPG time window, namely 1, 2, 3, or 4 hours. Without these actions the EPG always scrolls by 3 hours...
    EPG Scroll Fix MP 1.25 includes two new actions that can be assigned to buttons on the remote control: TVGuide Next Timeblock...
    This post contains a support pack for use with the Ortek VRC-1100 and Hama 00052451 remote controls. The support pack allows these...
    Replies
    6
    Views
    3K
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common user requirements out of the box. Aside from its support for Live TV and Radio, it offers a complete media server for music, movies, and TV shows. Info is automatically downloaded from various sources to...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    Replies
    0
    Views
    829
    Top Bottom