GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
http://trac.xbmc.org/ticket/13585 reports that on some laptops multimedia keypresses are having unintended affects. This is because on some keyboards (it isn't clear exactly which) the multimedia keys send scan codes used by different keys e.g. the mute key sends the same scancode as the "d" key. This means that (on Windows) XBMC sees the WM_APPCOMMAND message from the mute key, but then a rogue "d" keypress as well. This has started mattering since new key mappings were added to support the PVR functions.
This commit is a quick fix that stops XBMC processing the scan code for multimedia keys. This should do for Frodo, though in the longer term we need to look at exactly what scancode processing is required as it isn't clear why the current code is needed.
Correct handling of multimedia key presses
So all these keys are handled in WM_APPCOMMAND already? i.e. this can't break anything?
I confirm that on one of my PCs I had the "back" button handled twice! once for the scan code, once for the WM_APPCOMMAND. I had to turn off multimedia key handling by setting false so it only hits once.
In Windows (God bless you Bill Gates) pressing a multimedia key generates two messages. First it generates a WM_APPCOMMAND message, then it generates a WM_KEYDOWN message. By default XBMC handles the WM_APPCOMMAMD but ignores any WM_KEYDOWN messages from multimedia keys (obviously, only from multimedia keys), and this prevents the keypress being handled twice. You can change this behaviour from http://wiki.xbmc.org/?title=Advancedsettings.xml#.3Cenablemultimediakeys.3E, which is presumably why Voyager1 experienced the duplicated key presses.
However the current problem is unrelated. It's happening because XBMC misinterprets the multimedia keypresses so they look like other keypresses e.g. the mute key looks like a "d" keypress. This fix prevents this mishandling of the keypresses.
FWIW http://forum.xbmc.org/showthread.php?tid=148760&pid=1290606#pid1290606 reports that the fix works.
I guess it's a bit scary putting a change like this in at the RC3 stage, but I'm 99% confident it won't affect anything else. It's difficult to be 100% sure as the problem only occurred on some keybpoards and doesn't happen on mine, or with any of the remotes I use.
Sounds fine to me then.
Merge pull request #2039 from jhsrennie/master
Correct handling of multimedia keypresses
Are you going to pull the changes into the Frodo branch as well?
davilla handles that - see the frodo final thread on the forums.
yes, list it and it will get merged into frodo.