XBMC Community Forum
Issue with keymap - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+--- Thread: Issue with keymap (/showthread.php?tid=127213)

Pages: 1 2


Issue with keymap - ibanez77 - 2012-03-30 20:33

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]


RE: Issue with keymap - TapRackPull - 2012-03-30 20:47

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!!


RE: Issue with keymap - ibanez77 - 2012-03-30 21:08

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


RE: Issue with keymap - TapRackPull - 2012-03-30 21:22

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.


RE: Issue with keymap - ibanez77 - 2012-03-30 23:31

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*


RE: Issue with keymap - DaMizZa - 2012-04-04 21:37

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?


RE: Issue with keymap - artrafael - 2012-04-05 06:30

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.


RE: Issue with keymap - ibanez77 - 2012-04-07 15:59

(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...


RE: Issue with keymap - ev0lsan - 2012-04-09 14:54

Hi,

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

thanks


RE: Issue with keymap - JiiJii - 2012-04-10 19:18

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?


RE: Issue with keymap - jhsrennie - 2012-04-10 19:26

(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


RE: Issue with keymap - jhsrennie - 2012-04-10 19:30

(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


RE: Issue with keymap - digitaltomj - 2012-04-11 00:28

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


RE: Issue with keymap - JiiJii - 2012-04-11 09:57

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.


RE: Issue with keymap - JiiJii - 2012-04-11 21:05

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.