[Finished] [MP1-4795] Add keyboard support to HID handler (1 Viewer)

Stéphane Lenclud

Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    No keyboard HID by default

    That's intended. This version is purposely leaving the legacy keyboard handler on by default.
    This is what it looks like in the configuration after installation:

    upload_2016-10-10_21-40-39.png


    To enable it you need to tick that new option and change the profile to "full". The tool tip message explains that and the documentation should be updated accordingly too.

    Option to capture key input

    Yes that would be nice to have but that's slightly outside the scope of those changes.
    I'll possibly implement that in the next release.

    Backwards compatibility with plugins

    That's provided by leaving the legacy keyboard handler as default. If you need full compatibility with plug-ins just don't use HID keyboard.
    My plan for plug-ins to be able to take advantage of HID has been explained multiple times above in this thread.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    I would say that the branch is not fully ready for master then but keep up the good work :)

    I would say it is ready for master. It does not break anything in its default configuration and provides plenty of new features if you do use it.
    It's also a first step for further rework and consolidation. It's important to get this out-of-the-door in the main release so that we can get more and more users using it and providing feedback to keep improving it.

    See the plan as described here and quoted below:
    If testing proves successful we could decide to withdraw and remove our legacy keyboard handler over several releases much like we did for legacy MCE handler as it was replaced by our new HID handler.
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    That's intended. This version is purposely leaving the legacy keyboard handler on by default.
    This is what it looks like in the configuration after installation:
    To enable it you need to tick that new option and change the profile to "full". The tool tip message explains that and the documentation should be updated accordingly too.

    The tooltip below would suggest it might no longer work at all the legacy way as that is why I assumed it required HID setup :)

    If the users installs it and doesn't check config it might not work as before or only if they decided they decide to go the new HID keyboard route they might need to re-do any custom key mappings?

    keyboard_tooltip.PNG


    That's provided by leaving the legacy keyboard handler as default. If you need full compatibility with plug-ins just don't use HID keyboard.
    My plan for plug-ins to be able to take advantage of HID has been explained multiple times above in this thread.

    When I kept the HID keyboard option off it didn't work in the plugins as the key event didn't get triggered any more, so tried both with HID keyboard on and legacy approach.
    Will re-test again just to be sure :)

    // Update

    Disabled HID and remove my old keymap from previous testing just to be sure and indeed plugins work fine so long as you keep the HID keyboard setting off.
    Know that we talked about this a couple of times but didn't know you already added legacy support (thought it was undecided yet).

    This might create some problems for plugins if the user decide to enable it and find that it no longer processes key events but we would need more testing as I only know of the few which are maintained here that use it.
     
    Last edited:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    If the users installs it and doesn't check config it might not work as before or only if they decided they decide to go the new HID keyboard route they might need to re-do any custom key mappings?

    Only if they enable HID keyboard will legacy keyboard be disabled.
    That red warning is confusing. I'll change that and disable the "Keys and Sounds" panel if HID Keyboard is enabled.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Thanks for the feedback again guys. Here is what I came up with:

    upload_2016-10-11_1-10-3.png


    When HID Keyboard is enabled, legacy keyboard section is disabled.
    I also rephrased the deprecated label.
    New build provided.
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Perfect (y)

    With HID keyboard all the regular commands worked as they did before just with a lot more control and options, liking the way you can create multiple profiles and have all of them combined in one XML (easier to backup or share as well).

    For 1.16 we might need to test some of the internals (TV / EPG etc..) or the stock plugins that ship with it by default with both legacy (keys and sounds) and HID keyboard so would be great if we can get some testers for this before merge or indeed in pre-release as you do get a lot more feedback that way :)
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    liking the way you can create multiple profiles and have all of them combined in one XML (easier to backup or share as well).
    Actually each profile is stored in a dedicated XML file.
    However one profile can contain mapping for Keyboard, Remote, Gamepad and more... That's probably what you meant.

    For 1.16 we might need to test some of the internals (TV / EPG etc..) or the stock plugins that ship with it by default with both legacy (keys and sounds) and HID keyboard so would be great if we can get some testers for this before merge or indeed in pre-release as you do get a lot more feedback that way :)

    Indeed we need more testers. I'm sure there will be bugs or differences with HID in some situations since our keyboard handling is quite intricate.
    Hopefully most of those bugs we should be able to fix by changing the configuration.
    They should also not be seen as show stopper. If an obscure key does not work in some situation we should still contribute this to master as long as the legacy keys work the same.
    Improvements and consolidation of the HID Keyboard itself will come over several releases. We can't get everything perfect on the first try.
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi.

    Im now testing 1.16 pre, and trying hid keyboard with full profile. I made few mappings for myself, for usinf up,down,left,right in teletex to move next,prev page and subpage, but I cannot get numbers to work with fullscreen teletex

    Br
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    @te3hpurp Thanks a lot for the testing and feedback.
    It turns out you can fix that by adding the missing entries to your XML.
    I'll make sure it reaches the release.
    The missing entries are shown below in red:
    <button code="D0" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="48" cmdkeycode="0" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="48" cmdkeycode="0" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="48" cmdkeycode="0" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="6" command="ACTION" cmdproperty="80" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="25" command="ACTION" cmdproperty="80" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="80" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="2" command="ACTION" cmdproperty="80" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="603" command="ACTION" cmdproperty="80" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="3" command="ACTION" cmdproperty="80" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="58" sound="cursor.wav" />
    </button>

    <button code="D1" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="49" cmdkeycode="1" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="49" cmdkeycode="1" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="49" cmdkeycode="1" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="37" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="59" sound="cursor.wav" />
    </button>
    <button code="D2" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="50" cmdkeycode="2" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="50" cmdkeycode="2" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="50" cmdkeycode="2" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="38" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="3" command="ACTION" cmdproperty="81" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="60" sound="cursor.wav" />

    </button>
    <button code="D3" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="51" cmdkeycode="3" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="51" cmdkeycode="3" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="51" cmdkeycode="3" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="39" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="3" command="ACTION" cmdproperty="82" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="61" sound="cursor.wav" />
    </button>
    <button code="D4" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="52" cmdkeycode="4" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="52" cmdkeycode="4" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="52" cmdkeycode="4" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="40" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="62" sound="cursor.wav" />
    </button>
    <button code="D5" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="53" cmdkeycode="5" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="53" cmdkeycode="5" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="53" cmdkeycode="5" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="41" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="63" sound="cursor.wav" />
    </button>
    <button code="D6" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="54" cmdkeycode="6" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="54" cmdkeycode="6" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="54" cmdkeycode="6" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="42" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="64" sound="cursor.wav" />
    </button>
    <button code="D7" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="55" cmdkeycode="7" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="55" cmdkeycode="7" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="55" cmdkeycode="7" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="43" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="65" sound="cursor.wav" />
    </button>
    <button code="D8" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="56" cmdkeycode="8" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="56" cmdkeycode="8" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="56" cmdkeycode="8" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="44" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="66" sound="cursor.wav" />
    </button>
    <button code="D9" repeat="true">
    <action layer="0" condition="WINDOW" conproperty="602" command="ACTION" cmdproperty="93" cmdkeychar="57" cmdkeycode="9" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7700" command="ACTION" cmdproperty="93" cmdkeychar="57" cmdkeycode="9" sound="click.wav" />
    <action layer="0" condition="WINDOW" conproperty="7701" command="ACTION" cmdproperty="93" cmdkeychar="57" cmdkeycode="9" sound="click.wav" />

    <action layer="0" condition="WINDOW" conproperty="2007" command="ACTION" cmdproperty="45" sound="click.wav" />
    <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="67" sound="cursor.wav" />
    </button>

    It's actually fixing both teletext page selection and channel zapping.
     

    Users who are viewing this thread

    Top Bottom