Win Having trouble with keys in keymap.
#1
I am about pulling my hair out on this one:

I am using a Universal Remote and have edited the registry to send certain keystrokes with certain button pushes. This all works and has been verified with showkey.exe

What I can't get XBMC to do is run a script when I push on of those buttons, even when I use a keyboard.

My Keymap:

<!-- Keymap for the keyboard shortcuts configured by MSRemote.reg -->
<!-- J. Rennie 23rd September 2010 -->
<keymap>
<global>
<keyboard>
<!-- Zoom button: ctrl-z -->
<!-- <z mod="ctrl">FullScreen</z> -->
<!-- Angle button: ctrl-z -->
<z mod="ctrl">AspectRatio</z>
<!-- Audio button: ctrl-t -->
<t mod="ctrl,shift">AudioNextLanguage</t>
<!-- Subtitle button: ctrl, alt-p -->
<p mod="ctrl,alt">NextSubtitle</p>
<!-- hue on: ctrl, alt-o -->
<o mod="ctrl,alt">PlayMedia(&quot;plugin://plugin.program.advanced.launcher/?default/63493e3fef19de8371e20b0813ff2a23&quotWink</o>
<!-- hue off: ctrl, alt-z -->
<z mod="ctrl,alt">PlayMedia(&quot;plugin://plugin.program.advanced.launcher/?default/10f3def9313785006d908bd7d0914baf&quotWink</z>
<!-- hue incr: ctrl, alt-i -->
<i mod="ctrl,alt">PlayMedia(&quot;plugin://plugin.program.advanced.launcher/?default/c28a5b6919db183bcdef9a673d917c10&quotWink</i>
<!-- hue decr: ctrl, alt-d -->
<d mod="ctrl,alt">PlayMedia(&quot;plugin://plugin.program.advanced.launcher/?default/0da7595e832f558d9ba7a70ce916481c&quotWink</d>
<!-- hue 66: ctrl, alt-h -->
<h mod="ctrl,alt">PlayMedia(&quot;plugin://plugin.program.advanced.launcher/?default/d7997b4f982092bfa5a32d8a74a001aa&quotWink</h>
<!-- hue 33: ctrl, alt-l -->
<l mod="ctrl,alt">Notification(This is the title, This is the message, 3)</l>
<!-- Videos button: ctrl-e -->
<e mod="ctrl">XBMC.ActivateWindow(VideoLibrary,MovieTitles)</e>
<!-- recorded tv button: ctrl-o -->
<o mod="ctrl">XBMC.ActivateWindow(VideoLibrary,TvShowTitles)</o>
<!-- radio button: ctrl-a -->
<a mod="ctrl">CodecInfo</a>
<!-- guide button: ctrl-q -->
<!-- <q mod="ctrl">ActivateWindowAndFocus(MyPVR, 31,0, 10,0)</q> -->

<!-- guide button: ctrl-q -->
<q mod="ctrl">Notification(This is the title, This is the message, 3)</q>

<!-- record button: WM_Record -->
<r mod="ctrl">PlayerControl(Record)</r>
</keyboard>
</global>
</keymap>

Any of the control-alt o,z, etc aren't working but below that ctrl-q is working and shows me the notifcation, but ctrl-alt-L does not show me the notification, either when that button is pressed on remote (to send that key-combo) or the actual key combo on a keyboard is pressed.

In the action Ive linked a batch file to advanced launcher favorite, but ive tried a RunScript(python) and Exec.Shell(batch) in keyboard.xml with no luck. Even the notification in ctrl-alt-L doesn't work.

The only thing I can think of is outside of xbmc in windows I have keyboard-shortcuts to these batch files via a shortcut (.lnk) and they work. Are they perhaps holding the key-combo from xbmc somehow? I have the setting in input to allow Windows keypresses
Reply
#2
Try to enable debug (Settings / System / Debug) , push those buttons then check the debug file..
Reply
#3
Here's the relevant info from the debug log, for whatever reason its doing nothing when the keys are pressed but for whatever reason the key being logged as being pressed as just ctrl-leftctrl though I imagine the hex 0x1f0d0 might be the actual key. At the bottom you can see where the notification fires with ctrl-r, yet control-alt-p for subtitles works:

15:25:46 T:4592 DEBUG: CVideoDatabase::RunQuery took 9 ms for 386 items query: select * from episodeview WHERE ((episodeview.playCount IS NULL OR episodeview.playCount < 1))
15:25:46 T:4592 DEBUG: CVideoDatabase::RunQuery took 0 ms for 0 items query: select * from musicvideoview
15:25:54 T:6260 DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
15:25:54 T:6260 DEBUG: CApplication::OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
15:25:54 T:6260 DEBUG: ------ Window Deinit (Pointer.xml) ------
15:25:55 T:6260 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:25:55 T:6260 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:25:58 T:6260 DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
15:25:58 T:6260 DEBUG: CApplication::OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
15:25:58 T:6260 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:25:58 T:6260 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:25:58 T:6260 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:25:58 T:6260 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:25:58 T:6260 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:25:58 T:6260 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:25:58 T:6260 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:25:58 T:6260 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:25:59 T:6260 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:25:59 T:6260 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:26:07 T:6260 DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
15:26:07 T:6260 DEBUG: CApplication::OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
15:26:07 T:6260 DEBUG: Keyboard: scancode: 0x10, sym: 0x0071, unicode: 0x0011, modifier: 0x40
15:26:07 T:6260 DEBUG: CApplication::OnKey: ctrl-q (0x1f051) pressed, action is Notification(This is the title, This is the message, 3)

and testing cntrl-alt-p which does work.

15:35:53 T:5620 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x140
15:35:53 T:5620 DEBUG: CApplication::OnKey: ctrl-alt-leftalt (0x5f0d4) pressed, action is
15:35:53 T:5620 DEBUG: Keyboard: scancode: 0x19, sym: 0x0070, unicode: 0x0000, modifier: 0x140
15:35:53 T:5620 DEBUG: CApplication::OnKey: ctrl-alt-p (0x5f050) pressed, action is NextSubtitle
15:35:53 T:6384 NOTICE: Closing subtitle stream
Reply
#4
The only thing I can think of was removing the keyboard shortcut from the lnk file outside of XBMC. As soon as I did that, that key began to work in XBMC.

I guess Windows blocks keyboard shortcuts, even user set ones, even though focus is no longer on the desktop?

Im using Win 8.1 if that matters.

Im running out of obscure MCE commands to remap (that my remote knows. Its a URC programmable remote, if I had the pronto hex for ones I can't find in the database I could probably program some more), but I suppose I could double up on them for my purposes.
Reply

Logout Mark Read Team Forum Stats Members Help
Having trouble with keys in keymap.0