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

Stéphane Lenclud

Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    @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.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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?
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Is anyone using our picture slide show?
    For some weird reason Enter is mapped to pause/continue instead of Space.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Does anyone knows why we need both global and fullscreen shortcuts for things like: pause, stop, fastforward, rewind?
    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...
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    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:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Nice work!
    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.

    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.
    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:
    XML:
        <!-- TGB - Switch home -->
        <button code="H" shift="false" alt="false" win="false" ctrl="false">
          <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="115" sound="click.wav"/>
        </button>

    With the current setup I usually mapped a few new keys to teletext buttons as the Flirc can't send colors (only keys) :)

    The default teletext buttons are mapped as follow in MP:
    Q = Red
    W = Green
    O = Yellow
    P = Blue
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    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:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    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 :)

    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.

    very long list in the XML and UI :)
    While slightly annoying it should still work and be manageable.
     

    Users who are viewing this thread

    Top Bottom