Description: On my mac, I often used the keyboard shortcut command-option-space to trigger a certain OS operation (change input source). It works everywhere except LibreOffice Calc. When LibreOffice Calc is in the foreground, it intercepts this key combo and treats it as if I had typed a regular space. I checked under LibreOffice Calc Tools > Customize > Keyboard, and no keyboard shortcut is assigned for command-option-space. Steps to Reproduce: 1. In Mac System Settings, under Keyboard > Keyboard Shortcuts, assign command-option-space to Input Sources > Select next source in input menu. 2. In LibreOffice Calc, click on any cell. 3. Press the key combination command-option-space. Actual Results: A space character is entered into the cell. Expected Results: The key combination should be passed up to the OS and the "change input source" operation should happen. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 25.2.4.3 (AARCH64) / LibreOffice Community Build ID: 33e196637044ead23f5c3226cde09b47731f7e27 CPU threads: 8; OS: macOS 14.7.4; UI render: Skia/Raster; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
I can also reproduce this bug on macOS Tahoe: Version: 25.8.1.1 (AARCH64) Build ID: 54047653041915e595ad4e45cccea684809c77b5 CPU threads: 8; OS: macOS 26.0; UI render: Skia/Metal; VCL: osx Locale: en-CA (en_CA.UTF-8); UI: en-US Calc: threaded Note: on macOS Tahoe, the Command-Option-Space key shortcut is assigned by default so I also had to uncheck the Spotlight > Show Finder search window key shortcut in Keyboard > Keyboard Shortcuts.
Interestingly, the Command-Option-Space key shortcut actually works in an empty Writer document but not in Calc or Impress. Not sure how to debug that though.
Below is a debug patch that stops the bug from occurring. It isn't a fix but I think the next step would be to follow pChild->KeyInput( aKeyEvt ); in a debugger to see where it ends up converting Command-Option-Space to a Space event: diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index a75eb6ada250..1d4d3d421f20 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1232,8 +1232,10 @@ static bool ImplHandleKey( vcl::Window* pWindow, NotifyEventType nSVEvent, if ( nSVEvent == NotifyEventType::KEYINPUT ) { UITestLogger::getInstance().logKeyInput(pChild, aKeyEvt); - pChild->ImplGetWindowImpl()->mbKeyInput = false; - pChild->KeyInput( aKeyEvt ); + // Commenting out the following stops Command-Option-Space + // from inserting a space in Calc and Impress + // pChild->ImplGetWindowImpl()->mbKeyInput = false; + // pChild->KeyInput( aKeyEvt ); } else { @@ -1314,6 +1316,10 @@ static bool ImplHandleKey( vcl::Window* pWindow, NotifyEventType nSVEvent, else bRet = false; } + // Adding the following makes Command-Option-Space change the + // current input source in Calc and Impress + else + bRet = false; } else {
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ed45cdaef3d2807d0b9d6a4c08da375fc72024a6 tdf#168375 return false if both KEY_MOD1 and KEY_MOD2 are pressed It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I have committed a fix for this bug and the fix should be in tomorrow's (20 September 2025) nightly master builds: https://dev-builds.libreoffice.org/daily/master/current.html Note for macOS testers: the nightly master build installer does not overwrite any LibreOffice official versions. Instead, it will be installed as a separate application called "LibreOfficeDev" in the /Applications folder. Because this is a "test" build, you will need to do the following steps before you launch the LibreOfficeDev application: 1. Go to the Finder and navigate to the /Applications/Utilities folder 2. Launch the "Terminal" application 3. Paste the following command in the Terminal application window and press the Return key to execute the command: xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/2dc604d5dc088dd80c8254bf5e2bddd5acac3bf7 tdf#168375 return false if both KEY_MOD1 and KEY_MOD2 are pressed It will be available in 25.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Tested the nightly master build and the bug is fixed. Thank you!
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-25-8-2": https://git.libreoffice.org/core/commit/b91dc86a9cff565a009cf8ed003b6c0a65f8da2e tdf#168375 return false if both KEY_MOD1 and KEY_MOD2 are pressed It will be available in 25.8.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.