[solved] Mapping Remote Keys (1 Viewer)

ptmurphy

Portal Member
February 16, 2011
24
0
I have been having some remote issues so went into MediaPortal configuration and set the HID remote to use extended logging. I then went into MP, used the remote, and looked at the log. I am a bit confused.

So I basically pushed every button the remote, but only some of the keys were logged, even though they work in MP.

For example, when I hit the Play/Pause button, a log entry is made...

HID: Command: 14 - MediaPlayPause

The Stop Button...

HID: Command: 13 - MediaStop

The forward and back buttons...

HID: Command: 11 - MediaNextTrack
HID: Command: 12 - MediaPreviousTrack

However, when I hit buttons like 1-9,0,Info, etc. there is nothing put in the log file. These keys all function in MediaPortal, doing the right thing (except Info), but nothing is logged. Why?

I wanted to capture the Key Number so I could mess with key mapping to fix an issue I am working on.

Note: I set my MCE (knockoff) to HID because if I don't the play, pause, etc. don't work.

Thanks for any help you can offer...
 

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    you can use autohotkey eg. to map the 0 key to output s instead you script looks like this

    Code:
    0::s

    you could add a condition that MP is active window etc.
     
    Last edited:

    ptmurphy

    Portal Member
    February 16, 2011
    24
    0
    OK, this definitely got me going in the right direction. I had never heard of AutoHotKey, so a bit of a learning curve for me tonight. Anyway, here is the script I have running in AHK to have the "0" key on the remote bring up the On Screen Display. This is a workaround for me, as I want to be able to press the "Info" button, but can't get that to work.

    Code:
    ; If the Numpad 0 key is pressed with MediaPortal windows active, send the "Y" key instead
    $Numpad0::
    IfwinActive MediaPortal
    {
    Send y
    }
    ; Otherwise, just sent the zero key
    else
    {
    Send 0
    }

    I appreciate the help!!!!
     
    Last edited:

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Glad I could help

    autohotkey is really useful and not too difficult to use

    within 15 minutes I was able to make a script that searches for the MP icon in the system tray and double clicks it if MP is minimized to tray and I press the MCe button.
     

    ptmurphy

    Portal Member
    February 16, 2011
    24
    0
    Thanks for the your help on this... really appreciated. Any way you could provide that script, or at least the part where you trigger on the MCE button. I was messing around with that last night as well, and couldn't figure out how to let AHK know that the MCE button was pressed.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    I use lmremote to launch my autohotkey script when the mce button is pressed, however you could look here for a guide on how to detect the button within autohotkey

    http://xbmccustomregis.sourceforge.net/remote_manu.html[DOUBLEPOST=1367444411][/DOUBLEPOST]win+r -> regedit

    Find (or similar)

    [ H K E Y _ L O C A L _ M A C H I N E \ S Y S T E M \ C u r r e n t C o n t r o l S e t \ S e r v i c e s \ H i d I r \ R e m o t e s \ 7 4 5 a 1 7 a 0 - 7 4 d 3 - 1 1 d 0 - b 6 f e - 0 0 a 0 c 9 0 f 5 7 d a ]

    Change this bit

    0 d , 0 0 , 0 0 , 0 0 , 0 4 , 0 5 , 2 8 , \ ; [ W i n d o w s ] - S e n d s " C t r l - A l t - E n t e r "

    ^ remap mce button in registry to ctrl alt enter, then detect ctrl+alt+enter in autohotkey script
     
    Last edited:

    Users who are viewing this thread

    Top Bottom