Bug 32664 - Keyboard volume keys don't work when LibreOffice is in focus
Summary: Keyboard volume keys don't work when LibreOffice is in focus
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.5.0 target:4.4.1
Keywords:
: 35911 36160 36691 39408 42238 Multikeys 50729 58438 58508 61814 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-26 10:00 UTC by Bram
Modified: 2017-08-28 12:28 UTC (History)
29 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bram 2010-12-26 10:00:10 UTC
When any LibreOffice window has focus, volume keys on the keyboard (which are globally assigned to the Windows volume control) do not work. Unlike nearly any other application, LibreOffice has to lose focus in order to get the volume control to work.
Comment 1 Don't use this account, use tml@iki.fi 2011-01-03 06:46:23 UTC
I doubt fixing this is an EasyHack. (Obviously, I would love to be proved wrong, though.) Also, it always annoys me when people generalize as in "unlike nearly any other application". Surely the reporter actually means "unlike many other applications that I happen to use".

Setting platform to x86 as LibreOffice is always a 32-bit program, even on 64-bit Windows.
Comment 2 Andy 2011-03-07 23:37:53 UTC
Bug confirmed here. Using LibreOffice 3.3.1 on Windows 7 SP1 x86.
Have noticed that only the volume keys are affected, the other multimedia keys (play/pause, stop, forward, previous) all work fine.
In case it means anything, my system is a Thinkpad R61.
Comment 3 Anonymous Helper 2011-03-23 13:31:38 UTC
As opposed to Andy, none of my multimedia keys work when LibreOffice has focus.

This bug (and several duplicates) had been reported for OpenOffice.org:
http://openoffice.org/bugzilla/show_bug.cgi?id=99520
Comment 4 Anonymous Helper 2011-04-11 16:10:42 UTC
*** Bug 35911 has been marked as a duplicate of this bug. ***
Comment 5 Leo De Bruyn 2011-04-11 16:34:12 UTC
(In reply to comment #3)
> As opposed to Andy, none of my multimedia keys work when LibreOffice has focus.
> 
> This bug (and several duplicates) had been reported for OpenOffice.org:
> http://openoffice.org/bugzilla/show_bug.cgi?id=99520

I posted on the same bug in Open Office, and installed Libre Office after a suggestion from that bug post. Same bug in Libre Office. This is such an irritating bug, that I will gladly keep the office suite that fixes it first, and delete the other off my disk. 

Here's your big chance, LibreOffice.

Windows Vista Business,64 Bit, SP2
Microsoft Digital Media Keyboard 1.0A
Volume and Mute buttons don't work, calculator button does.
Comment 6 Catalinci 2011-05-01 12:14:30 UTC
Cannot belive this isnt solved yet. Seems to me like a trivial issue. I had the same issues with Visual Studio 2008, so the open/libre office suits are not the only problemetic applications out there. I know it is a minor issue but it is really annoying sometimes, if , for some reason, you like to listen to some music when you work on your documents. On the open office buglist I saw this problem dates back almost 2 years ago. Why is it taking that much ? Is this issue considered at all by the developers ? Is there any plan to fix this in the near future ? Is at least the rootcause of the problem known to the developers ?
Comment 7 André Schnabel 2011-05-30 10:49:01 UTC
*** Bug 36160 has been marked as a duplicate of this bug. ***
Comment 8 André Schnabel 2011-05-30 10:51:07 UTC
*** Bug 36691 has been marked as a duplicate of this bug. ***
Comment 9 Ihar Filipau 2011-08-15 09:17:11 UTC
Bug exists in 3.3.2 on WinXP SP3 32-bit.

When LO is in focus, buttons Mute, Volume Up, Volume Down are not working. Button Play/Pause is working (probably because my media player is explicitly configured to intercept it).

P.S. Will test at home with LO 3.4 on W7 64-bit.
Comment 10 Korrawit Pruegsanusak 2011-09-06 04:17:58 UTC
*** Bug 39408 has been marked as a duplicate of this bug. ***
Comment 11 Korrawit Pruegsanusak 2011-09-07 07:37:02 UTC
Digging through OOo times, it seems that this bug is introduced in ChildWorkspace OOO300/impress163 [1] for fixing #i95576 [2]. See the consistence date/version in fixing/reporting this bug.

[1] http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Id=7539&OpenOnly=false&TasksInline=false&Section=Files
[2] http://openoffice.org/bugzilla/show_bug.cgi?id=95576
Comment 12 Korrawit Pruegsanusak 2011-09-07 07:45:46 UTC
For more info, part of commit for CWS OOO300/impress163 (in comment 11) which introduce this issue(?) is http://cgit.freedesktop.org/libreoffice/core/commit/vcl/win/source/window/salframe.cxx?id=66141a46a44fa1c96694e98453e28c077ca23f48
Comment 13 vitriol 2011-10-27 23:16:25 UTC
*** Bug 42238 has been marked as a duplicate of this bug. ***
Comment 14 Björn Michaelsen 2011-12-23 11:34:40 UTC Comment hidden (obsolete)
Comment 15 Björn Michaelsen 2011-12-23 12:57:00 UTC
An EasyHack should have been checked by developers and thus is confirmed regardless of age. Moving back to NEW from NEEDINFO again. Sorry for the hassle.
Comment 16 flamaros.xavier 2011-12-23 17:04:35 UTC
I just download/install version 3.5.0 beta 2, issue still here.

Hope it helps.
Comment 17 Anne 2012-01-16 13:04:07 UTC
This is such an annoyance, but it's not exclusive to Libre Office, as the same thing happens in the original Open Office and Go-oo version.
Comment 18 Andy 2012-02-12 00:17:34 UTC
Testing LO 3.5 rc3 on Windows 7, problem still exists. I'll test the master branch on Linux tomorrow, but I expect it'll exist there too.
Comment 19 Korrawit Pruegsanusak 2012-02-12 00:43:47 UTC
Please don't change the version picker. It means what *first* version that has issue, not latest one.
Comment 20 Andy 2012-02-12 14:29:27 UTC
Sorry. I didn't realize that would affect the whole report.
Comment 21 Elton Chung 2012-03-13 23:37:50 UTC
Potential fix?
https://issues.apache.org/ooo/show_bug.cgi?id=101739#c8
Comment 22 Charles Stevens 2012-04-04 19:29:17 UTC
First comments 11 and 12 correctly identify the origin of this bug.

Second, this is only an EASYHACK if you are willing to live with the bug pointed to in comment 11. Basically, the fix was to change "return false;" to "return true;" If you change it back, this bug will go away, and the original bug will come back.

The correct fix for this is to KNOW when handling WM_APPCOMMAND whether the LO app will/did "handle" the message and return that value. i.e. for Impress Next/Prev keys should advance or rewind the presentation by one slide (not two) and your music should not advance to the next track if LO has focus. If you are working on a spreadsheet or document and press Play/Pause LO should do nothing, return false and your music should pause. Unfortunatly, the place that returns true/false does not know if the message was actually handled, or just is theoretically handled by LO.

I would be happy to fix this bug, but for whatever reason, I am unable to build LO. I followed the directions, and the build failed spectacularly. I "fixed" that issue, and it just failed again later in a less obvious way.
Comment 23 Florian Reisinger 2012-05-18 08:22:19 UTC
Removed EASYHACK from summary
Comment 24 Korrawit Pruegsanusak 2012-06-08 09:30:52 UTC
*** Bug 50729 has been marked as a duplicate of this bug. ***
Comment 25 Daniel Rech 2012-06-13 11:16:40 UTC
LibreOffice should consume the media key events only in presentation mode, right?

So why not just change the aforementioned WM_APPCOMMAND handling to:

        case WM_APPCOMMAND:
            if( pFrame->mbPresentation && ImplHandleAppCommand( hWnd, lParam ) )
            {                
                rDef = false;
                nRet = 1;
            }
            break;
Comment 26 manj_k 2012-11-04 14:45:05 UTC
*** Bug 43980 has been marked as a duplicate of this bug. ***
Comment 27 Horst 2012-11-04 18:23:40 UTC
I checked the bug on my PC HP with HP media keyboard, Win7 Home prem. 64bit. It is NOT present with LO3.5.7 or LO3.6.3.
May be it is manufacturer related and not LO related.
Comment 28 Urmas 2012-11-05 03:54:26 UTC
The Play/Pause button doesn't work in 3.6.3, too.
Comment 29 m.a.riosv 2012-12-17 23:47:37 UTC
*** Bug 58438 has been marked as a duplicate of this bug. ***
Comment 30 Korrawit Pruegsanusak 2012-12-19 10:39:07 UTC
*** Bug 58508 has been marked as a duplicate of this bug. ***
Comment 31 menedas 2013-02-18 18:42:50 UTC
Surprise, its still not working in LO Version 4.0.0.3. I hate it. Its such an old bug and no reaction from the developers.

I sometimes work with interviews or lesson records. Thats why I need working pause and play buttons :/
Comment 32 Adolfo Jayme 2013-03-05 14:42:16 UTC
*** Bug 61814 has been marked as a duplicate of this bug. ***
Comment 33 Samuel Mehrbrodt (CIB) 2013-05-12 15:12:07 UTC
I'm sponsoring this on FS: http://www.freedomsponsors.org/core/issue/258/keyboard-volume-keys-dont-work-when-libreoffice-is-in-focus

You might increase that bounty to encourage developers to fix this.
Comment 34 ign_christian 2013-07-16 10:33:30 UTC
Perhaps anyone can reconfirm this issue? 

I can't reproduce with LO 4.0.4.2 (Win7 32bit), using HP Pavillion dm3-1109TU laptop. Related to h/w?
Comment 35 Urmas 2013-07-16 11:17:08 UTC
I can confirm it with master.
Comment 36 IagoSRL 2013-07-16 11:17:43 UTC
I reconfirm this issue: it is still happen to me with version 4.0.4.2 of LibreOffice in Windows 7 (SP1 64bit).

I have an Asus computer, CG8350 series. Hardware details at http://www.asus.com/Desktops/Essentio_CG8350/#specifications
Comment 37 ign_christian 2013-07-16 13:21:09 UTC
Perhaps related to 'fn' key controller:
https://issues.apache.org/ooo/show_bug.cgi?id=99520#c20
https://issues.apache.org/ooo/show_bug.cgi?id=99520#c45
https://issues.apache.org/ooo/show_bug.cgi?id=99520#c46

I'm accessing media keys on the laptop (comment 34) without pressing 'fn' key.
Comment 38 Björn Michaelsen 2013-10-04 18:47:09 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 39 Wormbo 2014-03-08 10:19:19 UTC
For me (using LibreOffice 4.2.1.1 on Windows 7 x64 SP1 with Logitech MX5500 keyboard and SetPoint 6.61.15) it's actually the opposite way:
Volume up/down/mute keys work fine with LibreOffice having focus, while Play/Pause, Previous Track and Next Track don't.

I can see why those keys could be useful during a presentation, but they clearly serve no purpose while working with e.g. a spreadsheet or a text document.
Comment 40 Alex 2014-03-10 10:10:59 UTC
FIX IT PLZ
I have this problem on Windows 8.1 with LibreOffice 4.2
Play & pause button does not work
It have been about 4 years since this bug was reported
Is it actually so hard to fix?
Which widget library you use guys? GTK? Qt? Then maybe widgetset is to blame
Comment 41 Jan Holesovsky 2014-03-11 14:16:32 UTC
Alex: This is apparently waiting for someone who has the keyboard with keys you mention, and will turn the information that is in this bug into a patch that can be applied in LibreOffice :-)  Any chance you can provide the patch, please?

All you need is to build LibreOffice yourself, do the change, and create the patch.  Information how to do that is here:

https://wiki.documentfoundation.org/Development/Patch_Handling_Guidelines#How_to_submit_a_patch

Thank you in advance!
Comment 42 menedas 2014-03-11 14:29:33 UTC
Thank you Bram, that helped a lot.
Comment 43 menedas 2014-03-11 14:30:47 UTC
I meant Jan ;)
Comment 44 bulwersator 2014-05-16 10:18:03 UTC
Still happens with Calc 4.2.4.2 on Lenovo laptop (g550 model 20023).
Comment 45 bulwersator 2014-05-16 10:36:02 UTC
I discovered something interesting - in my situation foobar2000 is affected by this problem but Winamp is not.
Comment 46 Daniel Rech 2014-07-03 13:08:20 UTC
I have sent a fix proposal to the mailing list, but apparently my e-mail was not approved by the moderators.
Comment 47 Adolfo Jayme 2014-07-03 13:22:34 UTC
(In reply to comment #46)
> I have sent a fix proposal to the mailing list, but apparently my e-mail was
> not approved by the moderators.

libreoffice at lists.freedesktop.org, the developer list, does not use moderation nor subscription (you can tell by the high amount of spam it gets). Where did you send your patch?

BTW, using Gerrit is much preferred (http://wiki.documentfoundation.org/gerrit).
Comment 48 Daniel Rech 2014-07-04 12:20:02 UTC
(In reply to comment #47)
> (In reply to comment #46)
> > I have sent a fix proposal to the mailing list, but apparently my e-mail was
> > not approved by the moderators.
> 
> libreoffice at lists.freedesktop.org, the developer list, does not use
> moderation nor subscription (you can tell by the high amount of spam it
> gets). Where did you send your patch?
> 
> BTW, using Gerrit is much preferred
> (http://wiki.documentfoundation.org/gerrit).

This is the e-mail I received back after submitting my own:

"
Your mail to 'LibreOffice' with the subject
 
    [PATCH] Only capture multimedia key events on Windows when in
presentation mode
 
Is being held until the list moderator can review it for approval.
 
The reason it is being held:
 
    The message headers matched a filter rule
 
Either the message will get posted to the list, or you will receive
notification of the moderator's decision.  If you would like to cancel
this posting, please visit the following URL:
"
Comment 49 Samuel Mehrbrodt (CIB) 2014-07-04 21:17:12 UTC
Hi Daniel,

I think you can just add your patch as an attachment to this bug.
Comment 50 QA Administrators 2014-10-23 17:31:36 UTC Comment hidden (obsolete)
Comment 51 Adolfo Jayme 2014-10-23 17:43:07 UTC
(Ignore the bot message.)

@Daniel: please attach your git-formatted patch in this bug or use Gerrit. Thanks.
Comment 52 Wormbo 2014-10-23 17:43:48 UTC
The multimedia keys still get blocked by LibreOffice v4.2.5.2 on Windows 7 Professional x64 SP1 with all latest patches.
Tested by opening LibreCalc while having foobar2000 open in the background and pressing the Play key - nothing happened. Clicking the taskbar or Windows desktop or unfocusing all LibreOffice windows in any other way returns control of global multimedia keys back to foobar2000.

I also tested Media Player Classic and XMPlay. Interestingly, they are not affected - they can also be controlled while a LibreOffice window has the focus.
Comment 53 Orwel 2014-10-24 07:31:24 UTC
I confirm the volume keys are still blocked by LO Version: 4.3.2.2, Win7 64bit SP1. Tested with internet radio, WinAmp player.
Comment 54 Daniel 2014-12-09 00:54:36 UTC
Just coming back to say that this bug still exists in 4.3.4.1

I am using Windows7 SP1 x64 bit. 

Tested with Spotify, Windows Media Player, Win Amp
Comment 55 xbaercombo 2014-12-30 13:49:38 UTC
Just here to say: Bug still exists in Version 4.3.5.2
(Also happens with foobar2000 playing. But even if there is no music playing and LibreOffice is active, the volume keys won't work but the windows volume bar does.)
Using Win7 64bit SP1.
Comment 56 mreeuwij 2015-01-05 15:42:29 UTC
With the newest version of LibreOffice (v4.3.5.2) this bug is still a problem. Either LibreOffice is getting keyboard input from the wrong place, or they do it wrong. 

I saw  response (Comment 1) about "generalizing as unlike any other program". I've tried and used thousands of programs, applications. None had this problem. Apparently none of the programmers on this even HAS a media keyboard. 

This bug is there already for 4 years. FOUR YEARS. And should be very easy to solve. 

Older bugs should get automatically a higher priority to solve over time. After 4 years it should be Importance: "highest / blocker"

How are any changes ever even being considered if older bugs are never solved. Sure OpenOffice has the same problem, but why would LibreOffice need "OpenOffice's permission" to improve... tho it was the entire point of the initiative...
Comment 57 Caolán McNamara 2015-01-15 11:11:57 UTC
Let me have a stab at this. Albeit I'm not on windows so will need testing afterwards by someone to see if it works right.
Comment 58 Commit Notification 2015-01-15 11:18:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=508c020cf5f7999f0c23d972133f9b6bf85de245

Resolves: fdo#32664 pass keyboard media keys through to the OS

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 59 Caolán McNamara 2015-01-15 11:19:45 UTC
here's hoping
Comment 60 Maarten Hoes 2015-01-15 14:18:32 UTC
(In reply to Caolán McNamara from comment #57)
> Let me have a stab at this. Albeit I'm not on windows so will need testing
> afterwards by someone to see if it works right.

For what it's worth: It looks like I can accurately reproduce this bug with my ancient Dell keyboard: On my Windows 8.1 machine, when writer has focus, my volume up/down dial/button does not function anymore. I can try the daily tommorrow to see if this fixes the issue as I experience it.
Comment 61 Maarten Hoes 2015-01-16 07:26:16 UTC
I tested with master, commit: 4c93c341be1425401112eed3581e8b8a6308880d 2015-01-16_01:53:40.
With this version, when Writer has focus, I can correctly use my volume dial/button. This fixes the issue for me.
Comment 62 dennisschagt 2015-01-16 07:58:36 UTC
I had the same problem and I can confirm that your fix solved it, thank you.
Tested on 64-bit Windows 7 with the daily build of January 16th.
Comment 63 Commit Notification 2015-01-19 16:26:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=45cf94410091478a09cc1eadc1b5510a5548ad15&h=libreoffice-4-4

Resolves: fdo#32664 pass keyboard media keys through to the OS

It will be available in 4.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 64 g4827387 2017-08-21 16:07:36 UTC
THIS BUG ISN'T FIXED

At my Manjaro laptop and Win7 Desktop, LO is still capturing XF86AudioLowerVolume and XF86AudioRaiseVolume for its own media player which I don't use nor have in the bars.

Also those hotkeys can't be configured in LO's settings.

A diplomatic solution is to make those hotkeys configurable. Everyone happy. 

Otherwise. Please get rid of the media player. There is better software like VLC out there.
Comment 65 g4827387 2017-08-21 16:08:50 UTC
LO version 5.3.5.2 that is.
Comment 66 g4827387 2017-08-21 16:11:53 UTC
Another fix would be that LO only listens to keystrokes configured to and do nothing at misc keystrokes.
Comment 67 Caolán McNamara 2017-08-28 12:28:42 UTC
Please don't reopen bugs that were considered closed 2+ years ago even if it has the same symptoms, file a new one and feel free to refer to the ancient one for reference.