[solved] Map "media keys" on HID device to MP2 actions? (1 Viewer)

Digsy

Portal Pro
August 29, 2018
207
21
54
Home Country
Great Britain (UK) Great Britain (UK)
Hopefully you are pressing Shft-P as "p" does indeed nothing.

I was using KeyRemapper to map the play/pause key on my remote to a key on my HID keyboard, and then trying to link that to MP using Input Manager. I eventually got play/pause working (the actual key I used to map to didn't really matter). However the results were very hit and miss and I was not able to successfully map all media keys using the same method.

I already knew that MP2 is designed to work with an IR MCE remote, however I don't need one of these for my main HTPC as it is simpler for me to use the mouse and keyboard, but for my bedroom setup I thought a device which was a media remote, HID keyboard and air-mouse all in one was an elegant solution, and would save having three separate devices laying around. I just assumed (wrongly) that I would be able to map all the keys on any HID device to functions within MP2 using the input manager, but it appears that while Input Manager supports the "normal" keys which you can find on a standard HID keyboard, the media and shortcut keys are not recognized. Whether this is a limitation of Windows, or an omission in MP2 I do not know.

If its not a bug in Input Manager that these keys aren't recognized, or if it is not possible to add support for them, then that's fine. I will just find a different solution, like maybe a normal wireless keyboard with a touchscreen built in.
 

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    to map the play/pause key on my remote to a key on my HID keyboard
    That would be the correct way to go if MP2 was using the HID hardware abstraction layer. As far as I can see, it is not, which may explain why you don't get the desired results.

    This part of MP2 requires an overwork. Ideally we could interest people like @Stéphane Lenclud to port the HID work that he did under MP1 to MP2. At this time - and sadly there is no indication that this will change - we are very short of developer resources. In the end it is everybody's individual choice what he/she wants to spend efforts on. The missing input support is reflected in the Feature Request section. It has gotten a little bit better with the new Input Manager, however, some global Windows media functions are not implemented in MP2. Again this is an indirect consequence of the missing full HID abstraction.

    I hope that this helps to better understand the situation.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    By the way: "P" is not Play in MP2 but "Add to playlist"...

    You can find an old Wiki entry in the MP2 section under References/Keyboard shortcuts.
     

    Digsy

    Portal Pro
    August 29, 2018
    207
    21
    54
    Home Country
    Great Britain (UK) Great Britain (UK)
    You can find an old Wiki entry in the MP2 section under References/Keyboard shortcuts.

    OK, I found this page which I guess is what you are referring to.

    But there is also this page, which suggests something different. I guess the remote button mappings are valid but the corresponding keyboard mappings are not.

    By the way: "P" is not Play in MP2 but "Add to playlist"...

    But surely I can make "P" do whatever I want using Input Manager? That's what I ended up doing last night. Play / Pause was the only media key that I managed to get working on my remote. Anyway, that doesn't matter as I am sending it back to Amazon and will hopefully get a refund :)

    That would be the correct way to go if MP2 was using the HID hardware abstraction layer. As far as I can see, it is not, which may explain why you don't get the desired results.

    Probably explains it, yes.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Ideally we could interest people like @Stéphane Lenclud to port the HID work that he did under MP1 to MP2.
    It's unlikely to happen anytime soon. I'm stuck using MP1 for now.
    Most of my work is actually part of SharpLibHid, therefore integration into MP2 would require minimal effort.
    Though if I recall well MP2 was in need of a proper events and actions framework too which is obviously a bit more work.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    The next version MP 2.2.1 will come with a new Input Manager that consumes HID events. This means that if your remote doesn't immediately run out of the box, you will nevertheless be able to map every key on your input device, be it remote, keyboard or gamepad, to any MP2 function.
     

    Users who are viewing this thread

    Top Bottom