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

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

  1. 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
    See JIRA ticket.
    See Dev Team forum post.
    Test installer.

    To test those changes you need to go into MP1 configuration in "Remote and Input Devices" section select the HID tab:
    • Enable "Use HID Keyboard".
    • Select "full" HID profile.

    Configuration screenshots:



    upload_2016-6-29_16-8-54.png upload_2016-6-29_15-55-18.png upload_2016-6-29_15-48-40.png upload_2016-6-29_15-54-25.png

    Corresponding HID Demo screenshot:

    upload_2016-5-5_20-54-41.png
     
    Last edited: October 30, 2016
    • Like Like x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. 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
    @Developers @Testers
    If you guys fancy testing the installer linked above you can do so.
    Though admittedly it has only some of the basic shortcuts mapped.
    So feel free to wait a bit until the whole thing is more mature.
     
  4. 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
    I'm busy porting keymap.xml to hid.full.xml.
    So I'm going through each our shortcuts in keymap.xml.
    Does anyone knows why we need both global and fullscreen shortcuts for things like: pause, stop, fastforward, rewind?
     
  5. 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
    Is anyone using our picture slide show?
    For some weird reason Enter is mapped to pause/continue instead of Space.
     
  6. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    The only difference I can see is the sound. For example, global pause is assigned "click.wav", whereas the fullscreen video and fullscreen TV pause shortcuts do not have a sound. I'm not sure if that is intentional or desired behaviour...
     
    • Thank You! Thank You! x 1
  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
    There is new version of the installer which is ready for testing.
    @Developers @Testers and especially people who usually use their keyboard to control MP please install that version and provide some feedback.
    In that version the old keyboard handler has been disabled and all keyboard handling is now done through HID.
    The final version should have an option to enable the old keyboard handler but the current one does not.
    As it is it could be that text input in search field could be broken.
    You need to set your HID profile to full.

    upload_2016-5-16_17-16-50.png

    upload_2016-5-16_17-15-11.png
     
    • Thank You! Thank You! x 2
    • Like Like x 1
  8. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Nice work!

    Just tested but for some reason I can't create a new mapping in any of the sections, it will go out of focus but not getting the option to create a new one.
    With the current setup I usually mapped a few new keys to teletext buttons as the Flirc can't send colors (only keys) :)

    key_new.png
     
    Last edited: May 16, 2016
    • Thank You! Thank You! x 1
  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
    I like it too :) been wanting to go that way from the time I first started work on HID so it's nice to see things coming together.

    You can't add new keys from the UI. I won't be adding this functionality as part of those changes. Though at some point I most likely will. What I should do for now is add "all" keyboard keys to the XML file, even those without mapping so that actions can be added to them through the UI.
    You could yourself add keys in your XML file if you want to. The button code for keyboard belongs to the Keys Enumeration.
    Through the XML file you can also define modifiers like shift and control:
    Code (XML):
    1.     <!-- TGB - Switch home -->
    2.     <button code="H" shift="false" alt="false" win="false" ctrl="false">
    3.       <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="115" sound="click.wav"/>
    4.     </button>
    5.  
    The default teletext buttons are mapped as follow in MP:
    Q = Red
    W = Green
    O = Yellow
    P = Blue
     
    • Like Like x 1
  10. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    There might be some exceptions with international keyboards (special keys / language specific) but not sure if those can automatically be added as that would make it a very long list in the XML and UI :)
     
    Last edited: May 17, 2016
    • Like Like x 1
  11. 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
    Unless we are talking about full Chinese keyboard (no idea how those would behave) most should be part of that enumeration already, look for the OEM codes notably.
    If the code is not in the enumeration one should be able to use its value rather than its name in the XML and the system should still be able to handle it.

    One can use HID Demo to find out which code your keyboard sends for each keys.

    While slightly annoying it should still work and be manageable.
     
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!