Kodi Community Forum

Full Version: Keymap a file, mce remote, windows 7
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does any know how i can keymap a .strm? I have webcam at my door that i wanna play with one press of a button. I have hotkeyed favorites list i cant seem to find out how to choose a file Sad Im using windows and a mce remote.


Solved thanks to AussieFries. http://forum.xbmc.org/showthread.php?tid=147516

Just needed to edit keyboard.xml to:
PHP Code:
<keymap>
  <global>
    <
keyboard>
      <
g mod="ctrl">PlayMedia(Path//to//file,playoffset=1)</g>
    
</keyboard>
  </global>
  <
FullScreenVideo>
    <
keyboard>
      <
g mod="ctrl">PlayMedia(Path//to//file, playoffset=1)</g>
    
</keyboard>
  </
FullScreenVideo>
</
keymap
So you can view the webcam feed if you go into Favourites and then manually choose the correct favourites entry? If so, can you post that particular favourites entry here?
Yes, i press a button, get favorites up, then i have to choose the stream. Heres how i did it:

Open notpad and write in the "datalayer" to your cam. On my wanscam it was: http://ip:port/videostream.cgi?user=username&pwd=password

Save the file as a .strm to a own folder

Add the folder to your lib just as you add other stuff. There is no need to choose content, just press ok. Enter the folder in xbmc finf the file, press c, add to favorites. Download the mce addon, find the button you want to use and keybind it to something. I have choosen shift g.

Browse for AppData\Roaming\XBMC\userdata\keymaps. Open notepad paste
PHP Code:
<keymap>
  <global>
    <
keyboard>
      <
g mod="ctrl">ActivateWindow(10025,&quot;C:\\stream\\&quot;)</g>
    </
keyboard>
  </global>
  <
FullScreenVideo>
    <
keyboard>
      <
g mod="ctrl">ActivateWindow(10025,&quot;C:\\stream\\&quot;)</g>
    </
keyboard>
  </
FullScreenVideo>
</
keymap

Save the file as keyboard.xml. Restart computer (needed for the mce addon to fix the keybinding). And your all done. (just remember to edit the path to your needs in the xml)
(2012-12-12, 02:38)hellow Wrote: [ -> ]Add the folder to your lib just as you add other stuff. There is no need to choose content, just press ok. Enter the folder in xbmc, press c, add to favorites.
This is what I want to see as requested in my previous post. Please locate your favourites.xml (wiki) file located in your userdata (wiki) directory and open it with a text editor. Locate the <favourites> statement that pertains to this item you just added to your list of XBMC Favourites. Post that statement here.

Quote:Download the mce addon, find the button you want to use and keybind it to something. I have choosen shift g.
PHP Code:
<g mod="ctrl">ActivateWindow(10025,&quot;C:stream&quot;)</g
You keymap is just assigning Ctrl+G (not Shift+G) to open a videolibrary window and display your C:\stream directory. It has nothing to do with Favourites. If you want Ctrl+G (or Shift+G) to, instead, open the favourite you saved above (via the context menu), then you'll need to do a different keymapping... that's why I'm asking to see the entry from your favourites.xml (wiki) so I can tell you what to try in your keymap instead.

(2012-12-12, 02:38)hellow Wrote: [ -> ]Enter the folder in xbmc, press c, add to favorites.

Also, you need to add the .strm file itself to favourites, not the folder in which it resides.
(2012-12-12, 03:07)artrafael Wrote: [ -> ]
(2012-12-12, 02:38)hellow Wrote: [ -> ]Add the folder to your lib just as you add other stuff. There is no need to choose content, just press ok. Enter the folder in xbmc, press c, add to favorites.
This is what I want to see as requested in my previous post. Please locate your favourites.xml (wiki) file located in your userdata (wiki) directory and open it with a text editor. Locate the <favourites> statement that pertains to this item you just added to your list of XBMC Favourites. Post that statement here.

Quote:Download the mce addon, find the button you want to use and keybind it to something. I have choosen shift g.
PHP Code:
<g mod="ctrl">ActivateWindow(10025,&quot;C:stream&quot;)</g
You keymap is just assigning Ctrl+G (not Shift+G) to open a videolibrary window and display your C:\stream directory. It has nothing to do with Favourites. If you want Ctrl+G (or Shift+G) to, instead, open the favourite you saved above (via the context menu), then you'll need to do a different keymapping... that's why I'm asking to see the entry from your favourites.xml (wiki) so I can tell you what to try in your keymap instead.


PHP Code:
<favourites>
    <
favourite name="stream">ActivateWindow(10025,&quot;C:\\stream\\&quot;)</favourite>
    <
favourite name="Webcam">PlayMedia(&quot;C:\\stream\\webcam.strm&quot;)</favourite>
</
favourites
This may be moot now that you've revised your initial post and marked this thread as "Solved". However, since you finally did post your favourite, I feel I should show you why I wanted this information in the first place and how it is relevant to your original requirement for mapping a remote control button to your webcam stream.

You previously confirmed that you are able to watch your webcam stream by choosing the appropriate item in your favourites.
(2012-12-12, 14:11)hellow Wrote: [ -> ]
PHP Code:
<favourites>
    <
favourite name="stream">ActivateWindow(10025,&quot;C:stream&quot;)</favourite>
    <
favourite name="Webcam">PlayMedia(&quot;C:streamwebcam.strm&quot;)</favourite>
</
favourites
From your favourites, we see the command to play the webcam stream is:
Code:
PlayMedia(&quot;C:streamwebcam.strm&quot;)

So, the solution is simply to use this command in your keymap:
Code:
<g mod="ctrl">PlayMedia(&quot;C:streamwebcam.strm&quot;)<g>
This is basically the same information you eventually found yourself in the thread you referenced in your revised original post. However, I just want to show that if you want to map a favourite to a keyboard/remote key, it's simply a matter of copying the relevant information from favourites.xml to a key assignment in keyboard.xml.