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

Stéphane Lenclud

Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    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

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    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

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    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
    904
    231
    Rovaniemi
    Finland Finland
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    @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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    C Hauppauge HVR-1265 -- does it work with MP1? MediaPortal 1 Talk 1
    ajs MP2Web - MP1 compatibility MediaPortal 1 20
    T MadVR + LAV Filters, Perfect in MPC-BE, Bad in MP1 MediaPortal 1 Talk 13
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    C Streaming/transcoding MP2 vs MP1? General 4
    ajs [fixed] 5015: Improving the MP1 installer, providing nicer GUI :) MediaPortal 1 138
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    S Shortcuts MP1 My Recorded & TV Guide General 10
    azzuro [WiP] MP1-4999 - Big changes with many related change at once by Sebastiii MediaPortal 1 12
    ajs [Help Us!] MP1 X64 Version MediaPortal 1 20
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    wizard123 [solved] MP1 Build help MediaPortal 1 21
    ajs [News] MediaPortal 1 - 1.24 Released! News and Announcements 3
    CyberSimian [fixed] MP1-4990 : Improve horizontal scrolling in the EPG MediaPortal 1 10
    azzuro [WiP] MP1-5019: Replace MySQL with MariaDB MediaPortal 1 40
    catalpa Umsteiger von MP1: Schwierigkeiten Allgemeines Support- und Diskussionsforum 17
    CyberSimian [solved] MP1-4976 Built-in skin variables for current date MediaPortal 1 8
    rbo [solved] Umsteiger MP1 zu MP2 Allgemeines Support- und Diskussionsforum 67
    azzuro [Info] MP2 TVE inside MP1 repo MediaPortal 2 12
    G MP1 TV Server "failed to upgrade the database" using MS Sql Server Installation, configuration support 3
    lisag Can I get MP1 to open in the Recorded TV screen? MediaPortal 1 Talk 2
    M MP1 stops responding after Starting Plugins General Support 14
    R Problem with MP1 and WifiRemote Skins and Plugins Installer (MPEI) 8
    Similar threads

























    Top Bottom