keyboard.xml not interpreted well
#1
Question 
Hello,

I'm very new to XBMC and I like it. I would like to use it for my HTPC. I bought remote control "Shape PC Remote" by Fractal (http://www.fractal-design.com/?view=product&prod=22)

This appears in system as HID which is cool because you don't need any drivers. I have checked for keystroke definitions and it sends standard MCE shortcuts (Shift-Ctrl-P for Play; Ctrl-P for Pause; Ctrl-B for Previous track; Shift-Ctrl-B for Rewind;...) I have changed my ~/.xbmc/userdata/keymaps/keyboard.xml

Code:
...
<p mod="ctrl">Pause</p>
<b mod="ctrl,shift">Rewind</b>
<b mod="ctrl">SkipPrevious</b>
...

But I still cannot get these shortcuts working Stare

I have found that mod keys are used since 9.11 version so I downloaded sources and compiled xbmc. Unfortunately behaviour is same as xbmc from repository.

I was reading source code and playing with modifications of keyboard.xml.

I have defined
Code:
<n>Pause</n>
and it worked on normal keyboard fine. I was surprised that video playback was paused also with combination of keys Shift-N. I don't think this is OK because with some remotes it depends on Shift key.

Then I have defined
Code:
<n mod="shift">Pause</n>
and behaviour was same as without mod.

Then I defined
Code:
<n mod="ctrl">Pause</n>
and found playback will not pause when pressing combination Ctrl-N, but when I presed Alt-N or Alt-Shift-N playback was paused. Shocked

At last I have defined
Code:
<n mod="alt">Pause</n>
and playback stopped when any of following combination was pressed:
N; Shift-N; Alt-N; Alt-Shift-N; Shift-Alt-N Huh

Could you please let me know what's wrong?

I have Ubuntu 9.10 (Karmic) and XBMC 9.11 (build from source code).
Reply
#2
Did you get the source using SVN, and if so which build? When I added support for the key modifiers I tested it on Linux, but that was a lot of builds ago. If you have the latest build then the MCE keys like ctrl-shift-P are already in system/keymaps/keyboard.xml.

Incidentally the shift modifier on it's own does nothing i.e. N and shift-N are seen by XBMC as the same. Shift only makes a difference when used with ctrl or alt e.g. ctrl-P is different to ctrl-shift-P.

JR
Reply
#3
Hi,

thanks for quick reply.

I used sourceforge:

https://sourceforge.net/projects/xbmc/fi...z/download

In my /usr/local/share/xbmc/system/keymaps/keyboard.xml are no mods for MCE...

Thanks for hint regarding Shift key. Now it's clear to me...

I will try to get latest build from SVN compile and will post reply if it's working fine.

Thanks!

PS: Could you confirm that modifications I made in ~/.xbmc/userdata/keymaps/keyboard.xml are correct?

Code:
<keymap>
  <global>
    <keyboard>
      <n mod="ctrl">Pause</n>
      <f8>Mute</f8>
      <f9>VolumeDown</f9>
      <f10>VolumeUp</f10>
    </keyboard>
  </global>
<FullscreenVideo>
<keyboard>
<n>Pause</n>
</keyboard>
</FullscreenVideo>
</keymap>

If yes why playback is not paused when pressing Ctrl-N, but when Alt-N is?

PPS:
How can I check build version? Only from logfile?
Code:
10:17:50 T:140520586901568 M:3450482688  NOTICE: Starting XBMC, Platform: GNU/Linux.  Built on Jan 22 2010 (SVN:Unknown)
Reply
#4
easi Wrote:I used sourceforge:

https://sourceforge.net/projects/xbmc/fi...z/download

Aha, you compiled the release v9.11 that doesn't support the keyboard modifiers.

Your keyboard.xml looks fine. See how it works with a recent build.

JR
Reply
#5
Wink 
Cool! Remote control works but there is some issue with rendering in current version. It looks like VDPAU is not working well. It was working fine in 9.11. Is it possible to see changes in code? Do you know about patch for 9.11 to enable key modifications?

Thanks.
Reply
#6
Grab JR-091218.patch from http://trac.xbmc.org/ticket/7442

You'll be amazed by little code was needed :-) It should only take you five minutes to make the changes to the relase version of v9.11.

JR
Reply
#7
Thumbs Up 
Patched and working well Big Grin

Many thanks for your help!!!
Reply
#8
Would <9 mod="numlock">Pause</9> also work? The reason I'm asking is that I control my XBMC using Logitech Cordless NumberPad and its' default behaviour seems to be sent three signals instead of one (numlock on, actual key, numlock off) and I couldn't make keyboard.xml to work with it...
Cheers
WinXP SP3 - Samsung LE40A656 - Asus P5Q SE/R - Intel Core2Duo E8400 3000MHz - GeForce 9600GT (512MB) - Logitech NumberPad - Samsung Omnia running XBMC HTTP-R (for lack of a better option)
Reply
#9
as I have seen in code modificators could be only Ctrl, Alt and Shift... I guess it will not work...

My remote sends normal numbers...
Reply
#10
This is the same remote I have, been trying to learn my Logitech Harmony 555 the IR signals from it, its easy enough but the big problem comes when I get inside XBMC. I double send everything so its rather useless. Is there some way to typ in the keyboard xml to by pass it?

tried to do

<down></down><down>Down</down>

but it still double steps
Reply
#11
Hi, im needing to apply this patch. Is there an easy way to apply the .patch file in terminal? Or is it a copy and paste job into the relevent files?

If it is the latter, can someone tell where where the files (application.ccp for example) are in the system?

Thanks!
Reply
#12
anyone?
Reply

Logout Mark Read Team Forum Stats Members Help
keyboard.xml not interpreted well0