Generic Keyboard/Remote Input Plugin (2 Viewers)

enchant

Portal Pro
April 15, 2008
94
15
Home Country
United States of America United States of America
I've read through all the documentation that I've found, as well as this entire thread, and I'm still as clueless as my fat aunt.

I've got Keyboard.xml and KeyboardInputPlugin.dll in their proper directories.
My remote is working fine, but I'd like to remap a few keys.

In the plugin documentation, it says:

Optionally add button definitions and configure the button mappings by using the MediaPortal Setup program.

Huh?

If I open the setup program, I see a "Remote" category.
That category shows six tabs that appear to correspond to six brand name remotes. (I've got a cheap remote that I got off Ebay.)

There's a '+' next to remote. If I click on it to expand it, it lists:

USBUIRT
SerialUIR
WinLIRC
RedEye
Direct Input

I have no idea what any of these terms mean, but I can't find anything related to button mapping or button definitions anywhere in this configuration. It's like I'm using a different piece of software.

Could someone please take me step by step through reconfiguring a button on the remote to do something else? I'd be very appreciative.

If this could be done by simply editing Keyboard.xml, I'm all for that, but I could use a little advice on what to change where. Also, once I save the edited file, I assume that something has to be restarted to read in the new configuration?

Thanks for any help.
 

armyofme

Portal Pro
January 21, 2006
121
3
York
Home Country
United Kingdom United Kingdom
Hi enchant, I tried to get help with this too but I think it's been given up as a lost cause, plus I think most things can be done now through the ShortCuter plugin - have you tried that?
 

braman

Portal Member
March 20, 2008
8
2
Southampton
Home Country
United Kingdom United Kingdom
I'm not able to give a definite step by step guide at the moment as I can't check this but from what I can remember:

1. Don't look in the remote section of the MP Setup, instead goto the plugins section and find the Keyboard Input Plugin - right click and ensure this is enabled before selecting the configuration option.

2. This should give a screen with 3 buttons, the 1st one takes you to where you can add or remove buttons. The 2nd button takes you to where you can configure the actions when the buttons are pressed. And I think the last one closes the config. Please refere back to post 57 as otherwise you may have problems
 

enchant

Portal Pro
April 15, 2008
94
15
Home Country
United States of America United States of America
braman,

Thanks for the info!

There are so many possible places to go that it's easy to overlook what you actually need. I'll give this a try.

goto the plugins section and find the Keyboard Input Plugin - right click and ensure this is enabled before selecting the configuration option.
I did that and it IS enabled. After making changes, the file was saved into the custom (rather than default) directory, so I moved it back in. My changes had no effect.

After making several more changes, I did a search for keyboard.xml and deleted all instances of it. Mediaportal still came up, and my remote continued to work. So it appears that it's simply not reading the keyboard.xml that I'm editing, and since it's not generating an error, I have no idea where it's looking for it.

keymap.xml was deleted some time ago, so where is Mediaportal getting its keymap info from??
 

braman

Portal Member
March 20, 2008
8
2
Southampton
Home Country
United Kingdom United Kingdom
Did you read and take into account Post 57 in this thread?

Since RC1 it should be looking in C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\InputDeviceMappings for the keymap.xml file.
 

enchant

Portal Pro
April 15, 2008
94
15
Home Country
United States of America United States of America
Yes, I did. I noticed that it saved the file in the "custom" directory, rather than "default". So I copied it back.

I think it makes things a lot easier if I simply edit the file with a text editor. This is the edit that I make:

Changing this:
Code:
<button name="Mute" code="119">
  <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="9982" sound="click.wav" />
</button>
to this:
Code:
<button name="Mute" code="83">
  <action layer="0" condition="*" conproperty="-1" command="ACTION" cmdproperty="9982" sound="click.wav" />
</button>
Because I want it to transmit the 's' key when I hit the mute button.

Perhaps I simply need to know where Mediaportal will read it from.

Msg #57 says:
When configuring this plugin the 'Add/Remove Buttons' section saves the Keyboard.xml config file to the old location for application data (C:\Program Files\Team MediaPortal\MediaPortal\InputDeviceMappings\custom ). The Update Mapping' section however modifies the file in the new location (C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\InputDeviceMappings). Hence to add new buttons and configure the mapping I have to first add the buttons, then copy the Keyboard.xml file from the old location to the new locations, and then update the mapping.

I haven't been using the "Update Mapping" button. I tried it and didn't see anything constructive that I could do, and since I couldn't find any help on it (in this thread), I figured perhaps I shouldn't muck with it.

But I don't have a directory
C:\Documents and Settings\All Users\Application Data\Team MediaPortal

I have Mediaportal installed here: e:\program files\MediaPortal
Where should Keyboard.xml reside? It's currently here:
e:\program files\MediaPortal\InputDeviceMappings\defaults
Once I make my edits, does some other file need to be updated?
 

mmf

MP Donator
  • Premium Supporter
  • August 29, 2007
    100
    7
    Hi all,

    can someone please tell me how to configure it like this:

    - if no media is playing - > TV Guide (no overlay, >TVGuide is the main windows)

    - if media is playing - >TV Guide (as overlay with media playing in the background)

    I don't find the right settings and it's really time consuming to test through all the options.


    ATM this is working: All Layers -> No condition -> Window "TVGuide"

    :D for your help!
     

    Mercbac

    Portal Pro
    March 20, 2007
    133
    5
    Home Country
    Sweden Sweden
    Perhaps I simply need to know where Mediaportal will read it from.

    Hi Enchant

    I have this plugin running successfully, mostly because I was never able to get the Shortcuter plugin to work for me. In your case the main problem seems to be finding out where MP is trying to read the "keyboard.xml" file from. The trick that I have used many times in trying to find out what MP was doing is to use Process Monitor. It's a free tool that you can easily find with Google. Just set it to filter out all events so that it only shows you events on the parameter "path", containing "keyboard.xml", then start MP with Process Monitor in the background and the plugin enabled. If you then exit MP again, you should have an entry in Process Monitor telling where MP was trying trying to read the file from.

    Regarding the layers and conditions, I never figured out how that works, but I use this plugin to map shortcuts to things like TV series, recorded TV etc. to "CTRL-ALT + any letter" keyboard shortcuts, and those shortcuts are produced by my iMon remote driver.

    As far as setting things up I never used the config tool for the plugin in the normal way because it kept crashing on me. I only used it to figure out which numeric code had to go in the XML file for any given key-combo. It shows that live somewhere in the tool whenever you press a key. Then I just edited the XML file in notepad.

    If you need any more info, just let me know.
     

    fyford

    New Member
    October 6, 2008
    3
    0
    Double movement in Spresso clicks

    Hi buddy,

    thanks for this code its brilliant. I have an S-presso I used with mythtv for some time and now decided to give mediaportal a go. I was hoping you could clarify this clashing issue of the S-Presso remote. I have tried to disable all HID devices etc, but no luck. Left and right presses on the remote jumps two moves at a time. Clearly you had this too, but unfortunately I can't seem to figure out what else to do to fix this!

    Cheers

    F:
    thx:

    Hello Everybody,

    I haven't been very active in this forum lately, although I'm still using MediaPortal together with my KeyboardInputPlugin daily. It is nice to see that quite a few people are using this plugin, even for remotes that this plugin wasn't originally intended for (I originally created this plug-in for the Asus S-Presso remote).

    I'm currently unable to maintain the plug-in due to lack of time and lack of development environment (I switched to Linux on my main PC). So if anybody wants to update the plug-in, for example to work correctly with MP 1.0.0 RC1, Vista, to support additional key mappings (Win-key and such) and solve other problems, please feel free to do so. The source code is included for that reason ;-).

    Kind regards,
    Ruud Senden.
     

    fyford

    New Member
    October 6, 2008
    3
    0
    Hi Rsenden, sorry for the bother, I found it. It was under the local setting folder and not in the 'Program files' folder. I just deleted the duplicate file and it all works sweet now! Now I'll just have to find a way to stick 2x drives in that teeny S-presso box and Raid them... might have to go with 2.5" ones
     

    Users who are viewing this thread

    Top Bottom