Disabling WM_APPCOMMAND
#1
Lightbulb 
Hi

I just got a MCE remote knockoff from dealextreme which works great, but the only problem is I can't map keys like VK_VOLUME_DOWN in XBMC.

I think the remote uses WM_APPCOMMAND for this, so when I press the volume down button, the Windows volume changes, not XBMCs, and when I map it in keyboard.xml nothing happens.

So I think I'm searching for a way to disable WM_APPCOMMAND. Can anyone help me on this?
Reply
#2
This can't be done in v10.1. The current development builds (from http://mirrors.xbmc.org/nightlies/) do allow you do configure the appcommand handling, so you can make the volume appcommands control the XBMC volume not the Windows volume.

I hear rumours that the development builds are a bit prone to freezing up at the moment, so unless someone springs up to say the development builds are OK I'd be inclined to wait a bit before trying them.

JR
Reply
#3
Alright, I tried a nightly version and used the <enablemultimediakeys> in advancedsettings.xml, and the remote now controls XBMC's volume.

But the Windows volume still changes when I press the Volume key. It shouldn't do that, right? How can I stop it from changing the Windows volume?

So close!!! Smile
Reply
#4
You don't want to enable the multimedia keys. If you do this the multimedia keys generate both a keypress and an appcommand message. XBMC processes the keypress and Windows processes the appcommand so you get the effect you see.

Remove the <enablemultimediakeys> from advancedsettings.xml, and in your %appdata%\userdata\keymaps folder create a file called appcommand.xml containing:

Code:
<keymap>
  <global>
    <appcommand>
      <volume_down>VolumeDown</volume_down>
      <volume_up>VolumeUp</volume_up>
      <volume_mute>Mute</volume_mute>
    </appcommand>
  </global>
</keymap>

This tells XBMC to handle the vol up and down appcommands, which means they don't get passed on to Windows.

JR
Reply
#5
jhsrennie,

That is awesome! Thank you very much. My remote works just like I want it now.

You're my savior! Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Disabling WM_APPCOMMAND0