Issue with keymap
#1
Hi there,

I've recently updated to the new version. Everything works really well, except that I've got one problem with the keymapping that's been working fine in version 10. I've got a Hama MCE Remote, and want to be able to suspend my PC by pressing the power button on the remote. In version 10 this piece here in the keymap.xml worked fine:

Quote:<keymap>
<global>
<keyboard>
<key id="61599">XBMC.Suspend</key>
...

Unfortunately it seems the key ID thingy doesn't work anymore. When I'm pressing the power button, the xbmc.log gives me this:

Quote:20:29:20 T:140071994439520 DEBUG: OnKey: 0 (f200) pressed, action is
20:29:20 T:140071994439520 DEBUG: SDLKeyboard: scancode: 96, sym: 009f, unicode: 0000, modifier: 1000
20:29:20 T:140071994439520 DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
20:29:20 T:140071994439520 DEBUG: Previous line repeats 3 times.

Anyone got a clue how I have to edit the keymap.xml to make this button work again? The key id is nowhere to be found in the log anymore. Btw, this would need to be changed in the wiki also.

Thanks in advance!

PS: Great new version! I'm especially happy about the jpeg decoding speed-up. Skipping through my picture collections was a painfully slow thing in version 10 (especially with big pics like 36MP stuff). Now it's fast and fluid. Nice!![/quote]
Reply
#2
If I'm reading this right, it's telling you that the keyid is no longer '61599' and that XBMC is perceiving your button press (I'm guessing that to be the power button) is keyid 0. As a simple test, try editing your keyboard.xml to <key id="0">XBMC.Suspend</key>

Report back about this if you would... Cuz, according to you, I'm going to have to change some of my keybaord.xml as well!!
XBMC Gotham via OpenElec 5.0.8
ASRock H87M-ITX
I3-4330 Haswell CPU
64GB SSD ADATA
4GB Team Elite DDR3
MI-008 Case
unRAID 5disks 18TB of awesome
Reply
#3
Thanks TapRackPull. Setting the key id to 0 didn't work. I've also tried adding mod="1000" and that didn't do anything either. Sad
Reply
#4
Check out this post. It's a bit old, but relevant.

From here you should be able to figure out what XBMC is perceiving your key press as and code it correctly in the keyboard.xml.
XBMC Gotham via OpenElec 5.0.8
ASRock H87M-ITX
I3-4330 Haswell CPU
64GB SSD ADATA
4GB Team Elite DDR3
MI-008 Case
unRAID 5disks 18TB of awesome
Reply
#5
Hmm... Not sure that this thread helps actually. The log file is not showing any key id, and I'm on Linux so I cannot use this showkey program. *shrugs*
Reply
#6
Maybe try dropping to a terminal run "irw" and press the button on your remote and it should output the code, then add that to your keymap?
XBMCbuntu {Frodo} - Ubuntu 12.04 (Main):
Intel Q6600 [2.4GHz Quad Core], 4GB DDR3, nVidia GT-210, Antec Fusion Case (iMon LCD), PS3 BD Remote

XBMC Live {Frodo} - Ubuntu 10.04 (Bedroom): Intel Atom D510 [1.66GHz Dual Core], ION Graphics, 2GB DDR2, PS3 BD Remote
Reply
#7
I have a similar remote control and, like you, my Power button (mapped to keyid="61599") stopped working after upgrading to Eden. By happenstance, I discovered that alt-numpadfive works for that button. So, in your case, try the following:
Code:
<alt-numpadfive>XBMC.Suspend</alt-numpadfive>


As an aside, my remote control number buttons also stopped working for JumpSMS. I had to remap my JumpSMS keys from:
Code:
<two>JumpSMS2</two>
:
<nine>JumpSMS9</nine>
to:
Code:
<numpadtwo>JumpSMS2</numpadtwo>
:
<numpadnine>JumpSMS9</numpadnine>

Hope that helps.
Reply
#8
(2012-04-05, 06:30)artrafael Wrote: I have a similar remote control and, like you, my Power button (mapped to keyid="61599") stopped working after upgrading to Eden. By happenstance, I discovered that alt-numpadfive works for that button. So, in your case, try the following:
Code:
<alt-numpadfive>XBMC.Suspend</alt-numpadfive>

YAY, thanks buckets!! This worked perfectly. Smile

I also noticed that all my numbers on the remote now all of a sudden changed to numpadone instead of one...

Reply
#9
Hi,

Which file do I have to put in the line: <alt-numpadfive>XBMC.Suspend</alt-numpadfive> ?

thanks
Reply
#10
Hi.

My keyboard.xml is this:

<keymap>
<global>
<keyboard>
<o mod="ctrl">info</o>
<g mod="ctrl">contextmenu</g>
<t mod="ctrl">osd</t>
<m mod="ctrl,shift">ActivateWindow(shutdownmenu)</m>
<t mod="ctrl,shift">ActivateWindow(home)</t>
<m mod="ctrl">delete</m>
<e mod="ctrl">ShowVideoMenu</e>
<numpadfive mod="alt">NextSubtitle</numpadfive>
</keyboard>
</global>
</keymap>

After upgrading to Eden, it doesn't work as it should.
Any ideas? What was changed in Eden?
Reply
#11
(2012-04-07, 15:59)ibanez77 Wrote:
(2012-04-05, 06:30)artrafael Wrote: I have a similar remote control and, like you, my Power button (mapped to keyid="61599") stopped working after upgrading to Eden. By happenstance, I discovered that alt-numpadfive works for that button. So, in your case, try the following:
Code:
<alt-numpadfive>XBMC.Suspend</alt-numpadfive>

YAY, thanks buckets!! This worked perfectly. Smile

I also noticed that all my numbers on the remote now all of a sudden changed to numpadone instead of one...

Eden now knows the difference between the numpad numbers and the main keyboard numbers. "5" on the keyboard gives you <five> while on the numric keypad it's <numpadfive>. Which type of "5" the remote sends is down to whoever made the remote.

JR
Reply
#12
(2012-04-10, 19:18)JiiJii Wrote: Hi.

My keyboard.xml is this:

<keymap>
<global>
<keyboard>
<o mod="ctrl">info</o>
<g mod="ctrl">contextmenu</g>
<t mod="ctrl">osd</t>
<m mod="ctrl,shift">ActivateWindow(shutdownmenu)</m>
<t mod="ctrl,shift">ActivateWindow(home)</t>
<m mod="ctrl">delete</m>
<e mod="ctrl">ShowVideoMenu</e>
<numpadfive mod="alt">NextSubtitle</numpadfive>
</keyboard>
</global>
</keymap>

After upgrading to Eden, it doesn't work as it should.
Any ideas? What was changed in Eden?

Enable debug logging from System settings, System, Debugging, then press 5 on your remote a few times. If you look at the debug log it will tell you what keypress XBMC received. Look for entries like:

Code:
DEBUG: SDLKeyboard: scancode: 06, sym: 0035, unicode: 0035, modifier: 0
DEBUG: CApplication::OnKey: five (f035) pressed, action is Number5

or

Code:
DEBUG: SDLKeyboard: scancode: 4c, sym: 0105, unicode: 0035, modifier: 0
18:28:32 T:844   DEBUG: CApplication::OnKey: numpadfive (f075) pressed, action is Number5

You don't say what operating system you are using. See http://wiki.xbmc.org/index.php?title=Log_File for how to find the log file on the various operating systems.

JR
Reply
#13
What OS are you using? In my experience it is easier to map keys entirely outside of xbmc... assuming you are using windows, try out this program called MceRemoteMapper (it's a free open source key mapper with a simple UI) If that program for what ever reason does not work, then i would suggest AutoHotKey, you can use it to both map your own keys and discover the key id for the button on your remote with simple scripts like this one
Reply
#14
I'm using Windows 7 32-bit. Keyboard.xml worked just fine before the upgrade. I have a cheap MCE remote clone.
I have to enable debug and go from there.
Reply
#15
I enabled debug and the log is here: http://pastebin.com/gx5FRR0w

i tested all the keys in keyboard.xml and some of them worked, some did not:

ctrl-t subtitle position. Should be OSD
ctrl-e ok
ctrl-shift-t nothing
ctrl-o ok
ctrl-shift ok
alt-numpadfive ok
ctrl-g ok

So for some reason ctrl-t is changing subtitle position. It should show OSD.
Reply

Logout Mark Read Team Forum Stats Members Help
Issue with keymap0