Add update video library to remote
#1
I have extra buttons on my remote and wanted to add a button that will update the library when pressed.
I have a XBMC remote app on my iphone that had a update feature, I like it cause I can run the update while watching a movie etc.

Can someone help me with this?

(Before I get told. I already have my library auto update after 2 hours, but some times I want to update it on the spot. I am also aware that I can go into the menu and run the update.)
Reply
#2
Have you got your remote running by using jhsrennie or another similar reg file edited to make the remote send mce shortcuts?

If so, what button do you want to update the library. Open up showkey.exe and press the button to find out what code it is sending.

For example if you want the blue button to do it it sends <four mod="ctrl,alt">

Once you have this, create a keyboard.xml in your userdata/keymaps folder, put that code in, followed by XBMC.UpdateLibrary(Video) or XBMC.UpdateLibrary(Music), then close the line with <four> (just an example)

Overall, if you want the blue button to update the video library in any window, use this.

<keymap>
<global>
<keyboard>
<four mod="ctrl,alt">XBMC.UpdateLibrary(Video)</four>
</keyboard>
</global>
</keymap>
Reply
#3
Sorry should have said. I followed this guide to get my harmony running via Media Center keyboard -http://forum.xbmc.org/showthread.php?tid=54466&highlight=harmony+300&page=2

I was thinking that it would be good to have it on the numbered keys on the top of my remote. I guess I just need to add something so that the update gets linked to a letter on the keyboard. I can then map that to the remote.
Reply
#4
Kulprit's advice still applies.

Grab my addon from http://xbmcmce.sourceforge.net/ and install it. Press Windows-R and in the Run dialog type %appdata%\xbmc\addons\plugin.script.mceremote\resources\data\showkey.exe to run the ShowKey applet (or to save typing run %appdata%\xbmc and double-click your way to the data folder). This will show you what keypresses the buttons on your remote are sending. Then you can map that keypress to the UpdateLibrary action.

JR
Reply
#5
jhsrennie Wrote:Kulprit's advice still applies.

Grab my addon from http://xbmcmce.sourceforge.net/ and install it. Press Windows-R and in the Run dialog type %appdata%\xbmc\addons\plugin.script.mceremote\resources\data\showkey.exe to run the ShowKey applet (or to save typing run %appdata%\xbmc and double-click your way to the data folder). This will show you what keypresses the buttons on your remote are sending. Then you can map that keypress to the UpdateLibrary action.

JR

I have installed mine as a portable version, so should my keymap be in that folder somewhere?

Also if I want to map it to U (key press) should I put in something like this?

<keymap>
<global>
<keyboard>
<U>XBMC.UpdateLibrary(Video)</U>
</keyboard>
</global>
</keymap>
Reply
#6
I think that we my be crossing wires here.

My remote is setup to just emulate keyboard presses from a MCE keyboard. So the location that you are giving me does not exist. I also have no need to run Showkey any more as I already know that the button is just emulating a keyboard and pressing the "U" Key on the keyboard as it was.

So am I still meant to update this location? Maybe I have to create the file first?
Reply
#7
UserInterface Wrote:I think that we my be crossing wires here.

My remote is setup to just emulate keyboard presses from a MCE keyboard. So the location that you are giving me does not exist. I also have no need to run Showkey any more as I already know that the button is just emulating a keyboard and pressing the "U" Key on the keyboard as it was.

So am I still meant to update this location? Maybe I have to create the file first?

The user keyboard.xml isn't created automatically so you do need to create it. In a portable installation the file is:

C:\Program Files\XBMC\portable_data\userdata\keymaps\keyboard.xml

Your XML looks correct at a first glance. Just copy and paste it into your new keyboard.xml. To check it's working turn on debug logging, press u (or the remote button) a few times then look in the xbmc.log and you should see:

Code:
DEBUG: SDLKeyboard: scancode: 22, sym: 117, unicode: 117, modifier: 0
DEBUG: CApplication::OnKey: 61525 pressed, action is XBMC.UpdateLibrary(Video)

JR
Reply

Logout Mark Read Team Forum Stats Members Help
Add update video library to remote0