MCE remote green button to start XBMC - Camelot final

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #16
iBROX Wrote:At the moment when i press stop on the remote it stops the playback, but how do i get it to close powerdvd and return to XBMC via the remote?

One other thing, is it possible that when you press the INFO button on the remote, it actually does what 'o' does in XBMC and shows all the file codec and runtime information ??

You need to work ouit what keypress is needed to close PowerDVD. I can't help here since I've never used powerDVD. Once you know the keypress you can configure one of the remote buttons to send it by editing the .reg file and reapplying it. If more than one keypress is needed (e.g. alt-F X) you'll need to program two buttons as one button can send only one keypress.

As I recall the remote-xbmc.reg file configures the Info button to send "c" and this opens the context menu. You just need to edit the .reg file toi make the key send "o" instead. Something like:

0f,00,00,00,04,00,06,\ ; Info - was "01,09,02" sends C (context menu)

change to

0f,00,00,00,04,00,12,\ ; Info - was "01,09,02" sends O

Modify the .reg file, double click it and answer OK then reboot.

JR
find quote
iBROX Offline
Junior Member
Posts: 10
Joined: Jan 2010
Reputation: 0
Post: #17
Thanks JR, that did the trick, pressing info on the remote now shows the runtime information.
find quote
floepie Offline
Member
Posts: 73
Joined: Nov 2009
Reputation: 0
Post: #18
JR, do you see this added to the main trunk any time soon? There are a few features that have been added since your modification to the "stable" camelot build that I'd like to have in addition to the mods you have made. Thanks again for your work!
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #19
floepie Wrote:JR, do you see this added to the main trunk any time soon? There are a few features that have been added since your modification to the "stable" camelot build that I'd like to have in addition to the mods you have made. Thanks again for your work!

It's all in the trunk build now :-) I've even modified the system keyboard.xml to include the MCE shortcut keys. You should find that the trunk build now works with most MCE remotes out of the box. Ironically it's only the official MS remote that needs more work, and that's only applying my .reg files to reconfigure it.

JR
find quote
mike2708 Offline
Junior Member
Posts: 13
Joined: Nov 2009
Reputation: 0
Post: #20
Hi,

I use a Hauppauge Media Center Remote Kit (model 226) - see http://www.hauppauge.co.uk/site/products...emote.html - which seems to function as a full MCE remote (claimed by Hauppauge to be a Media Center Certified Remote Control Kit, and not a cheap clone or keypress-only remote). It's available in the UK for around £30 (e.g., from AWD-IT, http://www.awd-it.co.uk/scripts/prodView...oduct=6899.

As can (just) be seen, this remote has the 4 coloured teletext buttons and a further Text buton at the bottom.

Because I want to continue to use the remote (and the green button) for Vista Media Center, I've used JHSRennie's mceremote.zip and camelot.zip mods (Camelot final release), but I've made the following mods:
- changed the power button to send s (activates Shutdown menu in XBMC)
- changed Enter (below the numbers) to send tab (to switch to fullscreen)
- programmed the coloured teletext keys to send m (OSD), i (Info), c (Context Menu), o (Codec Info) respectively
- programmed Text to send ctrl-shift-Z (for some reason, ctrl-shift-X doesn't work).

I've set up a desktop shortcut so that ctrl-shift-Z starts XBMC.

My new Remote-SendKeys.reg file is as follows:
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da]
"ReportMappingTable"=hex:\
  00,00,00,00,04,00,27,\ ; 0
  01,00,00,00,04,00,1e,\ ; 1
  02,00,00,00,04,00,1f,\ ; 2
  03,00,00,00,04,00,20,\ ; 3
  04,00,00,00,04,00,21,\ ; 4
  05,00,00,00,04,00,22,\ ; 5
  06,00,00,00,04,00,23,\ ; 6
  07,00,00,00,04,00,24,\ ; 7
  08,00,00,00,04,00,25,\ ; 8
  09,00,00,00,04,00,26,\ ; 9
  0a,00,00,00,04,00,29,\ ; Clear     - sends escape
  0b,00,00,00,04,00,2b,\ ; Enter     - sends tab (to switch to fullscreen)
  0c,00,00,00,04,00,16,\ ; Power     - was "03,82,00" sends S
  0e,00,00,00,04,00,41,\ ; Mute      - was "01,e2,00" sends F8
  0f,00,00,00,01,09,02,\ ; Info
  10,00,00,00,04,00,43,\ ; vol up    - was "01,e9,00" sends F10
  11,00,00,00,04,00,42,\ ; vol down  - was "01,ea,00" sends F9
  12,00,00,00,04,01,2e,\ ; chan up   - was "01,9c,00" sends ctrl-equals(plus)
  13,00,00,00,04,01,2d,\ ; chan down - was "01,9d,00" sends ctrl-hyphen(minus)
  14,00,00,00,04,03,09,\ ; ff        - was "01,b3,00" sends ctrl-shift-F
  15,00,00,00,04,03,05,\ ; rew       - was "01,b4,00" sends ctrl-shift-B
  16,00,00,00,04,03,13,\ ; play      - was "01,b0,00" sends ctrl-shift-P
  17,00,00,00,01,b2,00,\ ; record
  18,00,00,00,04,01,13,\ ; pause     - was "01,b1,00" sends ctrl-P
  19,00,00,00,04,03,16,\ ; stop      - was "01,b7,00" sends ctrl-shift-S
  1a,00,00,00,04,01,09,\ ; next      - was "01,b5,00" sends ctrl-F
  1b,00,00,00,04,01,05,\ ; prev      - was "01,b6,00" sends ctrl-B
  1c,00,00,00,04,02,20,\ ; # (shift-3)
  1d,00,00,00,04,02,25,\ ; * (shift-8)
  1e,00,00,00,04,00,52,\ ; up
  1f,00,00,00,04,00,51,\ ; down
  20,00,00,00,04,00,50,\ ; left
  21,00,00,00,04,00,4f,\ ; right
  22,00,00,00,04,00,28,\ ; OK (return)
  23,00,00,00,04,00,2a,\ ; back      - was "01,24,02" sends Backspace
  24,00,00,00,04,03,10,\ ; DVD menu - sends ctrl-shift-M
  25,00,00,00,04,03,17,\ ; Live TV - sends ctrl-shift-T
  26,00,00,00,04,01,0a,\ ; Guide - was "01,8d,00" sends ctrl-G
  48,00,00,00,04,01,12,\ ; Recorded TV - sends ctl-O
  5a,00,00,00,04,03,1d,\ ; Text - sends ctrl-shift-Z
  5b,00,00,00,04,00,10,\ ; Red - sends m
  5c,00,00,00,04,00,0c,\ ; Green - sends i
  5d,00,00,00,04,00,06,\ ; Yellow - sends c
  5e,00,00,00,04,00,12   ; Blue - sends o

I've also added f8, f9 and f10 to my keyboard.xml file for volume, giving:
Code:
<!-- This is an example keymap to support the standard MCE keyboard  -->
<!-- shortcuts. Place this file in your userdata\keymaps folder. If  -->
<!-- you are using portable mode (XBMC started with the argument -p) -->
<!-- the folder will be:                                             -->
<!--   "C:\Program Files\XBMC\userdata\keymaps"                      -->
<!-- or                                                              -->
<!--   "C:\Program Files (x86)\XBMC\userdata\keymaps"                -->
<!-- if you're using x64 Windows. If you aren't using portable mode  -->
<!-- the file needs to go into:                                      -->
<!--   "%APPDATA%\XBMC\userdata\keymaps"                             -->
<keymap>
  <global>
    <keyboard>
      <p mod="ctrl,shift">Play</p>
      <s mod="ctrl,shift">Stop</s>
      <p mod="ctrl">Pause</p>
      <f mod="ctrl,shift">FastForward</f>
      <b mod="ctrl,shift">Rewind</b>
      <f mod="ctrl">SkipNext</f>
      <b mod="ctrl">SkipPrevious</b>
      <f10>VolumeUp</f10>
      <f9>VolumeDown</f9>
      <f8>Mute</f8>
    </keyboard>
  </global>
</keymap>

As well as the transport functions, I can start and stop XBMC and control volume.

I hope this is useful to people with similar remotes.

Mike
find quote
floepie Offline
Member
Posts: 73
Joined: Nov 2009
Reputation: 0
Post: #21
Yes, it seems that MCE keyboard additions have been added to the system's keyboard.xml in a few of the latest builds. Thanks! I've also noticed that although my MCE remote does not send keyboard shortcuts, short of modifying the registry, XMBC now registers all music/video navigation buttons correctly. That sort of surprised me, given what I've read in the Readme.txt.

Instead of changing the values of those keys, I have just modified a few that were neither sending keyboard shorcuts nor were registered by XBMC, including the main Windows green button, which although has been changed to Ctrl Shift X, and registers as such, still does nothing within XBMC. In the reg file I have also added the 4 colored buttons, but although they are now associated with ctrl-A, ctrl-B, etc., the app ShowKey does not read any keyboard shortcuts as being sent by those colored keys.

Is there something else I can modify in the registry to force the remote to send something with those bottom keys?
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #22
floepie Wrote:including the main Windows green button, which although has been changed to Ctrl Shift X, and registers as such, still does nothing within XBMC.

ctrl-shift-X won't do anything in XBMC. The usual reason for configuring the key is so it will start XBMC. To enable that you need to edit the properties for the XBMC icon on the start menu and add ctrl-shift-X as the hotkey for the icon.

floepie Wrote:In the reg file I have also added the 4 colored buttons, but although they are now associated with ctrl-A, ctrl-B, etc., the app ShowKey does not read any keyboard shortcuts as being sent by those colored keys.

If you export the registry key and post it here I will try it on my setup to see if the colour keys work.

JR
find quote
floepie Offline
Member
Posts: 73
Joined: Nov 2009
Reputation: 0
Post: #23
OK, thanks for looking. I simply copied over the bottom 4 entries and a few other lines of your "xbmc" reg to your "send keys" reg and imported that. The colored buttons don't register anything before or after importing the modified reg key.

The reg file is here: http://www.mediafire.com/file/zemwjzi0zi...dified.reg
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #24
On the fifth line up you've missed a comma and backslash. You've put:

48,00,00,00,04,01,12 ; Recorded TV - sends ctl-O

and it should be:

48,00,00,00,04,01,12,\ ; Recorded TV - sends ctl-O

Also note that ctrl-B is already the "Replay" button.

JR
find quote
floepie Offline
Member
Posts: 73
Joined: Nov 2009
Reputation: 0
Post: #25
Yep, that worked. Thanks. As for the commands in my reg file, they are there for testing only. I have to fine tune what I want to send for each button.

I wish there were a way to go to the 'home' page with the middle green button, similar to the way it is done in both WMC and Mediaportal. Anyone know of a command that will do that?
find quote
mike2708 Offline
Junior Member
Posts: 13
Joined: Nov 2009
Reputation: 0
Post: #26
floepie,

The Clear button sends escape, which XBMC interprets as 'PreviousMenu', so you could add this to keyboard.xml so that the green button sends escape:

<x mod="ctrl,shift">PreviousMenu</x>

Also, see my earlier post (#20) in this thread where I have configured the coloured buttons.

Mike
find quote
floepie Offline
Member
Posts: 73
Joined: Nov 2009
Reputation: 0
Post: #27
Does anyone know how to configure the Teletext, Radio, Music, Pictures, and Video buttons so that they send an actual keystroke? These buttons aren't pictured in the sample remote of the download, so it may not even be possible.

Anyway, as for the green button (ctrl-shift X), I thought I could get the following to work, but it doesn't. The FullscreenVideo buttons do work as expected however.

Code:
<keymap>
  <global>
    <keyboard>
      <x mod="ctrl,shift">XBMC.ActivateWindow(Home)</x>            
    </keyboard>
  </global>
  <FullscreenVideo>
    <keyboard>
      <a mod="ctrl">ShowSubtitles</a>
      <b mod="ctrl">NextSubtitle</b>
      <c mod="ctrl">AudioDelay</c>
    </keyboard>
  </FullscreenVideo>
</keymap>
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #28
floepie Wrote:Does anyone know how to configure the Teletext, Radio, Music, Pictures, and Video buttons so that they send an actual keystroke? These buttons aren't pictured in the sample remote of the download, so it may not even be possible.

Anyway, as for the green button (ctrl-shift X), I thought I could get the following to work, but it doesn't. The FullscreenVideo buttons do work as expected however.

My MS remote has the coloured buttons but no Teletext, Radio, Music, Pictures, and Video buttons. Is your remote the official MS one or a clone? If it's an MS clone you need to know the number of the button. There is no easy way to find this out. When I wrote my article on the MS remote I constructed a .reg file wilth entries for all the possible button codes (all 256 of them!!) and manually worked through them to get the button numbers. It took **ages**.

Re the ctrl-shift-X. Start by testing with the keyboard. Get ctrl-shift-X doing something useful when you press it on the keyboard, then test it with the remote. Maybe try:

<x mod="ctrl,shift">Notification(MCEKeypress, ctrl-shift-X, 3)</x>

The "Notification" action pops up a little message at the bottom right of the screen and it's a useful way of checking your key mapping is actually doing something.

JR
find quote
floepie Offline
Member
Posts: 73
Joined: Nov 2009
Reputation: 0
Post: #29
The green button works just fine. It's just that the activatewindow(home) didn't quite work how I expected it. It only works while watching a video for whatever reason.

As for those other buttons (teletext, movies, music, etc.), which undoubtedly many others have on their MCE and MCE-like remotes that work with the MCE reg key, would you by chance still have that "test" reg file that includes all possible 256 buttons in order to determine which button is mapped with what number? I would be eternally grateful of course and would share my findings here as well. I assume what you did was to assign all 256 possibilities with unique keyboard entries. Although, it is possible that large of data table cannot be imported into registry. If not, I'll continue to tinker. Thanks...
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,236
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #30
floepie Wrote:would you by chance still have that "test" reg file that includes all possible 256 buttons in order to determine which button is mapped with what number?

I'm afraid not, sorry.

The file consisted of 256 lines:

00,00,00,00,04,00,04,\ ; 0
01,00,00,00,04,00,04,\ ; 0
...
ff,00,00,00,04,00,04,\ ; 0

i.e. it programmed all the keys to send "A". I did a binary chop i.e. I deleted lines 80 - ff and checked the target key(s) still sent A, then deleted lines 40-7f and so on until the file was down to one line. That gave me the key number. It's not that tedious as a binary chop takes only 8 iterations to pin down the key. I originally constructed the file using a quick VBScript program; I don't have that around either: sorry.

JR
find quote
Post Reply