2011-07-22, 20:46
Hi all - I'm trying to figure out whether I can use a stand-alone numpad I have lying around as a remote for XBMC. I read through various posts in the forum and the wiki pages, and took a look at the system keyboard.xml, and to test things out I created the following keymap.xml
I've found two things that don't work as expected:
1) when I press * on the numpad XBMC displays an 8 (ie responds with Notification(Key, 8, 1) ) I thought perhaps this was because instead of star it was seeing shift+8, remembering that XBMC is case insensitive, but when I pressed shift+8 on the keyboard there was no response. Pressing 8 on the keyboard provoked a Notification(Key, 8, 1) btw.
Any ideas what I'm doing wrong?
I got <star> from looking at some remote keymaps, so maybe I'm using the wrong tag?
But then why does it respond as if I've pressed an 8? and only from the numpad, not with shift+8 on the keyboard?
Is there a way I can pass the keycode or keysym codes instead of using <star>?
2) XBMC doesn't seem to be sensitive to the NumLock state - i.e. when I press 8 I get the response Notification(Key, 8, 1), but when I switch NumLock off and press 8 (which should now be 'Up' - and is seen by xev as 'KP_Up') I still get Notification(Key, 8, 1). I tried replacing <KP_Up> with just <Up> in case that made a difference, and replacing <numpadeight> with <eight>, and replacing both together, but it seems that, regardless of the NumLock state, XBMC only recognises the numbers... [Just to be clear, this happens with all the dual-function keys, not just 8 ]
Is there anything I can do about this (maybe use the keycode or keysym codes again?) or will I have to make do without?
Thanks so much for your help!
Code:
<keymap>
<global>
<keyboard>
<!-- ... constant key mappings here -->
<forwardslash>Notification(Key, forwardslash, 1)</forwardslash>
<minus>Notification(Key, minus, 1)</minus>
<plus>Notification(Key, plus, 1)</plus>
<Enter>Notification(Key, Enter, 1)</Enter>
<star>Notification(Key, Star, 1)</star>
<!-- ... number key mappings here -->
<numpadzero>Notification(Key, 0, 1)</numpadzero>
<numpadone>Notification(Key, 1, 1)</numpadone>
<numpadtwo>Notification(Key, 2, 1)</numpadtwo>
<numpadthree>Notification(Key, 3, 1)</numpadthree>
<numpadfour>Notification(Key, 4, 1)</numpadfour>
<numpadfive>Notification(Key, 5, 1)</numpadfive>
<numpadsix>Notification(Key, 6, 1)</numpadsix>
<numpadseven>Notification(Key, 7, 1)</numpadseven>
<numpadeight>Notification(Key, 8, 1)</numpadeight>
<numpadnine>Notification(Key, 9, 1)</numpadnine>
<period>Notification(Key, period, 1)</period>
<!-- ... function key mappings here -->
<KP_Up>Notification(Key, Up, 1)</KP_Up>
<KP_Down>Notification(Key, Down, 1)</KP_Down>
<KP_Left>Notification(Key, Left, 1)</KP_Left>
<KP_Right>Notification(Key, Right, 1)</KP_Right>
<KP_Home>Notification(Key, Home, 1)</KP_Home>
<KP_End>Notification(Key, End, 1)</KP_End>
<KP_Prior>Notification(Key, Prior, 1)</KP_Prior>
<KP_Next>Notification(Key, Next, 1)</KP_Next>
<KP_Begin>Notification(Key, Begin, 1)</KP_Begin>
<KP_Insert>Notification(Key, Insert, 1)</KP_Insert>
<KP_Delete>Notification(Key, Delete, 1)</KP_Delete>
</keyboard>
</global>
</keymap>
I've found two things that don't work as expected:
1) when I press * on the numpad XBMC displays an 8 (ie responds with Notification(Key, 8, 1) ) I thought perhaps this was because instead of star it was seeing shift+8, remembering that XBMC is case insensitive, but when I pressed shift+8 on the keyboard there was no response. Pressing 8 on the keyboard provoked a Notification(Key, 8, 1) btw.
Any ideas what I'm doing wrong?
I got <star> from looking at some remote keymaps, so maybe I'm using the wrong tag?
But then why does it respond as if I've pressed an 8? and only from the numpad, not with shift+8 on the keyboard?
Is there a way I can pass the keycode or keysym codes instead of using <star>?
2) XBMC doesn't seem to be sensitive to the NumLock state - i.e. when I press 8 I get the response Notification(Key, 8, 1), but when I switch NumLock off and press 8 (which should now be 'Up' - and is seen by xev as 'KP_Up') I still get Notification(Key, 8, 1). I tried replacing <KP_Up> with just <Up> in case that made a difference, and replacing <numpadeight> with <eight>, and replacing both together, but it seems that, regardless of the NumLock state, XBMC only recognises the numbers... [Just to be clear, this happens with all the dual-function keys, not just 8 ]
Is there anything I can do about this (maybe use the keycode or keysym codes again?) or will I have to make do without?
Thanks so much for your help!