Posts: 26,215
Joined: Oct 2003
Reputation:
187
You usually use <s>number0</s> in this case. The other numbers are similar. Not sure if this is what you want or not - it depends on where it's being used, and what "0" on the remote was actually mapped to.
Cheers,
Jonathan
Posts: 956
Joined: May 2005
Reputation:
17
Okays, gonna do some testing when i get home. thanks jm.
Posts: 3
Joined: Feb 2009
Reputation:
0
I am interested in doing this as well. The idea is to map an ASCII letter to a button on the Xbox DVD remote in the keymap.xml. So, for example, typing letters with the remote for a file name. Something like:
<remote>
<zero>S</zero>
</remote>
I have tested the above and various other methods on the Xbox revision 21142 from T3CH including using the ascii hex values 0x53, 0xF053, 0xF153 in place of the "S" above. None of these methods worked.
The log outputs when I press the remote button on the remote:
21:45:20 M: 40955904 DEBUG: CApplication::OnKey: 200 pressed, action is 0
Any help in figuring this out or pointing me in the right direction would be greatly appreciated. I have taken a look at the wiki on keymap.xml as well as the key.h, ButtonTranslator.cpp source files but could not find an answer.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
@rouss: You can't type ascii letters using a remote. Sorry, not supported. A patch to address the deficiency would certainly be considered though.
@The_BoxHead: I interpreted your title the other way around. You want to do:
<one>ShutdownMenu</one> or whatever it is.
Check what is mapped to <s> in the <keyboard> section.
Cheers,
Jonathan
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
and the whole point is - u do NOT map keys to keys, you map keys to actions
Posts: 3
Joined: Feb 2009
Reputation:
0
@jmarshall: I am not sure exactly where I should start. My programming skills are not very strong but I am willing to take a crack at it. I'm guessing with ButtonTranslator.cpp?
@spiff: Of course, that would be pointless but creating an infrared remote with a full keyboard that would allow the user to input text isn't pointless. My goal is not to map the "S" key to the zero key on the remote and have it function like pressing the "S" on a keyboard. The point would be to input text via infrared in XBMC when need be.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
rouss, that was not for you, it was for the-boxhead (as he was trying to map 0 to s)
Posts: 26,215
Joined: Oct 2003
Reputation:
187
rouss: How it works is that in "keyboard entry mode" which is defined in CApplication::OnKey() I think - basically it depends on where you are in the UI - we don't pass through the button translator, and instead pass the key code directly as the action.
Thus, you'd have to first determine how and where you want "keyboard entry mode" to kick in for a start, and then pass the appropriate keycode as the action. You'll need to do the translation in buttontranslator.cpp.
As an example, you could just add what you need to buttontranslator.cpp and then in the VirtualKeyboard section of the keymap do your mapping there. This would only apply to the virtualkeyboard, however, and thus wouldn't apply to things such as edit controls.
Cheers,
Jonathan
Posts: 280
Joined: Mar 2004
Reputation:
0
did you ever find the right way of doing this?