[Finished] [MP1-4795] Add keyboard support to HID handler (2 Viewers)

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    I have installed a recent build of 1.16 pre, and briefly tested the support for the Ortek/Hama:

    (1) Using my "Centarea HID.xml" file and the matching AutoHotKey script, MP 1.16 behaves the same as MP 1.12, so there do not seem to be any compatibility problems for users continuing to use "Centarea HID". :)

    (2) I then disabled "Centarea HID" and enabled "HID", also selecting "Use HID keyboard" and profile="Full". A few buttons on the Ortek/Hama worked correctly (LEFT, RIGHT, UP, DOWN, OK, ENTER, CLOSE, BROWSER, PLAY/PAUSE, STOP). :) But other buttons did nothing. :(

    One difficulty was the "return to previous panel" button. On the Ortek/Hama, this is implemented as the BACKSPACE keyboard key, but there does not seem to be an entry for it in the config file. There is an entry for BACK, but I was not convinced that that corresponds to the BACKSPACE key on the keyboard. :confused:

    Is BACK meant to represent BACKSPACE, or is BACKSPACE missing? Thanks.

    -- from CyberSimian in the UK
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    I have been looking into getting the Ortek/Hama to work with the new HID support (no success there yet :(), but I have also been looking at the keyboard support and Microsoft MCE support. I noticed this problem this morning:

    List Keyboard Shortcuts No Longer Work
    In MP, keyboard shortcuts are case sensitive:

    (a) Lower case letters select specific windows (e.g. "h" selects the "Home" panel). These work correctly.

    (b) Upper case letters select from a list the first item that begins with that letter. More than one letter can be specified, so for example in "Recorded TV" or "Videos", if I specify "N", the focus is moved to the first item that begins with "N". If I specify "NEWS", the focus moves to the first item that begins "NEWS" or "News" or "NeWs or ... (the match is not case sensitive). The characters typed replace the folder name near the top of the panel. This facility does not work with the new HID support.

    (Aside: it does still work with "Centarea HID"!)

    -- from CyberSimian in the UK
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    Customising START Button Has No Effect
    I tried to customise the action of the START button on the Microsoft MCE remote, but could not get it to work.

    The Ortek/Hama has a button labelled CLOSE, and by default it sends ALT_F4 (i.e. immediate exit). In the "Centarea HID" I have defined this to invoke the SHUTDOWN action (it displays a pop-up menu with a list of choices).

    Microsoft MCE does not have a dedicated CLOSE button, so I tried to define the action of the START button to invoke the SHUTDOWN action if the user was already on the "Home" panel. This is the definition that I created, but it does not work:

    shutdown_via_green_button.jpg

    Should this work?

    -- from CyberSimian in the UK
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    Numeric Digits Don't Work In TV EPG Or Radio EPG
    I noticed that @Stéphane Lenclud had provided some additional definitions for the numeric digits, so I included those in the XML file for the "Full" definition in "InputDeviceMappings".

    Unfortunately the numeric digits do not work in either the TV EPG or the Radio EPG. I tried both a keyboard and a Microsoft MCE remote, and neither worked in the EPG. :(

    However, both keyboard and Microsoft MCE remote do work for changing the channel in live TV. :)

    -- from CyberSimian in the UK
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Is BACK meant to represent BACKSPACE, or is BACKSPACE missing?

    BACK is not BACKSPACE those are different keys altogether.

    The full keyboard profile is not intended to work nicely with your Hama remote. However if we can get some mapping that works for it then we should add in to our default profiles.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    List Keyboard Shortcuts No Longer Work
    Could you be more specific as to what is not working as before? I'm not familiar with that shortcut.

    As it stands our HID implementation does not make the distinction between lower case and upper case. However you can check for the SHIFT modifier if that's what you are looking for.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Customising START Button Has No Effect
    I tried to customise the action of the START button on the Microsoft MCE remote, but could not get it to work.

    That's odd. It should work just fine given the proper hardware. You can use the HID Demo to see if your remote is sending the key you think it's sending. It could also be a misconfiguration of the associated action or condition.

    The Ortek/Hama has a button labelled CLOSE, and by default it sends ALT_F4 (i.e. immediate exit). In the "Centarea HID" I have defined this to invoke the SHUTDOWN action (it displays a pop-up menu with a list of choices).

    ALT + F4 could be problematic as it's possibly intercepted by the framework before it reaches our HID handler.
    This should be fixed though at some point so that even ALT + F4 is not hard coded and could be overridden.

    Microsoft MCE does not have a dedicated CLOSE button, so I tried to define the action of the START button to invoke the SHUTDOWN action if the user was already on the "Home" panel. This is the definition that I created, but it does not work:



    Should this work?

    It should work. Here it seems you want GreenStart to execute the shutdown action if you are in the Home screen. Maybe there is a problem with the condition as I know we have multiple Home screens so you might want to look into that. Try your action without condition first to see what you get.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Unfortunately the numeric digits do not work in either the TV EPG or the Radio EPG. I tried both a keyboard and a Microsoft MCE remote, and neither worked in the EPG. :(

    Looks like you found some more missing mapping. I'll have to add them too.
    What are digit supposed to be doing in TV and Radio EPG? Do they just zap to channels like when in full screen?

    However, both keyboard and Microsoft MCE remote do work for changing the channel in live TV. :)

    Good, I fixed that in the above changes you mentioned.

    Thank you so much for the testing and feedback.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    List Keyboard Shortcuts No Longer Work
    As it stands our HID implementation does not make the distinction between lower case and upper case.
    That may well be the problem.

    In the "Centarea HID.xml" file, there are entries both for lower case letters and for upper case letters. Example: for the "H" and "h" keys (the latter includes the shortcut for the "Home" panel):

    Code:
    <button name="H" code="1072">
      <action layer="0" condition="*" conproperty="-1" 
        command="ACTION" cmdproperty="93"
        cmdkeychar="72" cmdkeycode="0" 
        sound="cursor.wav" />
    </button>
    
    <button name="h" code="72">
      <action layer="0" condition="WINDOW" conproperty="1002"
        command="ACTION" cmdproperty="93"
        cmdkeychar="104" cmdkeycode="0"
        sound="cursor.wav" />
      <action layer="0" condition="*" conproperty="-1"
        command="WINDOW" cmdproperty="0"
        sound="click.wav" />
    </button>


    For "H", the ASCII code for "H" is simply passed through.
    For "h", the ASCII code for "h" is passed through if the current panel is the on-screen keyboard, otherwise the "Home" panel is invoked.

    The problem is that this is not new function -- the list shortcuts have existed in earlier releases of MP. If you use MP primarily with a remote control, you probably don't use list shortcuts (this is my situation). But if you use MP in a window on a laptop or desktop system, you may well have become accustomed to using list shortcuts, and (probably) won't look favourably on a release of MP that takes them away. :mad: So I think that they need to be added. :)

    -- from CyberSimian in the UK
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    What are digit supposed to be doing in TV and Radio EPG?
    In the TV and Radio EPGs, the numeric digits move the focus to an EPG cell for the channel specified. If that channel is not currently in the visible part of the EPG. the EPG is scrolled to position that channel on the screen.

    Looking at my notes for the "Centarea HID", I see that there is some difficulty with respect to the "0" (zero) button. In MP 1.12, using either the keyboard or a Microsoft MCE remote, entering "0" in the EPG resets the size of the EPG timeblock to its default size. This assumes (of course) that there is never a channel with a number of zero, and that users won't want to select a channel by typing leading zeros (e.g. type "0101" in order to select channel "101").

    The problem is that I could not get this special function of "0" to work with the "Centarea HID", so that capability is not supported by the "Centarea HID". It will be interesting to see if General HID has the same problem (perhaps we will be able to find a solution!).

    There is an MP function called "Default Timeblock" that can be assigned to any key or button, and that definition can be made to apply only to the TV and Radio EPGs, so it need not consume a button elsewhere within MP. So absence of "0" performing this function would not be terminal -- the capability would still be available, but accessed differently.

    -- from CyberSimian in the UK
     

    Users who are viewing this thread

    Top Bottom