Bug 164388 - Missing Hotkey for switching windows in macOS
Summary: Missing Hotkey for switching windows in macOS
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: macOS-UI-polish
  Show dependency treegraph
 
Reported: 2024-12-20 10:30 UTC by Dennis Roczek
Modified: 2025-01-03 14:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Snapshot of "move focus to next window" keyboard shortcut setting (770.55 KB, image/png)
2024-12-22 16:45 UTC, Patrick (volunteer)
Details
Snapshot of system Keyboard Shortcuts with the German - Standard Keyboard Viewer (2.65 MB, image/png)
2024-12-22 17:11 UTC, Patrick (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Roczek 2024-12-20 10:30:31 UTC
Description:
See https://techwiser.com/ways-to-switch-between-windows-of-same-app-in-mac/
this is sadly not possible in LibreOffice nor is it possible to add the hotkey.

Steps to Reproduce:
press Command + ` 

Actual Results:
nothing happens

Expected Results:
Switch to the next open LibreOffice window


Reproducible: Always


User Profile Reset: Yes

Additional Info:
There is also no possibility to assign the hotkey manually.
Comment 1 Dennis Roczek 2024-12-22 14:04:26 UTC
Hi Patrick,

I just downloaded NeoOffice and realized, that this feature is even not in NeoOffice integrated through you have integrated the native tabs feature (which is still not used by many apps).

Really sad, that we do miss so many integration features. :-(
Comment 2 Patrick (volunteer) 2024-12-22 14:35:26 UTC
I cannot reproduce this bug. I opened 2 empty Writer document and Command-` rotates focus as expected. I tried this the other day with a few keyboard but didn't see any problems. Maybe this bug only occurs which a specific keyboard layout?:

Version: 24.8.4.2 (AARCH64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 8; OS: macOS 15.2; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 3 Dennis Roczek 2024-12-22 15:51:37 UTC
Ok, I guess there are multiple problems here.


1) (minor) the standard menu entry under the menu bar "Window" is not implemented as in many other apps
2) (minor) not able to configure this in LO settings
3) with my many macbooks (german phisical keyboards) it is neither working using cmd ` nor cmd < (the German macos std) using German or EN-Us libreoffice UI (LODev without language pack)
4) but this is also not working using a German Ui (both macos and libreoffice) using a mac with physical en-us keyboard on
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 4; OS: macOS 12.7.6; UI render: Skia/Raster; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
MacBook Pro (Retina 13 Zoll, Anfang 2015)

So I guess the underlying problem comes from the installed language pack of LO...
Comment 4 Patrick (volunteer) 2024-12-22 15:55:06 UTC
(In reply to Dennis Roczek from comment #3)
> Version: 24.8.2.1 (X86_64) / LibreOffice Community

And what problems are there in 24.8.4.2? I committed a few patches after 24.8.2.1 that fixed keyboard shortcuts for non-US QWERTY keyboards.
Comment 5 steve 2024-12-22 16:02:39 UTC
From what I understand, macOS does not allow switching windows in application switcher, which only switches applications.

Personally use https://github.com/lwouis/alt-tab-macos/ which allows switching between all open windows and is one of the first tools to install on any new mac.

Is there documentation about the reproduce keyboard shortcut?
Steps to Reproduce: press Command + ` 

Am I understanding correctly that I need to press cmd + shift + `´-key?

For me that does nothing.

I am not using german language pack, as I gave up on language packs in LO a while ago. Using default en-download.

Version: 24.8.4.2 (AARCH64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 12; OS: macOS 15.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Patrick (volunteer) 2024-12-22 16:04:55 UTC
(In reply to Patrick (volunteer) from comment #4)
> (In reply to Dennis Roczek from comment #3)
> > Version: 24.8.2.1 (X86_64) / LibreOffice Community
> 
> And what problems are there in 24.8.4.2? I committed a few patches after
> 24.8.2.1 that fixed keyboard shortcuts for non-US QWERTY keyboards.

Note: for the German - Standard and ABC QWERTZ keyboard layouts, the Command-` shortcut maps to Shift-Command-= on my physical US QWERTY keyboard. The Shift key is necessary with at least those particular keyboards to get to ` character.
Comment 7 steve 2024-12-22 16:10:12 UTC
in TextEdit cmd + shift + `´ does indeed switch windows.

LibreOffice should behave the same, thus confirming the bug.

Unsure if this worked in the past (regression) or if this is a feature request.
Comment 8 Patrick (volunteer) 2024-12-22 16:11:39 UTC
(In reply to steve from comment #7)
> in TextEdit cmd + shift + `´ does indeed switch windows.
> 
> LibreOffice should behave the same, thus confirming the bug.

I still cannot confirm this with either German - Standard or ABC QWERTZ.
Comment 9 Dennis Roczek 2024-12-22 16:16:35 UTC
(In reply to Patrick (volunteer) from comment #6)
> (In reply to Patrick (volunteer) from comment #4)
> > (In reply to Dennis Roczek from comment #3)
> > > Version: 24.8.2.1 (X86_64) / LibreOffice Community
> > 
> > And what problems are there in 24.8.4.2? I committed a few patches after
> > 24.8.2.1 that fixed keyboard shortcuts for non-US QWERTY keyboards.
> 
> Note: for the German - Standard and ABC QWERTZ keyboard layouts, the
> Command-` shortcut maps to Shift-Command-= on my physical US QWERTY
> keyboard. The Shift key is necessary with at least those particular
> keyboards to get to ` character.

On QWERTZ it should be cmd > (the one without shift).
Comment 10 steve 2024-12-22 16:22:39 UTC
Ooookay... so this works with the internal MacBook Pro keyboard, but not with an external keyboard. Baffled...
Comment 11 Dennis Roczek 2024-12-22 16:37:15 UTC
https://communities.apple.com/de/thread/254921157?sortBy=rank

In German, use translator. It is configurable in the system settings and on a German QWERTZ i/ German system it should be cmd< or cmd> (depending on the direction)
Comment 12 Patrick (volunteer) 2024-12-22 16:44:08 UTC
(In reply to steve from comment #10)
> Ooookay... so this works with the internal MacBook Pro keyboard, but not
> with an external keyboard. Baffled...

So I connected a physical US QWERTY Logitech bluetooth keyboard and set the macOS keyboard layout to German - Standard. It's a Windows-like keyboard so it took a minute or so to figure out where the Command key is mapped to but I was eventually able to find using the Keyboard Viewer.

Anyway, both German - Standard ABC QWERTZ and my cheap bluetooth keyboard work just fine.
Comment 13 Patrick (volunteer) 2024-12-22 16:45:39 UTC
Created attachment 198228 [details]
Snapshot of "move focus to next window" keyboard shortcut setting
Comment 14 Patrick (volunteer) 2024-12-22 16:47:39 UTC
(In reply to Dennis Roczek from comment #11)
> https://communities.apple.com/de/thread/254921157?sortBy=rank
> 
> In German, use translator. It is configurable in the system settings and on
> a German QWERTZ i/ German system it should be cmd< or cmd> (depending on the
> direction)

Are you sure that is actually what is set in the System Preferences application? I understand that may be the default if your Mac is initially installed as German. But the keyboard shortcut is configurable (see attachment #198228 [details]).
Comment 15 Patrick (volunteer) 2024-12-22 16:52:50 UTC
(In reply to Patrick (volunteer) from comment #14)
> Are you sure that is actually what is set in the System Preferences
> application? I understand that may be the default if your Mac is initially
> installed as German. But the keyboard shortcut is configurable (see
> attachment #198228 [details]).

Just for fun, I switched my keyboard to ABC QWERTZ and changed that shortcut to Command-< (which is Command-` on my physical US QWERTY keyboard) and that works with LibreOffice 24.8.4. What else am I missing?
Comment 16 Patrick (volunteer) 2024-12-22 17:11:57 UTC
Created attachment 198229 [details]
Snapshot of system Keyboard Shortcuts with the German - Standard Keyboard Viewer

(In reply to Patrick (volunteer) from comment #15)
> Just for fun, I switched my keyboard to ABC QWERTZ and changed that shortcut
> to Command-< (which is Command-` on my physical US QWERTY keyboard) and that
> works with LibreOffice 24.8.4. What else am I missing?

Added a snapshot of what I changed. Note: I have my keyboard set to German - Standard (maybe a slight bit different than ABC QWERTZ?) when I entered the new shortcut in the System Preferences application.

Note: I pressed Command and the "<" key highlighted in white in the Keyboard Viewer when I changed the keyboard shortcut.

I still am guessing that you will need my keyboard fixes in LibreOffice 24.8.4 for this shortcut to work.
Comment 17 Patrick (volunteer) 2024-12-22 17:58:55 UTC
(In reply to Dennis Roczek from comment #3)
> So I guess the underlying problem comes from the installed language pack of
> LO...

For completeness, I installed the LibreOffice 24.8.4 German language pack, moved German to the first (preferred) language in the System Preferences application, set the "move to next window" keyshort using the ABC QWERTZ keyboard to Command-<. I then launched LibreOffice, opened two Writer windows, and pressing Command-< with an ABC QWERTZ keyboard moved to the next LibreOffice window as expected.

So I don't think it is the German Language Pack.
Comment 18 steve 2024-12-23 00:13:13 UTC
Ok now I am lost I have to admit. After reading Patricks feedback I gave this another spin and am now able to switch between to LO 24.8.4.2 writer windows using 

cmd + shift + `´key

Back to unconfirmed I guess 😵‍💫

Dennis: for the sake of it, could you restart and  confirm the issue is then persisting?

I am testing on macOS 15.2. Iirc you were running an older macOS vesion on your MacBook, right?
Comment 19 Patrick (volunteer) 2024-12-23 15:54:19 UTC
(In reply to steve from comment #18)
> I am testing on macOS 15.2. Iirc you were running an older macOS vesion on
> your MacBook, right?

Per comment #3, @Dennis is using macOS 12.7.6. I still have an old macOS 12.7.6 volume on my Mac Silicon laptop. So I rebooted into that and repeated all of the steps in comment #16 plus comment #17 but I still cannot reproduce this bug:

Version: 24.8.4.2 (AARCH64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 8; OS: macOS 12.7.6; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Realistically, I suspect that this is a machine-specific problem since no one other than @Dennis can reproduce this. All I can think of is that maybe the Command-< key events are getting intercepted by some other application or utility (e.g. clipboard managers, accessiblity tools such as Rectangle).
Comment 20 Patrick (volunteer) 2024-12-23 17:39:36 UTC
(In reply to Patrick (volunteer) from comment #19)
> Realistically, I suspect that this is a machine-specific problem since no
> one other than @Dennis can reproduce this. All I can think of is that maybe
> the Command-< key events are getting intercepted by some other application
> or utility (e.g. clipboard managers, accessiblity tools such as Rectangle).

One other thing to try: restart LibreOffice in safe mode by selecting the Help > Restart in Safe Mode. Then, in the dialog that appears, check the "Reset to factory settings" checkbox as well as the 2 checkbox below that checkbox and press the "Apply Changes and Restart" button.

Why this may help: I did a little test and set the "move to next window" shortcut to Command-a. Then, if I restart LibreOffice, Safari, etc. and open two windows, Command-a does not work in any application that has an Edit > Select All with Command-a as its shortcut. In both Safari and LibreOffice, pressing Command-a causes the Edit menu to flash in the menubar and, if any text is selected, the text is selected.

What is going on: when you press a Command shortcut, macOS looks for a match in the active application's menus. Only if a match is *not* found, does macOS look a the system preferences settings for a shortcut match.

Resetting LibreOffice's settings clears any custom shortcuts that you may have modified that might be intercepting the Command-< shortcut. Since I could not reproduce the bug even with the German language pack running German UI, I assume that, at least in Writer, the LibreOffice 24.8.4 German language pack does *not* set any menu shortcuts to Command-< but I didn't test Calc or Impress.
Comment 21 steve 2024-12-24 11:52:59 UTC
Tested on another 15.2 mac with 24.8.2.1 and cmd + shift + `´ worked.

macOS Language & Region: Preferred Languages English (US)
Region: Germany

I tend to agree with: Realistically, I suspect that this is a machine-specific problem since no one other than @Dennis can reproduce this. All I can think of is that maybe the Command-< key events are getting intercepted by some other application or utility (e.g. clipboard managers, accessiblity tools such as Rectangle).

Should we set this to notourbug? Dennis: can you try to find out if the shortcut may be taken by another app?

To verify if this is a setup issue with your machine you could setup a new test user on macOS, this is quickly done, install LO and see if the shortcut works as expected.
Comment 22 Patrick (volunteer) 2024-12-24 23:06:49 UTC
(In reply to steve from comment #21)
> To verify if this is a setup issue with your machine you could setup a new
> test user on macOS, this is quickly done, install LO and see if the shortcut
> works as expected.

This is a really good idea. Create a non-administrator (i.e. standard) user, switch to the user, install LibreOffice 24.8.4 in a different folder (e.g. the new user's Desktop), and run it.

That way, you should have default system preferences, LibreOffice preferences, and no LibreOffice extensions or third-party tools in the menubar.
Comment 23 Dennis Roczek 2025-01-03 14:56:37 UTC
I'm feeling so stupid! Everything works as expected. There is a difference in "Deutsch" und "ABC Deutsch" and it is not switching the cmd+< to cmd+´ by the installation... -.-

(In reply to steve from comment #10)
> Ooookay... so this works with the internal MacBook Pro keyboard, but not
> with an external keyboard. Baffled...
Switching to something else the external keyboard layout and back solves my issue on my M1 with the Matis-Bluetooth keyboard finally (not my laptop, so this seldom bother me). Totally strange macos behavior, but this also solved some other strange occurrences (like option+L does not type an @ on the German keyboard layout).

sorry for the late response. I'm totally having too many tasks on my desk atm.