Help with keymap - need to map keyboard letter "S" to xbox remote button "0"

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
The-Boxhead Offline
Donor
Posts: 958
Joined: May 2005
Reputation: 17
Location: Norway
Post: #1
is this possible. been looking on the wiki and in the forums. i cant
find out how to do it Wink
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #2
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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
The-Boxhead Offline
Donor
Posts: 958
Joined: May 2005
Reputation: 17
Location: Norway
Post: #3
Okays, gonna do some testing when i get home. thanks jm.

PointOfView Nvidia ION Atom 330 - TRANSCEND 2GB DDR2 DIMM 800MHz - G.SKILL 64GB SSD 2.5
Open Elec Beta4 1.95.4
XBMC Online Manual - HOW-TO post about a problem in a useful manner - Create/View Bug Report
Setup/Fix correct resolution on XBMC/Ubuntu - Usefull linux terminal commands
find quote
The-Boxhead Offline
Donor
Posts: 958
Joined: May 2005
Reputation: 17
Location: Norway
Post: #4
Hmmm JM your suggestion didn't work, tried a few others aswell with no luck.

Im trying to make the button "1" on my xbox remote to do the same
as keyboard letter "S" does.

If anyone could share some insight i would be a happy camper Smile

PointOfView Nvidia ION Atom 330 - TRANSCEND 2GB DDR2 DIMM 800MHz - G.SKILL 64GB SSD 2.5
Open Elec Beta4 1.95.4
XBMC Online Manual - HOW-TO post about a problem in a useful manner - Create/View Bug Report
Setup/Fix correct resolution on XBMC/Ubuntu - Usefull linux terminal commands
find quote
rouss Offline
Junior Member
Posts: 3
Joined: Feb 2009
Reputation: 0
Post: #5
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.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #6
@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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #7
and the whole point is - u do NOT map keys to keys, you map keys to actions
find quote
rouss Offline
Junior Member
Posts: 3
Joined: Feb 2009
Reputation: 0
Post: #8
@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.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #9
rouss, that was not for you, it was for the-boxhead (as he was trying to map 0 to s)
find quote
prae5 Offline
Team-XBMC Forum Moderator
Posts: 2,064
Joined: Jan 2009
Reputation: 34
Location: Cambridge, UK
Post: #10
[QUOTE=rouss;373452
@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.[/quote]

Unless I am misunderstanding you, you can already do this

http://www.xbmc.org/wiki/?title=Advanced...eyboard.3E
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #11
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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
The-Boxhead Offline
Donor
Posts: 958
Joined: May 2005
Reputation: 17
Location: Norway
Post: #12
@JM - Thank you for clearing that up. yes i was trying to activate shutdown menu.

@Grumpy - Yeah im stupid Wink

But... Problems. The wiki is a little unclear on what file where...

I want to do this:
Code:
<zero>XBMC.ActivateWindow(shutdownmenu)</zero>

So the section in /home/xbmc/XBMC/system/keymaps/remote.xml is then:
Code:
<Home>
    <remote>
      <menu>XBMC.Skin.ToggleSetting(HomeViewToggle)</menu>
      <info>XBMC.ActivateWindow(SystemInfo)</info>
      <clear>XBMC.ActivateWindow(Weather)</clear>
      <hash>XBMC.ActivateWindow(Settings)</hash>
      <zero>XBMC.ActivateWindow(shutdownmenu)</zero>
    </remote>
</Home>

But that did not work. so i tried to copy the remote.xml to my
/home/xbmc/.xbmc/userdata/remote.xml
No joy so i tried to rename it since the wiki said the old name of "keymap.xml"
still worked for backward comp. That didnt work either.

and i dont have anything under /home/.xbmc/XBMC/system/

My debug log says:
Code:
00:13:42 T:3044894608 M:1427275776   DEBUG: OnKey: 206 pressed, action is 0

But no errors.. im stumped Wink

PointOfView Nvidia ION Atom 330 - TRANSCEND 2GB DDR2 DIMM 800MHz - G.SKILL 64GB SSD 2.5
Open Elec Beta4 1.95.4
XBMC Online Manual - HOW-TO post about a problem in a useful manner - Create/View Bug Report
Setup/Fix correct resolution on XBMC/Ubuntu - Usefull linux terminal commands
find quote
Anastrophe Offline
Donor
Posts: 259
Joined: Mar 2004
Reputation: 0
Location: Dubai, UAE
Post: #13
did you ever find the right way of doing this?
find quote