MP 1.12: Changing from Centarea Remote to Generic HID - how to map Buttons properly? (2 Viewers)

Herr R aus B

MP Donator
  • Premium Supporter
  • December 22, 2007
    241
    28
    Berlin
    Home Country
    Germany Germany
    Hello!

    Upgrading to MP 1.12 gives me some trouble using my remote controls and defining the proper button codes in the proper configuration files.

    Context:

    I am using MP 1.12 clients on several different machines - especially using different remote controls:
    So far everything worked pretty fine with the modified Centarea HID.xml config files attached below.

    Issue:

    After upgrading to 1.12 enabling the Centarea HID in the MP congfig tool makes everything work as before - valid for both remotes under Windows 7 and Windows 10. But as soon as the Centarea HID is enabled, the regular keyboard isn't working properly anymore - at least not when using the virtual keyboard dialog to enter text, for instance when searching YouTube in OnlineVideos.

    Almost all alphanumerical key strokes are being ignored, same goes for keys 0 - 9 etc. Obviously only basic keys like "enter", "escape", "back", "space" are recognized. Disabling the Centarea HID in the MP config file brings back the regular keyboard, but of course the remote control then is being ignored or at least largely disfunctional.

    Solution attempt (failed):

    I have been searching the forums and the wiki. The only hint I've got so far is, that all the Centarea and MCE stuff is being depricated and using the Generic HID is recommended in almost all cases for using MP with generic remotes claiming to be MCE compatible.

    Well! o_O

    So far so good, but that wouldn't help me as both of above listed remotes don't work properly with the Generic HID definitions. Some buttons are recognized, some are ignored, some are unproperly assigned (channel up turns volume to maximum, channel down mutes volume, colored buttons don't do anything, number keys are being ignored, etc).

    The next step would be to adjust the config file. So what I did is replacing the button mappings in the Generic HID configuration file with the button mappings from my old Centarea HID configuration file - see attached file.

    Does it work? Of course not! (y)

    Support request:

    Where am I supposed to put these mapping definitions and how are they supposed to look like - judged from how the Generic HID configuration file looks, these button mappings should be correct. But obviously they are not.

    So how to proceed to solve this problem?


    Any feedback, hints, solutions will be apreciated and I shall be very happy - not only me btw. There are some more ppl I know of experiencing this and certainly many more, I don't know of :)

    Btw: Is there any "official" way to keep track of the key presses respectively the button codes as MP receives them? I could read them using lirc, but that of course would give me some weird hex codes, that wouldn't tell me, how MP interprets them. I know that back in the day, when I started fiddling around with the Centarea definitions I had to record all button codes from the MS Tech remote and there was a tool - but I can't remember which as this was years ago...

    Regards and thanks in advance

    Axel
     

    Attachments

    • MS Tech 1200 Centarea HID.xml
      12.6 KB
    • HAMA Remote Centarea HID.xml
      14 KB
    • HAMA Remote Generic-HID.xml
      22.5 KB
    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    But as soon as the Centarea HID is enabled, the regular keyboard isn't working properly anymore - at least not when using the virtual keyboard dialog to enter text, for instance when searching YouTube in OnlineVideos.
    I have the Hama version of this remote, although I prefer to use a One-for-All programmable remote that sends Microsoft MCE RC6 signals.

    The problem with the Hama remote is that it transmits keyboard shortcuts for Windows Media Center; it does not transmit keyboard shortcuts for MediaPortal. Now, some of those keyboard shortcuts are identical between WMC and MP, so those buttons should work; but the remainder will not.

    I would guess that the effect of enabling the Centarea HID is to translate WMC keyboard shortcuts into MP keyboard shortcuts, so that all buttons on the Hama work as expected. But I would imagine that those keyboard translations would also affect normal keyboard input. (Windows sees the Hama as a keyboard plus a mouse.)

    Well, that exhausts my knowledge. :( This needs @Stéphane Lenclud to explain how the Hama remote works with Generic HID!

    -- from CyberSimian in the UK
     

    Herr R aus B

    MP Donator
  • Premium Supporter
  • December 22, 2007
    241
    28
    Berlin
    Home Country
    Germany Germany
    I cant see any explaination regarding the above described issue in Stephane's postings... maybe I am just too ignorant? :)
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    But as soon as the Centarea HID is enabled, the regular keyboard isn't working properly anymore - at least not when using the virtual keyboard dialog to enter text, for instance when searching YouTube in OnlineVideos.

    Weird, not sure what could have caused that regression. Was it introduced between 1.11 and 1.12?
    The HID rework was already there in 1.11.
    1.12 was about gamepad support and cleanup really.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Some buttons are recognized
    That's already something :)

    Btw: Is there any "official" way to keep track of the key presses respectively the button codes as MP receives them? I could read them using lirc, but that of course would give me some weird hex codes, that wouldn't tell me, how MP interprets them. I know that back in the day, when I started fiddling around with the Centarea definitions I had to record all button codes from the MS Tech remote and there was a tool - but I can't remember which as this was years ago...

    I'm not sure how to do that either. EventGhost maybe? @Sebastiii

    If your remote is sending keyboard shortcuts you probably need to edit the MP shortcuts to whatever your remote is sending.
    If your remote is sending proper HID code they will be interpreted as per default or custom HID config.

    I've attached the HID demo program, maybe it can help you understand which HID and Keyboard shortcut your remote is sending.
    Use the Tests tab to see which keyboard key is being sent, however it does not help with modifiers such as ALT and CTRL.

    See also:
    WMC shortcuts: http://windows.microsoft.com/en-us/windows/media-center-keyboard-shortcuts#1TC=windows-7
    MP shortcuts: http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/20_Reference/Keyboard_Shortcuts

    For the latest HID Demo checkout this thread.
     

    Attachments

    • HID-demo.zip
      29.2 KB
    Last edited:

    Herr R aus B

    MP Donator
  • Premium Supporter
  • December 22, 2007
    241
    28
    Berlin
    Home Country
    Germany Germany
    Salut!

    Yes - the problem occurred after upgrading from 1.11 to 1.12 and I am not the only one to experience that.

    btw. "EventGhost" rings a bell - but actually it's terribly hot in Germany right now and I'll deferr that until the weekend :) Any further recommendations or hints would be appreciated - I'll update this, when I've got new results. This HID demo tool might also come in handy - on va voir :)

    But to make this a systematical approach: Where inside the Generic-HID.xml would one define the remote codes? There are three sections - as you can see in the above attached file I used the MCE Section (the middle one) with absolute no effetc.

    Regards

    Axel
     
    Last edited:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    remote codes
    Not sure exactly what you are looking for. Some HID usage are defined there.
    You can also use decimal or hex values as reported by HID demo if the human readable variant is not defined in the source code.
    However you most certainly won't be able to use the codes from the Centarea XML. Though to be fair I have no clue how the Centarea driver is implemented.

    it's terribly hot in Germany right now
    Nasty lightning storm in Würzburg at the moment.
     

    Herr R aus B

    MP Donator
  • Premium Supporter
  • December 22, 2007
    241
    28
    Berlin
    Home Country
    Germany Germany
    But to make this a systematical approach: Where inside the Generic-HID.xml would one define the remote codes? There are three sections - as you can see in the above attached file I used the MCE Section (the middle one) with absolute no effetc.
    Anyways - is there an answer to this question?

    Regards

    Axel
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    Use the Tests tab to see which keyboard key is being sent, however it does not help with modifiers such as ALT and CTRL.
    A year or two ago I tried to create an AutoHotKey script to enable the Ortek/Hama remote to be used with MP. This was only partly successful, because I found AutoHotKey a very difficult tool to understand. :confused: However, I did manage to identify and map about half of the Ortek/Hama buttons.

    The Ortek/Hama remote uses the MEDIA functions for some buttons, CTRL_SHIFT_xxx combinations for others, NUMPAD keys for the numeric digits, and a selection of other single keys. If the Test tool cannot handle CTRL/SHIFT/ALT, the results from using it may be misleading. :(

    I don't know how to create an XML table, so I will use the following simple list to describe the Ortek/Hama buttons that I was able to identify:

    button=DVD; hama sends=CTRL_SHIFT_M; mp expects=D
    button=FAST REWIND; hama sends=CRTL_SHIFT_B; mp expects=F5
    button=FAST FORWARD; hama sends=CTRL_SHIFT_F; mp expects=F6
    button=SKIP BACK; hama sends=MEDIA_PREV; mp expects=F7
    button=SKIP FORWARD; hama sends=MEDIA_NEXT; mp expects=F8
    button=STOP; hama sends=MEDIA_STOP; mp expects=B
    button=PAUSE/RESUME; hama sends=MEDIA_PLAY_PAUSE; mp expects=SPACE
    button=RECORD; hama sends=CTRL_R; mp expects=R
    button=BACK; hama sends=BACKSPACE; mp expects=ESCAPE
    button=INFO; hama sends=MOUSE BUTTON 2; mp expects=Y
    button=VOLUME UP; hama sends=VOLUME_UP; mp expects=+
    button=VOLUME DOWN; hama sends=VOLUME_DOWN; mp expects=-
    button=MUTE; hama sends=VOLUME_MUTE; mp expects=M
    button=START; hama sends=WIN_ALT_ENTER; mp expects=???
    button=1; hama sends=NUMPAD_1; mp expects=1 (similar for all digits)
    button=ASTERISK; hama sends=NUMPAD_MULT; mp expects=*

    I also noticed that the Ortek/Hama does not correctly nest key presses with shift presses. For example, the DVD sequence is:

    CTRL down
    SHIFT down
    M down
    CTRL up
    SHIFT up
    M up

    However, this probably does not matter, as keyboards have to be typamatic, and hence have to respond to the key press and not the key release.

    -- from CyberSimian in the UK
     

    Users who are viewing this thread

    Top Bottom