Kodi Community Forum

Full Version: no keymap.xml?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Architecture: i386
Version: 8.10a4-hardy3
Depends: xbmc-common (= 8.10a4-hardy3), xbmc-skin-pm3 (= 8.10a4-hardy3), xbmc-web-pm3 (= 8.10a4-hardy3)

Hi - I'm trying to configure a speedlink media remote control (USB) that reports itself as:

Sep 4 20:32:01 monolake kernel: [258601.257252] input: HOLTEK YaoCoo as /devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.0/input/input6
Sep 4 20:32:01 monolake kernel: [258601.295792] input,hidraw3: USB HID v1.10 Keyboard [HOLTEK YaoCoo ] on usb-0000:00:1d.3-1
Sep 4 20:32:01 monolake kernel: [258601.336640] input: HOLTEK YaoCoo as /devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.1/input/input7
Sep 4 20:32:01 monolake kernel: [258601.410641] input,hiddev97,hidraw4: USB HID v1.10 Mouse [HOLTEK YaoCoo ] on usb-0000:00:1d.3-1


From looking at the xbmc manual and these forums, I think the place to start is the keymap.xml file. But it's not in ~/.xbmc nor in /usr/share/xbmc

Can I just create it? If so, where?

Oh, and if anyone has a keymap.xml file for this remote I'd be grateful!
Sorry, forgot to add:

Installed from PPA, SVN 15111
Your suppose to create it in .xbmc/userdata/
With from what I know either in completeness or just the stuff you need altered.

(The original one is in /usr/share/xbmc/system/)

Cheers
Ah OK thanks.

Meanwhile, looking at the manual, I realise I have not a clue what it's on about.

Does anyone have an example of keymap.xml file that would be good for, say, an MS XP MCE remote control? I have a speedlink clone of that (I assume), which sort of works, but needs re-mapping.
The MCE USB is mimicing the XBox DVD Dongle (the one that is refered to as <remote> in Keymap.xml)

What you do with MCE USB is that you map how this should be mimic'ed, ie "PLAY" means "play" or "DVD_MENU" means "Back".
How you do this is by editing you lircmap.xml (Which I'm not 100% sure but I think it goes into userdata aswell, please someone correct me if I'm wrong. Never customized it in PPA)

SO what you need is to run IRW check the code and add the appropriate things in lircmap.xml.

Here's some pointers on how to do that, the rest of that thread is quite usefull aswell.

At some point we might have a good guide of this on the wiki but noone have found the time to write something up. Hope you get it working though.

Cheers,
Tobias
Hmm. If I run irw it doesn't report the codes to the console. The remote simply controls my PC (eg, pressing "up" simply takes me to the previous command in the same way as the keyboard up arrow.

Something tells me this is going to be rather immensely difficult...

I'm off to bed before my head explodes.
gilgongo Wrote:Hmm. If I run irw it doesn't report the codes to the console. The remote simply controls my PC (eg, pressing "up" simply takes me to the previous command in the same way as the keyboard up arrow.

Something tells me this is going to be rather immensely difficult...

I'm off to bed before my head explodes.

Maybe it's a keyboard packaged differently? have you tried it in XBMC?
Thanks - I've tried it in XBMC and it partially works. The arrow keys all work, as does the enter (ok) key. I can't escape (or whatever you need to close menus or go back), and can't get a context menu though.

Can't I just simply use a keymap.xml that's set up for an MS MCE remote? If so, surely somebody has one they can post to the wiki? There's something strange about all this that I'm really not getting... Do most people use PC keyboards and mice with XBMC or something?
It sounds like your remote is detected as a keyboard and is probably just sending the right keyboard keys for Windows MCE. So all in all probably a fast and cheap solution on the vendors part.
However this should be possible for you to fix with XBMC.
Just map <keyboard> differently in Keymap.xml. the hard part is to find the right keys Smile

You can look through xbmc.log (should be in /var/tmp/xbmc-USER.log or /var/tmp/xbmc/xbmc-USER.log) as it will register unkown keyboard tags, ie BROWSER_BUTTON that is found on many media keyboards. you can map these aswell which is shown in keymap.xml

Good luck
Tobias.
Ah, yes, that makes sense because it was working even before I installed lirc. Also, reading this is interesting, since it says that recent kernels will support ir devices out of the box.

Thanks for the tip about the XBMC log file - I'll start there and see if I can work out how to get it all together in the <keyboard> section of keymap.xml
OK - I've just spent a couple of hours with my xbmc log experimenting with the various keys and screens etc.

So that I could speed this up a bit, I wish I could get xbmc to run in a window and not full screen - anyone know how I can do that?


Meanwhile, this is what I've been doing to map the keys on my remote to the right events in xbmc, if anyone is in a similar situation:

Copy /usr/share/xbmc/system/Keymap.xml to ~/.xbmc/userdata/ and rename /usr/share/xbmc/system/Keymap.xml to something else so you know it's not getting read.

Have a quick look at: http://wiki.xbmc.org/?title=Keymap.xml and http://wiki.xbmc.org/?title=Window_IDs, which may prove useful.

Run xbmc and press a key you want to make active - for example, the "back" button to close the Video OSD. Press it about 10 times.

Exit xbmc and grep -i onkey /var/tmp/<username>-xbmc.log. This will say something like this:

00:33:00 T:3053987712 M:153264128 DEBUG: OnKey: 61453 pressed, action is 7
00:33:02 T:3053987712 M:156819456 DEBUG: OnKey: 61453 pressed, action is 7
00:33:02 T:3053987712 M:156819456 DEBUG: OnKey: 61453 pressed, action is 7
00:33:02 T:3053987712 M:156692480 DEBUG: OnKey: 61453 pressed, action is 7
00:33:02 T:3053987712 M:156692480 DEBUG: OnKey: 61453 pressed, action is 7
00:33:04 T:3053987712 M:156692480 DEBUG: OnKey: 61453 pressed, action is 7
00:33:04 T:3053987712 M:156692480 DEBUG: OnKey: 61453 pressed, action is 7
00:33:06 T:3053987712 M:156700672 DEBUG: OnKey: 61453 pressed, action is 7
00:33:06 T:3053987712 M:156700672 DEBUG: OnKey: 61453 pressed, action is 7
00:33:06 T:3053987712 M:156700672 DEBUG: OnKey: 61453 pressed, action is 7

Now, add a line like this to the appropriate part of Keymap.xml:

<key id="61453">PreviousMenu</key>

Where the id is the "OnKey" shown in the log, and PreviousMenu is the name of the command you want to invoke.

Repeat until you die of boredom, or until your remote control works how you want it, whichever comes first.

If I ever do get it working the way I want, I'll share my results if anyone's interested.
Press "\" on the keyboard to toggle to window mode.

Alternatively, make sure you run without the "-fs" flag.
Cool! Thanks!
hi gilgongo!

i have the same remote as you, but although your hints to get it working with xbmc look interesting, they don't seem to be the full solution for me.
(61453 probably is not the correct keydefinition, as it appears shows up on
several buttons).
Please correct me if i'm wrong here - haven't played very much with it yet.
in case you got a working config for this nasty remote, please share it here Smile

btw i found some interesting urls regarding this, maybe they can help:

http://www.thomas-alfeld.de/frank/downlo...L-6399.txt
lists all buttons (of probably the same remote)

http://forum.ubuntuusers.de/topic/mce-fe...st-1498600
unfortunately german, but important steps described by Sebi82
to get this remote working with lirc are language-independant

http://www.mythtv.org/wiki/index.php/Gen...22_Remotes
is a short description how to get this baby working for mythtv via xmodmap
Hi frostwork,

I think I'm slowly getting somewhere now. I wish I'd seen that link link you have that lists all buttons on the remote before (it's the same one - the SL-6399) - would have saved me some time!

Here's what I've done to date:

1. Tried looking through XBMC's logs for key codes to re-map. At the time, I didn't realise that (as you point out) some keys are seen as the same by XBMC (eg id 61453), so while I could get a couple of keys to work by hacking on Keymap.xml, I was stumped for the rest (or had multiple keys that did the same thing). So - that was a dead end.

2. Read up about lirc, got confused, then realised lirc has nothing to do with this remote (unless you want to do something like re-compile your kernel drivers) because it's a HID USB device. Waste of time. Kept looking.

3. Saw that link you mention on the mythtv.org site which clued to me how to get around the fact that XBMC is case-insensitive (so keys on the remote that send CTRL+p and CTRL+P are seen as the same). Following a flash of inspiration (I think) to simply disable the CTRL key to simplify things, I then followed the link's instructions keys with xmodmap. I then re-mapped the remaining keys to as many default Keymap.xml values as I could (just done the global section only so far). However, so as not to get duplicates, I also had to change a few of the defaults in Keymap.xml. Messy.

4. Decided to look at evrouter as an alternative to see if that could do the whole thing without having to hack Keymap.xml as well as another config like xmodmap. While I think it could do it all (including running shell scripts), I'm finding it a bit flaky (crashing, not working, etc., also confusing becuase it uses "event layer" codes which are differet to xmodmap's. Hnnnnngh!)

But like I say, I'm almost there - it's really just a question of finding a (relatively) elegant solution. I'll post my verdict once I'm done. Might take a while yet though.
Pages: 1 2