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

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    1,998
    1,234
    Southampton
    United Kingdom United Kingdom
    Country flag
    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
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,998
    1,234
    Southampton
    United Kingdom United Kingdom
    Country flag
    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
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,998
    1,234
    Southampton
    United Kingdom United Kingdom
    Country flag
    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
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,998
    1,234
    Southampton
    United Kingdom United Kingdom
    Country flag
    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
     

    Stéphane Lenclud

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    Is BACK meant to represent BACKSPACE, or is BACKSPACE missing?
    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.
     

    Stéphane Lenclud

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,563
    1,288
    Germany Germany
    Country flag
    List Keyboard Shortcuts No Longer Work
    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.
     

    Stéphane Lenclud

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

    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).
    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.

    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:



    Should this work?
    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.
     

    Stéphane Lenclud

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

    However, both keyboard and Microsoft MCE remote do work for changing the channel in live TV. :)
    Good, I fixed that in the above changes you mentioned.

    Thank you so much for the testing and feedback.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,998
    1,234
    Southampton
    United Kingdom United Kingdom
    Country flag
    List Keyboard Shortcuts No Longer Work
    As it stands our HID implementation does not make the distinction between lower case and upper case.
    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:
    <button name="H" code="1072">
      <action layer="0" condition="*" conproperty="-1" 
        command="ACTION" cmdproperty="93"
        cmdkeychar="72" cmdkeycode="0" 
        sound="cursor.wav" />
    </button>
    
    <button name="h" code="72">
      <action layer="0" condition="WINDOW" conproperty="1002"
        command="ACTION" cmdproperty="93"
        cmdkeychar="104" cmdkeycode="0"
        sound="cursor.wav" />
      <action layer="0" condition="*" conproperty="-1"
        command="WINDOW" cmdproperty="0"
        sound="click.wav" />
    </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
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,998
    1,234
    Southampton
    United Kingdom United Kingdom
    Country flag
    What are digit supposed to be doing in TV and Radio EPG?
    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
     

    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 0
    ajs MP2Web - MP1 compatibility MediaPortal 1 20
    T MadVR + LAV Filters, Perfect in MPC-BE, Bad in MP1 MediaPortal 1 Talk 12
    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 1
    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