Kodi Community Forum
[Frodo RC1] Volume Keys sending other keypresses - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: [Frodo RC1] Volume Keys sending other keypresses (/showthread.php?tid=148760)

Pages: 1 2


[Frodo RC1] Volume Keys sending other keypresses - Royal2000H - 2012-12-18

My laptop has volume up, down, and mute keys.
I prefer to use Windows's volume rather than XBMC's, so I'm rather glad the keys are not mapped.

In Eden, pressing the volume keys was fine.
However, I just upgraded to Frodo and now when I press volume up (multimedia key), a PVR windows tries to come up. When I press volume down, if I'm playing a video, a now playing window comes up.

From the debug log, upon pressing volume up, volume mute, volume down, respectively:
Code:
04:04:22 T:30484   DEBUG: WinEventsWin32.cpp: APPCOMMAND 10
04:04:22 T:30484   DEBUG: CApplication::OnAppCommand: unknown appcommand 10
04:04:22 T:30484   DEBUG: Keyboard: scancode: 30, sym: 0062, unicode: 0000, modifier: 0
04:04:22 T:30484   DEBUG: CApplication::OnKey: b (f042) pressed, action is XBMC.ActivateWindowAndFocus(MyPVR, 35,0, 14,0)
--
04:04:25 T:30484   DEBUG: WinEventsWin32.cpp: APPCOMMAND 8
04:04:25 T:30484   DEBUG: CApplication::OnAppCommand: unknown appcommand 8
04:04:25 T:30484   DEBUG: Keyboard: scancode: 20, sym: 0064, unicode: 0000, modifier: 0
04:04:25 T:30484   DEBUG: CApplication::OnKey: d (f044) pressed, action is
--
04:04:29 T:30484   DEBUG: WinEventsWin32.cpp: APPCOMMAND 9
04:04:29 T:30484   DEBUG: CApplication::OnAppCommand: unknown appcommand 9
04:04:29 T:30484   DEBUG: Keyboard: scancode: 2e, sym: 0063, unicode: 0000, modifier: 0
04:04:29 T:30484   DEBUG: CApplication::OnKey: c (f043) pressed, action is ContextMenu

I tried changing an APPCOMMAND to a noop by creating an appcommand.xml in my userdata\keymaps folder. It indeed changed from 'unknown' to 'noop' in the log. However, the system is still receiving the b, c, or d OnKey events and firing those actions. I'm not sure why these function/multimedia keys are being picked up as letter keys when this did not happen in Eden.

I've tried uninstalling and reinstalling ... 3 times.


RE: [Frodo RC1] Volume Keys sending other keypresses - AussieFries - 2012-12-19

I'm experiencing a similar issue with mapping an appcommand key in Frodo RC1.

Could someone please shed some light on this?


RE: [Frodo RC1] Volume Keys sending other keypresses - daz_zle50 - 2012-12-20

Check,

I am experiencing the same issue here.

My vaio uses "function" + F3 and +F4 as volume buttons.
Like Royal 2000H already states, popups try to appear...

Is there a solution or work-around for this?

Thanks!


RE: [Frodo RC1] Volume Keys sending other keypresses - Royal2000H - 2012-12-22

Anyone from the XBMC team please?


RE: [Frodo RC1] Volume Keys sending other keypresses - jives00 - 2012-12-23

I've got the same issue, did anyone find a solution?

Well, a temporary solution that works. In the C:\Program Files (x86)\XBMC\system\keymaps\keyboard.xml file, I commented out the PRV Windows (lines 97-102) and <c> (line 236) pieces. Volume works again, but I imagine if I get a PVR, which I want to in the future, this will be an issue again.


RE: [Frodo RC1] Volume Keys sending other keypresses - CutSickAss - 2012-12-23

(2012-12-23, 17:32)jives00 Wrote: I've got the same issue, did anyone find a solution?

Well, a temporary solution that works. In the C:\Program Files (x86)\XBMC\system\keymaps\keyboard.xml file, I commented out the PRV Windows (lines 97-102) and <c> (line 236) pieces. Volume works again, but I imagine if I get a PVR, which I want to in the future, this will be an issue again.

For me it was Volume UP = PVR, Volume DOWN = Context Menu, so I disabled that as well. Thank you for the hint, this was very annoying!


RE: [Frodo RC1] Volume Keys sending other keypresses - HellFire - 2012-12-24

Same here for RC2.

Log:
Volume Up:
04:10:21 T:2164 DEBUG: WinEventsWin32.cpp: APPCOMMAND 10
04:10:21 T:2164 DEBUG: CApplication::OnAppCommand: unknown appcommand 10
04:10:21 T:2164 DEBUG: Keyboard: scancode: 30, sym: 0062, unicode: 0000, modifier: 0
04:10:21 T:2164 DEBUG: CApplication::OnKey: b (f042) pressed, action is XBMC.ActivateWindowAndFocus(MyPVR, 35,0, 14,0)

Volume Down:
04:10:23 T:2164 DEBUG: WinEventsWin32.cpp: APPCOMMAND 9
04:10:23 T:2164 DEBUG: CApplication::OnAppCommand: unknown appcommand 9
04:10:23 T:2164 DEBUG: Keyboard: scancode: 2e, sym: 0063, unicode: 0000, modifier: 0
04:10:23 T:2164 DEBUG: CApplication::OnKey: c (f043) pressed, action is ContextMenu


RE: [Frodo RC1] Volume Keys sending other keypresses - debennett2 - 2012-12-25

Any answers on all the goofy keymap issues?


RE: [Frodo RC1] Volume Keys sending other keypresses - rd1979 - 2012-12-26

Yeah, I get the same thing if I use the volume keys on my keyboard, but my MCE remote works just fine.


RE: [Frodo RC1] Volume Keys sending other keypresses - Royal2000H - 2012-12-29

So other than the workaround (disabling b/c/d keyboard shortcuts), has anyone found a solution?


RE: [Frodo RC1] Volume Keys sending other keypresses - AussieFries - 2012-12-29

Following Trac ticket seems to cover the issue?

http://trac.xbmc.org/ticket/13585


RE: [Frodo RC1] Volume Keys sending other keypresses - Pulch - 2012-12-29

I had this sorted in another thread.
http://forum.xbmc.org/showthread.php?tid=149082

In there is a link to the latest keyboard.xml for Frodo.

You will need to search through the xml and remove any of the other functions using your set volume keys. I did that initially but still had problems (in my case I was using the pageup pagedown for volume but it was also doing previous/next playlist items).

The solution to this was to add my personal volume up/down keys under the global area as well as the <VideoOSD> and <FullscreenVideo> areas.

The key is to remember that XBMC will look first under the specific area for key settings before the global. You may need to change key settings in several places on the keyboard.xml file.


RE: [Frodo RC1] Volume Keys sending other keypresses - jhsrennie - 2012-12-31

Apologies for the slow reaction to this, but I'm away from the office until Monday 7th and that's where my XBMC dev machine is.

The debug line:

Code:
DEBUG: Keyboard: scancode: 30, sym: 0062, unicode: 0000, modifier: 0

is printed at https://github.com/xbmc/xbmc/blob/master/xbmc/input/KeyboardStat.cpp#L87, which is immediately after the Win32 specific processing of the key messages but before XBMC responds to the keypress. It looks as if (for example) the volume up button is generating a B keypress. The scan code matches the B key on the keyboard, though I note the unicode field is set to zero, which it wouldn't be for a real B keypress.

As I recall, pressing a multimedia key generates two messages. First Windows sends the appcommand, then it sends a multimedia keypress message. By default the multimedia keypress processing is disabled to avoid both messages being processed. I wonder if some change has caused the MM keypress to be processed as well. The line that disables the MM key processing is https://github.com/xbmc/xbmc/blob/master/xbmc/windowing/windows/WinEventsWin32.cpp#L215. I had a quick look at the change history but couldn't see anything obvious. Can anyone pin down when the problem started? e.g. did it start between RC1 and RC2?

I will look at this as soon as I'm in the office, but as I say that won't be for a week. If anyone wants to have a look at this I would set a breakpoint at https://github.com/xbmc/xbmc/blob/master/xbmc/windowing/windows/WinEventsWin32.cpp#L497 then press the vol up and you should be able to trap the rogue keypress.


RE: [Frodo RC1] Volume Keys sending other keypresses - MassIV - 2012-12-31

Problem started way earlier, i remember it being present in some of the first alphas.
Maybe even as far back as the first version with PVR.
Back then i had not installed a pvr demo for skinning or was even running a skin with pvr support.
But the media keys for volume started giving a notification like: "no PVR clients started yet" or "unable to start PVR".
I now assume this was because it was trying to open the PVR window even back then.

I'll start going through the alphas once the hangover is gone Smile See if i can narrow it down a bit.
Or if anyone else feels like it (start with the first i guess and run portable):
http://mirrors.xbmc.org/snapshots/win32/


RE: [Frodo RC1] Volume Keys sending other keypresses - CutSickAss - 2013-01-01

OK, I went back as far as Frodo alpha-1, and one of the issues popped up even with that. Of course back then PVR was not a part of the standard installation, but by pressing "Volume DOWN" in movies, for example, the context menu showed up, just like I mentioned here.

And yes, the problem existed ever since the first time PVR support was added (alpha-6).