Kodi Community Forum

Full Version: Map remote control key to a plugin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to map the yellow key on my remote to start the subtitles plugin when I'm watching a video.

I know where to put keymappings but I don't know what action to write.

<FullscreenVideo>
<remote>
<yellow>WHAT TO WRITE HERE?</yellow>
...
<yellow>ShowSubtitles</yellow>

Is <yellow> a valid tag?

JR
Maybe I wasn't clear, I wan't to start the subtitle plugin for downloading subtiles.

<yellow>ShowSubtitles</yellow> only gives me the standard subtitle dialog.

And yes, <yellow> is a valid tag in my setup since that's what I named the yellow button to in lirc.

Is there any way of mapping a key to a pluging/addon?
CuBone Wrote:Maybe I wasn't clear, I wan't to start the subtitle plugin for downloading subtiles.

<yellow>ShowSubtitles</yellow> only gives me the standard subtitle dialog.

And yes, <yellow> is a valid tag in my setup since that's what I named the yellow button to in lirc.

Is there any way of mapping a key to a pluging/addon?

Try something like this instead
Code:
<FullScreenVideo>
<keyboard>
<yellow>RunScript(script.xbmc.subtitles)</yellow>
</keyboard>
</FullScreenVideo>

That will start xbmc subtitles so you can dl the sub you need. I dont know eighter if yellow is an valid name. You can also test that yellow works by adding an keypress event and check that you can see the text when pressing that button.

Code:
<yellow>Notification(Keypress, You pressed Yellow, 3)</yellow>

Cheers mate
CuBone Wrote:Maybe I wasn't clear, I wan't to start the subtitle plugin for downloading subtiles.

<yellow>ShowSubtitles</yellow> only gives me the standard subtitle dialog.

And yes, <yellow> is a valid tag in my setup since that's what I named the yellow button to in lirc.

Is there any way of mapping a key to a pluging/addon?

Yes, you want something like:

Code:
<yellow>ActivateWindow(10001,"plugin://plugin.program.mceremote/")</yellow>

This particular example runs the mceremote addon, but it's a minor edit to make it run the addon of your choice. To find out the argument to ActivateWindow add the Addon to your favourites (highlight the addon, press C and choose add to favourites) and then open favourites.xml. I'd guess you're using Linux since you mention LIRC, so the file is $home/.xbmc/userdata/favourites.xml.

JR