Kodi Community Forum
[WINDOWS] HOW-TO use MCE remote in XBMC under Windows the easy way - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: [WINDOWS] HOW-TO use MCE remote in XBMC under Windows the easy way (/showthread.php?tid=78179)



- elitegamer360 - 2010-12-04

BklynKid Wrote:Yes!!! That worked, thank you so much for your reply!

I simply uninstalled and then re-scanned and when it came back I had a Human Interface Device and after a reboot (and re-applying the .reg file) all was well!


Awesome, look at me, using my remote...! Nod Big Grin

Glad its working for you now. Laugh

Cheers,
EG.


Green button on the remote - igjunk - 2010-12-06

I maybe wrong, or perhaps someone else already suggested this, but anyway...

I think the following might work for remaping of the green button:
1. Download and install autohotkey: http://www.autohotkey.com/
2. Create a new file called greenbutton.ahk with this:
Code:
;Win-Alt-Enter is the shortcut for GreenButton
#!Enter::
    IfWinNotExist XBMC.exe ;If XBMC is shutdown
        Run %ProgramFiles%\XBMC\XBMC.exe ;Start it
        WinWait,XBMC,,5 ;wait for 5 seconds for it
        If ErrorLevel ;Display an error in case it times out.
        {
            MsgBox, XBMC Startup timed out.
            return
        }
    WinActivate ;Activate the window, in case the it's in the background.
    WinMaximize ;Maximize the window.
    WinShow ;Bring it to front.
    return
3. move that greenbutton.ahk file to startup folder of all users.

Thanks,

p.s. autohotkey also might eliminate the need to touch any registry values for the RC6 remote. If, interested, below is the link to keyboard equivalents of all MCE remote codes: http://www.byremote.com.au/Hip/mce_remote_faq.htm#MCE keyboard shortcuts


- elitegamer360 - 2010-12-06

igjunk Wrote:I maybe wrong, or perhaps someone else already suggested this, but anyway...

I think the following might work for remaping of the green button:
1. Download and install autohotkey: http://www.autohotkey.com/
2. Create a new file called greenbutton.ahk with this:
Code:
;Win-Alt-Enter is the shortcut for GreenButton
#!Enter::
    IfWinNotExist XBMC.exe ;If XBMC is shutdown
        Run %ProgramFiles%\XBMC\XBMC.exe ;Start it
        WinWait,XBMC,,5 ;wait for 5 seconds for it
        If ErrorLevel ;Display an error in case it times out.
        {
            MsgBox, XBMC Startup timed out.
            return
        }
    WinActivate ;Activate the window, in case the it's in the background.
    WinMaximize ;Maximize the window.
    WinShow ;Bring it to front.
    return
3. move that greenbutton.ahk file to startup folder of all users.

Thanks,

p.s. autohotkey also might eliminate the need to touch any registry values for the RC6 remote. If, interested, below is the link to keyboard equivalents of all MCE remote codes: http://www.byremote.com.au/Hip/mce_remote_faq.htm#MCE keyboard shortcuts

Thanks for the info but as I stated in my website and first post I would hate to run a third party application just for the "Green start button" even if the current Green start button solution is not perfect. However, Autohotkey might work but I do not want to go into it as it might require me to use another driver which is not "eHome Infrared Receiver (USBCIR)" compliant.

Not sure if you heard about this solution http://inchoatethoughts.com/launching-xbmc-with-a-windows-media-center-remote it does not require any 3rd party apps working in the background and has so many positive feedbacks in the site, so I tried it a couple of months ago but it did not work for me and caused my Windows 7 x64 to BSOD every restart.

Thank you for your suggestion though, it might help someone else who is intrested in your specific solution.

Cheers,
EG.


- igjunk - 2010-12-07

elitegamer360 Wrote:Not sure if you heard about this solution http://inchoatethoughts.com/launching-xbmc-with-a-windows-media-center-remote it does not require any 3rd party apps working in the background and has so many positive feedbacks in the site, so I tried it a couple of months ago but it did not work for me and caused my Windows 7 x64 to BSOD every restart.
It's an interesting approach, but replacing ehshell.exe is prone to problems, such as when a new patch comes out and replaces it or if one would like to use both MC & XBMC.

Personally, I would rather not mess with MC files, if possible. Using autohotkey gives you more flexibility around the behavior.

Quote:Thank you for your suggestion though, it might help someone else who is intrested in your specific solution.

Understood. Thanks for a great guide and all the hard work!


- elitegamer360 - 2010-12-08

Nothing major. I just cleaned up the mess in the first post.

Regards.


- elitegamer360 - 2010-12-10

igjunk Wrote:It's an interesting approach, but replacing ehshell.exe is prone to problems, such as when a new patch comes out and replaces it or if one would like to use both MC & XBMC.

Personally, I would rather not mess with MC files, if possible. Using autohotkey gives you more flexibility around the behavior.



Understood. Thanks for a great guide and all the hard work!

igjunk, Thank you so much Big Grin sorry for being so skeptical towards your solution. I have added your script to my first page and my site has detailed instructions for n00bs.

Now site updated, please refresh the Remote page to see the latest updates. Detailed instructions on site.

Now you can press the green start button as much as you like, if XBMC loses focus it will bring it to the front again. It will start XBMC as well. Laugh

I have updated my reg config to v1.24 the only change that I use the default MCE reg code for the Green start button "Win-Alt-ENTER". if you use my config v1.23 or any other config for that matter you do not have to download v1.24 you can just use MceRemoteMapper and remap your Green start button to (Windows-Alt-Enter) and use one of the script files on my site! 64bit and 32bit available.

The only difference between the two is the location of XBMC, if you use XBMC portable or did not install XBMC in the usual location just modify the script to the proper location of your XBMC.

Kudos to you igjunk.

Cheers,
EG.


- SvenGTC - 2010-12-11

Hello elitegamer360

first thanks for your work.

I missed one Function: Shuffle on/off - is this possible?


- elitegamer360 - 2010-12-11

SvenGTC Wrote:Hello elitegamer360

first thanks for your work.

I missed one Function: Shuffle on/off - is this possible?

No probs any time mate :-)

I am not a intense Music user my iTunes does a better job than XBMC I think Shocked I've always wanted an iTunes plugin that can read my iTunes library but no good news for me yet. Any ways back to subject!

You see when you go file mode or Library mode and select a file to play you will have a full shuffled playlist for the Album created for you, see this wiki it has every thing you need to know to make the most out of your music and playlists.

The short answer! Yes it's kinda possible Smile All you need is to edit Keyboard.xml and insert a code in it. You might need to assign two buttons or One button to achieve this, Depends on what you like really :-)

I use XML Marker in my examples, please use it to avoid errors.

One button solution:-

Say for example we want to use button "G" to shuffle music and to turn Shuffle Off, the fucntion in XBMC is Called "Random" make sure you select a letter or a letter combination that's not currently used to avoid conflicting commands.

1- Edit Keyboard.xml and on the left window tree view select + Keymap to show the full tree and then Select "MyMusicPlaylist".

2- It will highlight the proper section on the right window, for the code insert this
Code:
<g>PlayerControl(Random)</g>      <!-- Randomise playlist -->
below
Code:
<backspace>Playlist</backspace>      <!-- Close playlist -->
if you want.

3- Now Select on the Tree View "MyMusicPlaylistEditor" and insert
Code:
<g>PlayerControl(Random)</g>      <!-- Randomise playlist -->
like you did above.

4- Now Select "MyMusicFiles" and insert
Code:
<g>PlayerControl(RandomOff)</g>      <!-- Random Off Library/Files mode -->
like you did above.

5- And finaly Select "MyMusicLibrary" and insert
Code:
<g>PlayerControl(RandomOff)</g>      <!-- Random Off Library/Files mode -->

by using this method when you select a song in File or Library mode XBMC will create a Random Playlist automatically if you press G the list will be played sequently, but if you go to the playlist view and press G shuffle will be activated and every time you press G the list will be shuffled.

This is easy I think because if you are using a remote you can use one button instead of two.

Save and Close XML Marker. Enjoy XBMC.




Two button solution:-
Say for example we want to use button "G" to shuffle music and to turn Shuffle Off we will use "Ctrl-G", buttons will be working in Playlist view only so you can see the Action happening.

by now you should get the hang of XML Marker and editing xml files, I'll just give you the code and where to insert it.

In MyMusicPlaylist insert this code:
Code:
<g>PlayerControl(Random)</g>
      <g mod="ctrl">PlayerControl(RandomOff)</g>

Then in MyMusicPlaylistEditor do the same:
Code:
<g>PlayerControl(Random)</g>
      <g mod="ctrl">PlayerControl(RandomOff)</g>

Save and Close XML Marker. Enjoy XBMC.

any probs let me know.

Cheers,
EG.


- SvenGTC - 2010-12-11

wow....big thanks, great! Works well and i learnd something more about the keymap :-)

Wish you a great weekend...cheers!


- elitegamer360 - 2010-12-11

My pleasure Big Grin Have a nice weekend as well. :-)

Cheers,
EG.


- AgeOfPanic - 2010-12-12

Does anybody know a keyboard shortcut to shutdown the pc from XBMC? I'm using xbmc Commander on my iPad and waking the pc up works fine, but now I would also like to shutdown. Right now the shutdown button is assigned to S, but that shows a menu with shutdown as one of the options. I'd like to shutdown straight away.


- elitegamer360 - 2010-12-12

AgeOfPanic Wrote:Does anybody know a keyboard shortcut to shutdown the pc from XBMC? I'm using xbmc Commander on my iPad and waking the pc up works fine, but now I would also like to shutdown. Right now the shutdown button is assigned to S, but that shows a menu with shutdown as one of the options. I'd like to shutdown straight away.

Edit config.reg with note pad. replace as follows, choose between sleep or Power:

For Sleep
Code:
0c,00,00,00,03,82,00,\ ; [Power] Power button sends PC to Sleep and wakes it

For Power
Code:
0c,00,00,00,03,81,00,\ ; [Power] Power Button sends PC to shutdown

I have never tried the Power command, but it should power off your PC.

EDIT: The main idea of sending an "S" so that you can choose what to do! Close XBMC, Shutdown PC etc... as the Shutdown is configurable from within XBMC you can make it shutdown PC Exit XBMC etc etc...

Cheers,
EG.


- AgeOfPanic - 2010-12-13

Thanks elitegamer. I'm not sure how to use your method though. I use xbmc commander, an app for my iPad. It let's you assign keyboard commands, like the S command, to buttons in the menu. However, I don't see the menu after S, so I can't use it.
Therefore, I would like to assign a different command to the Shutdown button in the app, that would shutdown the pc directly. Windows is setup to use hibernate. How would I assign a keyboard command to the Power command that you posted in your reply?


- elitegamer360 - 2010-12-13

AgeOfPanic Wrote:Thanks elitegamer. I'm not sure how to use your method though. I use xbmc commander, an app for my iPad. It let's you assign keyboard commands, like the S command, to buttons in the menu. However, I don't see the menu after S, so I can't use it.
Therefore, I would like to assign a different command to the Shutdown button in the app, that would shutdown the pc directly. Windows is setup to use hibernate. How would I assign a keyboard command to the Power command that you posted in your reply?

Ahh, I understand now. I am afraid you need to contact the app developer they are the only ones who can support you. They will be able to tell you if this is possible through their app or not.

I have an iPhone I looked for the xbmc commander app but I could not find it, it doesn't matter any was you need to contact the developer directly through the app store. Some of them are really good and they respond to request and some have a twitter contact listed so try that, as I can not do anything to make an iPad app do what you want sorry.

If I found the app I could've tried it but it might be iPad only that's why I can not find it on my iPhone's app store.

Cheers,
EG.


- AgeOfPanic - 2010-12-13

Actually, the developer is on this forum. His name is grywnn and this is the topic http://forum.xbmc.org/showthread.php?tid=81018
The developer is there all the time. The thing is, the app already supports setting your own keyboard commands, eg S, to a certain button in the app. However, now I would need a keyboard command for shutdown.