Kodi Community Forum

Full Version: Remap Media centre remote functions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've managed to get hold of a decent media centre remote that seems to work out of the box with XBMC.
The only problem is that i'd like to change the function of some of the buttons because currently they start Windows Media Centre when pressed.

I'd like to be able to press the media centre button and get xbmc and press the 'movies', 'music', 'tv' buttons and go to specific areas of xbmc.

how can i do that?
You can start by searching or reading the wiki on your certain remote. Your probably going to have to make some keymap.xml changes as well as use a 3rd party app like a hotkey program or eventghost.
See http://wiki.xbmc.org/index.php?title=Usi..._with_XBMC

Unless your remote is Microsoft compatible you probably can't remap the green button as it sends the keystroke windows-alt-return and Windows grabs this as a hotkey to start Media Center. There are various hacks to work around this; none entirely satisfactory.

To open e.g. movies you need to identify what keystroke the "Movies" button sends then manually edit your keyboard.xml to add a mapping for the button. Have a read of the above article then ask here when you've worked out what keystrokes your remote sends.

JR
i used your showkey program but it doesn't show anything for these function buttons (it just runs media centre)

does that mean i'm out of luck?

i'm actually intending to use a harmony 885

does this mean i can add some ir signals from unused devices and have them interpreted as commands suitable for xbmc?
is eventghost the thing i need to do that?
Greenbeast Wrote:i'm actually intending to use a harmony 885

In that case I recommend you get a Microsoft remote off eBay. The Harmony will emulate the MS remote so it will work with the MS receiver, and the MS remote is very easy to configure.

You don't say what model of remote you have. Many of the cheapo clone remotes are relatively inflexible and hard to configure, although to be fair they are cheap!

JR
Well i've literally just bought this one off ebay so i think i'll make do.
It's an asus remote, can't see a model number on it.

The receiver works with win7 built-in drivers, so surely i can give my harmony some ir codes that the computer can interpret as xbmc commands?

or is that not the case?
The key part of the remote is the receiver, since that's what receives the IR signal and converts it into something that Windows can use. Typically the cheapo remotes convert the IR signal into a keystroke i.e. Windows just sees a keypress and doesn't know or care that it started life as an IR signal.

When you teach your Harmony the IR codes from the original handset you're just emulating the original handset. The IR receiver is still in charge of processing the IR signals, and it will still convert the "Green button" signal to Win-Alt-Enter and start Media Center.

It's annoying to know that the remote you've just bought is going to hassle you, and I too would instinctively feel I'd make do with it. However my own experience is that if you curse and swear and buy a proper MS remote, the satisfaction of having it work *perfectly* for the next few years outweighs the initial irritation by miles.

JR
I tried adding the mce keyboard as a device but the commands aren't received/interpreted by the pc as keystrokes. which is a pain!

is it possible to have the number keys do different things depending on where you are?
I like the 'jump to position' functionality while playing a video. so perhaps i can have the number keys jump to different parts of xbmc when not playing a video?
Greenbeast Wrote:I tried adding the mce keyboard as a device but the commands aren't received/interpreted by the pc as keystrokes. which is a pain!

Just on the off chance that your remote is MS compatible see http://wiki.xbmc.org/index.php?title=Usi...in_Windows. If your registry has the keys mentioned in the article it would be worth trying the reg changes described. You can download the .reg files and other useful stuff from xbmcmce.sourceforge.net.

Greenbeast Wrote:is it possible to have the number keys do different things depending on where you are?
I like the 'jump to position' functionality while playing a video. so perhaps i can have the number keys jump to different parts of xbmc when not playing a video?

Yes, the keyboard.xml file has separate sections and you can define the same key differently in different sections. Have a browse through wiki.xbmc.org for info on how to do this and have a play. Backup your original keyboard.xml first so you can easily restore it if things go pear shaped.

JR
excellent, thanks for your help
There was a program that would tell you what a keypress was. Any idea what it was called? Also where did they hide the keymap in dharma on XBMC LIVE?
For Windows you may be thinking of ShowKey from http://xbmcmce.sourceforge.net/

On XBMC Live the userdata keymap, i.e. the only one you should edit, should be created in $home/.xbmc/userdata/system/keyboard.xml. There is no userdata keymap by default. If you're thinking about the system keymap it's in /usr/share/xbmc/system/keymaps.

JR
jhsrennie Wrote:For Windows you may be thinking of ShowKey from http://xbmcmce.sourceforge.net/

On XBMC Live the userdata keymap, i.e. the only one you should edit, should be created in $home/.xbmc/userdata/system/keyboard.xml. There is no userdata keymap by default. If you're thinking about the system keymap it's in /usr/share/xbmc/system/keymaps.

JR

Dont you just replace functionality in the keyboard.xml or do you simply place only the commands you want to remap in that file in the userdata
Numus Wrote:Dont you just replace functionality in the keyboard.xml or do you simply place only the commands you want to remap in that file in the userdata

Place only commands you want to remap or add. So if you want to redefine P to mean Pause, your keyboard.xml would contain just the one entry for <p>.

XBMC reads the system keyboard.xml first, then it reads the userdata keyboard.xml. That means that any definitions in the userdata file will overwrite those in the system keymap.

JR