[Evaluate] Default Keyboard Shortcuts (1 Viewer)

Man Pang

Portal Pro
May 25, 2015
77
45
Home Country
United Kingdom United Kingdom
Not sure if I have done this correctly but here are 2 files that I added to allow MP2 to support default keyboard shortcuts. I used WinMerge to produce a .patch file of the changes and also added the .cs file of a new class (if I attempt to create a patch to include both the changes and the new class, WinMerge crashes hence they are uploaded as separate files).

Hence:

1. Keyboard.patch contains the changes I made to existing source code
2. KeyMappings.cs.path is a new class file required for the changes (just remove the .patch extension).
 

Attachments

  • Keyboard.patch
    1.4 KB
  • KeyMappings.cs.patch
    1.4 KB

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Thanks for this patch. I will check this more in detail, as there are possible alternative ways in achieving the same result. Some other things needs to be checked as well, i.e. if the global mapping of keys does interfer with existing mappings like navigation inside media lists (jump to first entry with this letter).
     

    Man Pang

    Portal Pro
    May 25, 2015
    77
    45
    Home Country
    United Kingdom United Kingdom
    Good point. An user made effort and no feedback, I think it was forgotten.

    Looks like it is not included in version 2.1 that was released today. I will just recompile it with my code added as it appears to work correctly.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I indeed forgot about this patch, sorry.

    We need to check this more in detail, because I can imagine behavior changes due to the global key mappings. Did you try your modifications inside media list views?

    As you now bind "m" to "Key.Mute", this probably breaks navigation inside the list (usually you would jump to the first media item starting with "m").

    Would your way also work, if you move the code into an own plugin? This would be my preferred solution.
     

    Man Pang

    Portal Pro
    May 25, 2015
    77
    45
    Home Country
    United Kingdom United Kingdom
    I indeed forgot about this patch, sorry.

    We need to check this more in detail, because I can imagine behavior changes due to the global key mappings. Did you try your modifications inside media list views?

    As you now bind "m" to "Key.Mute", this probably breaks navigation inside the list (usually you would jump to the first media item starting with "m").

    Would your way also work, if you move the code into an own plugin? This would be my preferred solution.

    Ah, regarding the key mappings to be global, that should be easy to fix. I am not sure about adding it as a plugin as I strongly believe that this should be within MediaPortal 2 as keyboard navigation is very fundamental and should be indigenous to MediaPortal 2. Many users will not be able to use MediaPortal 2 without keyboard control and not everyone own an MCE Remote to control MediaPortal 2.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    I am not sure about adding it as a plugin as I strongly believe that this should be within MediaPortal 2 as keyboard navigation is very fundamental and should be indigenous to MediaPortal 2.
    Many core functions of MP 2 are provided as plugins and we simply deploy them as part of the routine setup. So providing keyboard support as a plugin would not be in conflict with what you propose from a user perspective.
     
    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    As you now bind "m" to "Key.Mute", this probably breaks navigation inside the list (usually you would jump to the first media item starting with "m").
    MP1 supports this capability in the "Videos" section, but it distinguishes the two functions by using different letter case:

    Lower case == keyboard shortcut
    e.g. "h" == go to "Home" panel.

    Upper case == jump to first item in list that begins with that letter
    e.g. "H" == jump to first item that begins with an "H" or an "h".

    MP1 will also accept multiple letters, to restrict the search even more
    e.g. "HOF" would jump to "Hoff The Record".

    -- from CyberSimian in the UK
     

    Man Pang

    Portal Pro
    May 25, 2015
    77
    45
    Home Country
    United Kingdom United Kingdom
    Many core functions of MP 2 are provided as plugins and we simply deploy them as part of the routine setup. So providing keyboard support as a plugin would not be in conflict with what you propose from a user perspective.

    I will have a look at implementing this as a plugin but I don't know when I will get the chance. For now, I am just recompiling MP2 with my changes and that is good enough for me.
     

    Users who are viewing this thread

    Top Bottom