Kodi Community Forum

Full Version: Custom remote code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
okay.. i don't get it! i wanted to be able to shutdown the xbox from anywhere (on the xbox) with one key on the remote.. the power off-key.

i do have a custom remote (kameleon) which can talk xbox. since there are more keys on the remote mediacenter does not use, i used the <displayremotecodes> tag to get the keys i wanted to use. the off button generates id 42 on screen. so i thought it was simple and entered the following statement in the global selection of keymap.xml:

<action>
<description>shutdown power</description>
<id>xbmc.shutdown()</id>
<remotecode>42</remotecode>
</action>

but now when i press the off key, nothing happens :oops:

one thing that may me important, i use xbmc as my dash and the default.xbe (renamed to evoxdash.xbe) and xboxmediacenter.xml reside on my c:\ partition...
buttoncode 42 is display on the normal remote i believe.
i have the same remote and i was doing something very similar... what i came to realize is that the remote codes that you need to put into keymap.xml are (255 - display code). thus, for the power key (display code 42), it would be 213
this is not correct (at least from looking at the source code).

the buttoncode that is displayed is the one that is needed in keymap.xml. that's the whole point of <displayremotecodes>.

i just tested by replacing the <remote>display</remote> references in keymap.xml with <remotecode>42</remotecode> and enabled <displayremotecodes>. the displayed remote code was 42, and it worked perfectly as display.

thus, i conclude that if you add the numbers that <displayremotecodes> give you, you'll be fine, as long as they aren't the codes for one of the original dvd remote's buttons.

no doubt the kameleon can be programmed per-button (most o4a remotes can) with a different keycode.

cheers,
jonathan
the button that is assigned to shutdown must be held for around 3 seconds to take effect.
hmmm.. in the global selection, it doesn't work. but when i place it in the home window environment, it works. that's a bit of a shame, because i would like it to work global.

also, i don't have to wait 3 seconds and i can use the display code found with the tag enabled. it would be silly if that would'nt work imho.

so the code is 42 and is usable as 42.
as i said, code 42 is the display button on the normal xbox remote. this is mapped by default in the <global> section to toggle between gui and fullscreen mode.

you can only have 1 action mapped per button, per section. currently you have 2 (your power action, and the gui->fullscreen action) mapped to the same button (remotecode 42, or display).

you have to remove the other mapping, or find a different remotecode to map it to.
(jmarshall @ april 15 2005,19:58 Wrote:as i said, code 42 is the display button on the normal xbox remote. this is mapped by default in the <global> section to toggle between gui and fullscreen mode.

you can only have 1 action mapped per button, per section. currently you have 2 (your power action, and the gui->fullscreen action) mapped to the same button (remotecode 42, or display).

you have to remove the other mapping, or find a different remotecode to map it to.
thanks a lot!! is there some file which maps the button names like 'display' and 'power' to numbers, so i can figure out which keys maybe double mapped also? when i enable the id, there only appear numbers and in the xml file there are only names.

i hope you get what i mean.

by the way, i (and my wife) really are very thankfull for this wonderfull piece of software. just bought my second xbox so whe can use xbmc upstairs also.