Generic Keyboard/Remote Input Plugin (6 Viewers)

igalan

Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    I switched to EventGhost / Message Plugin long ago, but from time to time my Conceptronic remote doesn't respond normally and I have to press pause/play to get it back working. My guess is that something in the remote itself got stuck or something but maybe the problem is in Media Portal instead. But I'm using entirely different pluguins...
     

    Lyfesaver74

    Public Relations
  • Premium Supporter
  • September 25, 2010
    1,544
    1,122
    Texas
    Home Country
    United States of America United States of America
    Does anyone else that uses this plugin experience a loss of button mappings randomly, and only a MP restart will fix it?

    It usually happens after i have had to hold down arrow for a long time to surf thru a long list. But then mappings get lost and Back, Stop, Pause, and few others stop working.
     

    singer36

    Portal Pro
    October 11, 2006
    64
    4
    Home Country
    France France
    no... has been working like a charm here.
    Also, when i need to make a fast scroll, i use UP/DOWN page button (scrolls pages instead of items...)
     

    Markos

    Portal Member
    September 7, 2008
    11
    2
    Home Country
    Czech Republic Czech Republic
    I don't know if the version that is in downloads does, but I am using slightly modified version tailored for my remote and it works. If it won't work, I suggest to just recompile the plugin from sources with new references.
     

    raffe

    Portal Pro
    March 28, 2008
    261
    82
    There is also info in the wiki about this plugin (quote from https://forum.team-mediaportal.com/...-remote-with-back-green-button-problem.94973/ ):
    Re: Yet another MPC remote with 'back' & 'green button' problem

    Success! :D

    So far I have only tested this on my test PC at work. It has XP and home I have win7, but it looks good! EDIT: It works on Win 7 also :)

    Wiki
    I have now added all this info to the wiki:
    Generic Keyboard/Remote Input Plugin - MediaPortal Wiki

    Back button: Generic Keyboard/Remote Input Plugin
    1. I installed "Generic Keyboard/Remote Input Plugin", also called "KeyboardInputPlugin - Ruud Senden, SilentException", with MediaPortal Extension Installer ("C:\Program\Team MediaPortal\MediaPortal\MpeInstaller.exe)
    2. Start MediaPortal Configuration ("C:\Program\Team MediaPortal\MediaPortal\Configuration.exe") and go to Plugins > Keyboard Input Plugin > Config
    3. Imported Remote\MCE-Remote based mappings\Keyboard.xml
    4. Open Mappings - Generic Buttons - Back and click on Back (see no 1 in the picture under this ordered list)
    5. Click in the "Key:" text box (see no 2 in the picture under this ordered list) and then push the "Back" button on the remote. On my PC it now changes from None to Back (in "Key:" text box, see no 2 in the picture under this ordered list)
    6. Click on the Save & Close button
    keyboardmappings.jpg


    Windows button: AutoHotkey
    1. *** First I check what the Windows button sends to the PC
    2. Start MediaPortal Configuration ("C:\Program\Team MediaPortal\MediaPortal\Configuration.exe") and go to Plugins > Keyboard Input Plugin > Config
    3. Open any mapping to test Windows button (maybe Mappings - Generic Buttons - Back and click on Back (see no 1 in the picture above this ordered list)
    4. Click in the "Key:" text box (see no 2 in the picture above this ordered list) and then push the "Windows" button on the remote. On my PC it now say Alt+Win+Enter (in "Key:" text box). Write this down!
    5. Click on the Cancel button! Above was just a test, we do not want to save it! Generic Keyboard/Remote Input Plugin starts up AFTER MediaPortal has started, so it will not work when MediaPortal is not running. Thats why we need AutoHotkey (AutoHotkey - Wikipedia, the free encyclopedia)
    6. *** Now I will set up AutoHotkey to use the Windows button input to start MediaPortal
    7. Go to AutoHotkey Download and then install it (I used "Installer for AutoHotkey Basic")
    8. In the AutoHotkey.ahk script file I added this line (!#Enter = Alt+Win+Enter, info about key codes are from AutoHotkey Tutorial: Macro and Hotkey Creation and List of Keys and Mouse/Joystick Buttons for Hotkeys and Macros)
      Code:
      !#Enter::Run C:\Program\Team MediaPortal\MediaPortal\MediaPortal.exe
    9. Save and then start AutoHotkey
    10. Now the Windows button on the remote works for me, it starts MediaPortal
    All other buttons: Generic Keyboard/Remote Input Plugin & AutoHotkey
    With Generic Keyboard/Remote Input Plugin & AutoHotkey I'm sure I will get all button on my remote to work as they should, it may just take some time... Most button on the remote will probably work with Generic Keyboard/Remote Input Plugin, but if I get problems I'm sure AutoHotkey will help me fix the problems.

    Thanks raffe for all help ;)
     
    Last edited:

    fake9

    MP Donator
  • Premium Supporter
  • May 15, 2006
    40
    1
    Brugge
    Home Country
    Belgium Belgium
    Hi all,

    After a clean install of MP1.3 beta I get the following 'error' when trying to enter the configuration of the plugin via the MP configuration > Plugins.
    I love the plugin to sort out my remote and get it running smooth so any feedbck would be appreciated.

    ************** Exception Text **************
    System.ArgumentException: Item has already been added. Key in dictionary: '9' Key being added: '9'
    => See attachment for the whole error message.

    Anyone experiencing the same?
    Tom
     

    Attachments

    • ErrorKeyboardInputPlugin.txt
      12.3 KB

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Yes, there was some changes in screen names so in this plugin in InputMappingForm.cs -> public InputMappingForm(string name) method should look like this
    Code:
    public InputMappingForm(string name)
            {
                //
                // Required for Windows Form Designer support
                //
                InitializeComponent();
     
                foreach (GUIWindow.Window wnd in nativeWindowsList)
                {
                    if (wnd.ToString().IndexOf("DIALOG") == -1)
                        switch ((int)Enum.Parse(typeof(GUIWindow.Window), wnd.ToString()))
                        {
                            case (int)GUIWindow.Window.WINDOW_ARTIST_INFO:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_DATETIME:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_EXIF:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_FILE:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_FILESTACKING:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_MENU:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_MENU_BOTTOM_RIGHT:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_OK:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_PROGRESS:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_RATING:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_SELECT:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_SELECT2:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_TEXT:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_TVGUIDE:
                            case (int)GUIWindow.Window.WINDOW_DIALOG_YES_NO:
                            case (int)GUIWindow.Window.WINDOW_INVALID:
                            case (int)GUIWindow.Window.WINDOW_MINI_GUIDE:
                            case (int)GUIWindow.Window.WINDOW_TV_CROP_SETTINGS:
                            //case (int)GUIWindow.Window.WINDOW_MSNOSD:
                            case (int)GUIWindow.Window.WINDOW_MUSIC:
                            case (int)GUIWindow.Window.WINDOW_MUSIC_COVERART_GRABBER_RESULTS:
                            case (int)GUIWindow.Window.WINDOW_MUSIC_INFO:
                            case (int)GUIWindow.Window.WINDOW_OSD:
                            case (int)GUIWindow.Window.WINDOW_TOPBAR:
                            //case (int)GUIWindow.Window.WINDOW_TOPBARHOME:
                            //case (int)GUIWindow.Window.WINDOW_TVMSNOSD:
                            case (int)GUIWindow.Window.WINDOW_TVOSD:
                            case (int)GUIWindow.Window.WINDOW_TVZAPOSD:
                            case (int)GUIWindow.Window.WINDOW_VIDEO_ARTIST_INFO:
                            case (int)GUIWindow.Window.WINDOW_VIDEO_INFO:
                            case (int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD:
                            //case (int)GUIWindow.Window.WINDOW_VIRTUAL_WEB_KEYBOARD:
                                break;
                   
                            case (int)GUIWindow.Window.WINDOW_SETTINGS_SCREEN:
                            case (int)GUIWindow.Window.WINDOW_SETTINGS_SLIDESHOW:
                            case (int)GUIWindow.Window.WINDOW_SETTINGS_GUI:
                            case (int)GUIWindow.Window.WINDOW_SETTINGS_SKIN:
                            case (int)GUIWindow.Window.WINDOW_SETTINGS_SKIPSTEPS:
                                continue;
                       
                            default:
                                windowsListFiltered.Add(GetFriendlyName(wnd.ToString()));
                                break;
                        }
                    windowsList.Add(GetFriendlyName(wnd.ToString()));
                    // KBIP ADDED NEXT LINE
                    windowIdsToNameMap.Add((int)wnd, wnd.ToString());
                }
                // KBIP ADDED NEXT LINE
                UpdateWindowsForPlugins();
     
     
                foreach (MediaPortal.GUI.Library.Action.ActionType actn in nativeActionList)
                    actionList.Add(GetFriendlyName(actn.ToString()));
     
                comboBoxSound.DataSource = soundList;
                comboBoxLayer.DataSource = layerList;
                inputClassName = name;
                InitializeTreeMapping(inputClassName);
            }

    Added code is:
    Code:
    case (int)GUIWindow.Window.WINDOW_SETTINGS_SCREEN:
    case (int)GUIWindow.Window.WINDOW_SETTINGS_SLIDESHOW:
    case (int)GUIWindow.Window.WINDOW_SETTINGS_GUI:
    case (int)GUIWindow.Window.WINDOW_SETTINGS_SKIN:
    case (int)GUIWindow.Window.WINDOW_SETTINGS_SKIPSTEPS:
              continue;
     
    Last edited:

    Users who are viewing this thread

    Top Bottom