[Finished] - [MP1-4795] Add keyboard support to HID handler | Page 6

Discussion in 'Area 51 - Testing Area' started by Stéphane Lenclud, April 29, 2016.

  1. CyberSimian
    • Team MediaPortal

    CyberSimian Test Group

    Joined:
    June 10, 2013
    Messages:
    1,645
    Likes Received:
    542
    Gender:
    Male
    Location:
    Southampton
    Ratings:
    +962 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. CyberSimian
    • Team MediaPortal

    CyberSimian Test Group

    Joined:
    June 10, 2013
    Messages:
    1,645
    Likes Received:
    542
    Gender:
    Male
    Location:
    Southampton
    Ratings:
    +962 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
    • Thank You! Thank You! x 1
  4. CyberSimian
    • Team MediaPortal

    CyberSimian Test Group

    Joined:
    June 10, 2013
    Messages:
    1,645
    Likes Received:
    542
    Gender:
    Male
    Location:
    Southampton
    Ratings:
    +962 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
    • Thank You! Thank You! x 1
  5. CyberSimian
    • Team MediaPortal

    CyberSimian Test Group

    Joined:
    June 10, 2013
    Messages:
    1,645
    Likes Received:
    542
    Gender:
    Male
    Location:
    Southampton
    Ratings:
    +962 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
    • Thank You! Thank You! x 1
  6. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    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.
     
  7. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    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.
     
  8. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    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.

    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.

    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.
     
  9. Stéphane Lenclud
    • Team MediaPortal

    Stéphane Lenclud Development Group

    Joined:
    April 29, 2013
    Messages:
    2,562
    Likes Received:
    657
    Gender:
    Male
    Ratings:
    +1,270 / 8
    Home Country:
    Germany Germany
    Show System Specs
    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?

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

    Thank you so much for the testing and feedback.
     
  10. CyberSimian
    • Team MediaPortal

    CyberSimian Test Group

    Joined:
    June 10, 2013
    Messages:
    1,645
    Likes Received:
    542
    Gender:
    Male
    Location:
    Southampton
    Ratings:
    +962 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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 (Text):
    1. <button name="H" code="1072">
    2.   <action layer="0" condition="*" conproperty="-1"
    3.     command="ACTION" cmdproperty="93"
    4.     cmdkeychar="72" cmdkeycode="0"
    5.     sound="cursor.wav" />
    6. </button>
    7.  
    8. <button name="h" code="72">
    9.   <action layer="0" condition="WINDOW" conproperty="1002"
    10.     command="ACTION" cmdproperty="93"
    11.     cmdkeychar="104" cmdkeycode="0"
    12.     sound="cursor.wav" />
    13.   <action layer="0" condition="*" conproperty="-1"
    14.     command="WINDOW" cmdproperty="0"
    15.     sound="click.wav" />
    16. </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
     
  11. CyberSimian
    • Team MediaPortal

    CyberSimian Test Group

    Joined:
    June 10, 2013
    Messages:
    1,645
    Likes Received:
    542
    Gender:
    Male
    Location:
    Southampton
    Ratings:
    +962 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!