Bug 114858 - Default keyboard mapping of Cmd+` (QUOTELEFT_MOD1) to uno:ToggleFormula not friendly to Apple HIG
Summary: Default keyboard mapping of Cmd+` (QUOTELEFT_MOD1) to uno:ToggleFormula not f...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Mac OS X (All)
: medium normal
Assignee: Yousuf Philips (jay) (retired)
URL:
Whiteboard: target:6.1.0 target:6.0.3
Keywords:
: 116087 116426 117027 (view as bug list)
Depends on:
Blocks: Shortcuts-Mac Shortcuts-Grave
  Show dependency treegraph
 
Reported: 2018-01-05 22:32 UTC by bunkem
Modified: 2018-10-10 16:06 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen capture of switching between open windows (917.12 KB, application/x-matroska)
2018-01-10 18:49 UTC, bunkem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bunkem 2018-01-05 22:32:31 UTC
Description:
In LO 6.0 nightly the default keyboard shortcut mapping to change to another open document has been changed. In LO 5.x it follows Mac usability stds. ie. CMD+~ (command+tilde) changes between open documents.  This is a standard for all Mac applications.  In LO 6.0 the default mapping has changed and now CMD+~ switches between showing formulas or calculated cells.

The Mac std. is CMD+Tab to switch between open applications and CMD+~ to switch between open documents for an application.

Steps to Reproduce:
1.Open LO 6.0 nightly
2.Open two documents (one being a spreadsheet)
3.From the spreadsheet attempt to switch to the second open document using CMD+~

Actual Results:  
CMD+~ changes the Calc cells to show formulas instead of switching between open documents

Expected Results:
CMD+~ switch between open documents




Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
LO 5.4.4 does this correctly.


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 Alex Thurgood 2018-01-08 09:59:59 UTC
No repro for me with my master build:

Version: 6.1.0.0.alpha0+
Build ID: 5b7ec49f453c3732e2482b26bce4243eb1a10f40
CPU threads: 4; OS: Mac OS X 10.13.2; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group threaded

so not sure where the difference lies.

@bunkem : which nightly build did you use ?
Comment 2 bunkem 2018-01-08 16:34:07 UTC
Here is the nightly info:

I believe the last one I installed was Jan 2, 2018.

Version: 6.0.0.1.0+
Build ID: 24b3fc49238b1890769fa45571a3043646e4e4b9
CPU threads: 8; OS: Mac OS X 10.11.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-0, Time: 2018-01-02_10:09:44
Locale: en-CA (en.UTF-8); Calc: group
Comment 3 bunkem 2018-01-08 17:31:43 UTC
Still happens with Jan 8th nightly:

download file:
libreoffice-6-0~2018-01-08_09.14.08_LibreOfficeDev_6.0.0.1.0_MacOS_x86-64.dmg

Version info:
Version: 6.0.0.1.0+
Build ID: 8b9582855a529823191ed6a12b96ec10ac8e2dec
CPU threads: 8; OS: Mac OS X 10.11.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-0, Time: 2018-01-08_09:14:08
Locale: en-CA (en.UTF-8); Calc: group

This keyboard shortcut command is OK with v5.4.4002

I noticed that it only happens when a Calc document is in the front or active window. The CMD+~ is switching the view to see formulas or calculation. It isn't changing the active document as it should.

If you have an Impress or Writer document open and active, the CMD+~ works properly.
Comment 4 Xisco Faulí 2018-01-10 10:15:23 UTC
Unfortunately it hasn't been possible for me to reproduce the problem with the provided instructions. If possible, create and attach a screencast showing the steps. There are various free screencast software available for use, including Camstudio (Windows), Jing (Mac), Simple Screen Recorder (Linux) or screencast-o-matic.com (Web).
Comment 5 bunkem 2018-01-10 18:16:55 UTC
I will attach a screen capture as requested. A screen capture won't show the keys cmd+~ being pressed only what happens on the screen.  I'm not sure this will help you but I'll post it later today.
Comment 6 bunkem 2018-01-10 18:49:52 UTC
Created attachment 139029 [details]
Screen capture of switching between open windows
Comment 7 bunkem 2018-01-16 20:00:57 UTC
Still is happening in:
LO Dev 2018-01-16 release
Version: 6.0.1.0.0+
Build ID: 8c2361ec6815e8ab37858c347405b96cd5771b12
CPU threads: 8; OS: Mac OS X 10.11.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-0, Time: 2018-01-16_11:45:01
Locale: en-CA (en.UTF-8); Calc: group
Comment 8 V Stuart Foote 2018-01-27 00:18:50 UTC
Confirming. But actually, the Apple key binding [1] is not "~", rather it is "`" or the "Grave accent". 

But it seems LibreOffice has long assigned the .uno:ToggleFormula (or its predecessor in src) to the "QUOTELEFT_MOD1".

And, this is somewhat minor, in that <Shift><Cmd>+` (QUOTELEFT_SHIFT_MOD1 is undefined in LO) still correctly cycles between macOS app frames--just in reverse order.

Not clear what mapping was in place through 5.x that allowed the OSX shortcut to assert. Some recent work on the accelerators and menu behavior may have jogged something. Should be able to restore the behavior with a install:module="macosx" stanza in Accelerators.xcu

=-ref-=
[1] https://developer.apple.com/macos/human-interface-guidelines/user-interaction/keyboard/

[2] https://cgit.freedesktop.org/libreoffice/core/tree/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu#n1080
Comment 9 bunkem 2018-01-27 19:37:30 UTC
Yes @V Stuart Foote, that is correct.  It is the CMD+`.  The ~ is above the ` on my keyboard.  I goofed.  Apologies for any confusion caused.

CMD+~ is to switch between open windows in the opposite order.
Comment 10 Heiko Tietze 2018-01-27 20:57:07 UTC Comment hidden (off-topic)
Comment 11 V Stuart Foote 2018-01-27 22:24:57 UTC
Hey Michael M., looking at oo era i56202 implementing this control [1] did not consider the OSX UI conflict. Would using the typewriter "apostrophe" (U+0027) be the better choice, even if on Windows en-US MS Excel does use the "Grave accent" for its toggle?

Currently in Customize dialog we can assign the .uno:ToggleFormula "Show Formula" to another keyboard shortcut, but for some reason the "Grave accent" does not show on the View menu or in the customize dialog as assigned.

=-ref-=
[1] https://bz.apache.org/ooo/attachment.cgi?id=39987&action=diff
Comment 12 Yousuf Philips (jay) (retired) 2018-01-28 15:54:49 UTC
(In reply to V Stuart Foote from comment #11)
> Hey Michael M., looking at oo era i56202 implementing this control [1] did
> not consider the OSX UI conflict. Would using the typewriter "apostrophe"
> (U+0027) be the better choice, even if on Windows en-US MS Excel does use
> the "Grave accent" for its toggle?

They did consider the OSX UI conflict and still chose to use it[1]. Ctrl+' is already set on Calc so it isnt a suitable shortcut. I checked Excel and Google Sheets and they use Ctrl rather than Cmd for this shortcut on Mac to not conflict with the OS shortcut, so we should do the same, just like we do with other commands that have conflicts with using Cmd.

https://gerrit.libreoffice.org/48793

> Currently in Customize dialog we can assign the .uno:ToggleFormula "Show
> Formula" to another keyboard shortcut, but for some reason the "Grave
> accent" does not show on the View menu or in the customize dialog as
> assigned.

Filed separate bugs for grave not showing in View menu (bug 115281) and not appearing in customization dialog (bug 115282).

[1] https://wiki.openoffice.org/wiki/Mac_OS_X_Porting_-_Keyboard_Shortcuts#Special_keys
Comment 13 V Stuart Foote 2018-01-28 17:59:45 UTC
(In reply to Yousuf Philips (jay) from comment #12)
> 
> https://gerrit.libreoffice.org/48793
>

That would do it, and the "QUOTELEFT_MOD3" Ctrl+Grave accent (^+`) would then match MS handling for Excel on Mac.  It would avoid overriding OS DE default of Cmd+Grave accent/Shift+Cmd+Grave accent (⌘+`/⇧+⌘+`) movement between windows of the "frontmost" application.
Comment 14 ace_dent 2018-02-13 21:26:50 UTC
Just to add my +1. Recently upgraded to 6.0 series on the Mac and hit this problem immediately. It really is a major issue to not be able to cycle through open windows.
Comment 15 bunkem 2018-02-13 22:24:36 UTC
Thanks for looking at this.  Any idea when this will show up in a release or nightly?  It is driving me crazy since I used Calc daily. I've moved back to Excel for a while since the effect on productivity is significant.

I had no idea that this originated in OOo because this wasn't an issue in the LO v5.x tree.
Comment 16 Commit Notification 2018-02-14 09:37:58 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=532576461654eaf43120d2f693172c07a41275fa

tdf#114858 Use Ctrl+` for Formula Toggle on Mac

It will be available in 6.1.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 17 Yousuf Philips (jay) (retired) 2018-02-14 10:36:59 UTC
(In reply to bunkem from comment #15)
> Thanks for looking at this.  Any idea when this will show up in a release or
> nightly?

I've just pushed it into master, so please test it and confirm it works fine, so that i can then be backported.

> I had no idea that this originated in OOo because this wasn't an issue in
> the LO v5.x tree.

Quite strange that you and ace_dent both say the behaviour didnt show up in 5.x as the shortcut hasnt changed since the OOo days. So did the shortcut not previously work to show the formula and correctly work to cycle windows? If you can, please test 5.2 and 5.4 to see what happens there, as it might be due to the command appearing in the View menu.
Comment 18 Alex Thurgood 2018-03-01 13:56:32 UTC
*** Bug 116087 has been marked as a duplicate of this bug. ***
Comment 19 Yousuf Philips (jay) (retired) 2018-03-02 09:23:23 UTC
Alex, bunkem, stuart, heiko, telesto: can someone test this in master to confirm it works correctly so it can be backported to 6.0.
Comment 20 Heiko Tietze 2018-03-02 12:36:22 UTC
(In reply to Yousuf Philips (jay) (retired) from comment #19)
> Alex, bunkem, stuart, heiko, telesto: can someone test this in master..

On my German keyboard things are different (to get the tilde I have to press alt+n). Switching between open windows is (shift+)cmd+< and LibO complies with that. However, the shortcut is not shown in the main menu, like per "Next Window (Cmd+~)".

Show formula (.uno:ToggleFormula) is not assigned to any key, as on Linux.
Comment 21 bunkem 2018-03-02 15:49:58 UTC
(In reply to Yousuf Philips (jay) (retired) from comment #19)
> Alex, bunkem, stuart, heiko, telesto: can someone test this in master to
> confirm it works correctly so it can be backported to 6.0.

Sure, happy to help.  Is the "master" the nightly build?  If not, then where do I find the "master"?
Comment 22 bunkem 2018-03-02 15:54:25 UTC
Ah, found the master.  But the link from current to the dmg is broken.
https://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@49-TDF/current
404 Not Found.
Comment 23 V Stuart Foote 2018-03-02 16:02:03 UTC
@cloph, could you give the OSX TB49 a nudge...
Comment 24 Alex Thurgood 2018-03-07 08:12:33 UTC
I don't have Cmd-tilde on my keyboard (at least not without some other combo shenanigans), at least for me on my FR Mac wireless keyboard, the switch windows shortcut is Cmd-grave (key above the right hand shift key).
Comment 25 bunkem 2018-03-07 19:32:21 UTC
The link to master is back and so I tested version:

Version: 6.1.0.0.alpha0+
Build ID: 2523f32dc68d35b69a7b0ee9764e61f7d8efb3ce
CPU threads: 8; OS: Mac OS X 10.11.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-07_00:00:19
Locale: en-US (en.UTF-8); Calc: group

The 6.1.0.0.alpha0+ works as expected and the cmd+`(QUOTELEFT_MOD1) works properly now.

Thanks everyone for fixing this.
Comment 26 Yousuf Philips (jay) (retired) 2018-03-08 20:32:39 UTC
6.0 backport: https://gerrit.libreoffice.org/#/c/50971/
Comment 27 Commit Notification 2018-03-15 15:59:20 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=036bf5c78a3ead56f48b4be4d0462e23242c80e0&h=libreoffice-6-0

tdf#114858 Use Ctrl+` for Formula Toggle on Mac

It will be available in 6.0.3.

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 28 V Stuart Foote 2018-03-16 04:13:51 UTC
*** Bug 116426 has been marked as a duplicate of this bug. ***
Comment 29 Mike Saunders 2018-03-19 10:07:49 UTC
Just to add, in case it helps, on my MacBook Pro (2013) with UK keyboard, cmd+` is also used to switch between open windows within a single application.
Comment 30 landi 2018-03-20 22:55:21 UTC
Is there a fixed version of 6.0.3 or 6.1.x with this patch that can be tested? I'm having trouble finding a current build.
Comment 31 V Stuart Foote 2018-03-20 23:12:58 UTC
Fixed on master 2018-02-14 [1] so any of these builds will have it:

https://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@49-TDF/

Backport to 6.0 pushed 2018-03-15 [2], but as the TB49 of 6.0 is not turning builds at the moment so you'd have to test on master.

https://dev-builds.libreoffice.org/daily/libreoffice-6-0/MacOSX-x86_64@49-TDF/


=-ref-=
[1] https://cgit.freedesktop.org/libreoffice/core/commit/?id=532576461654eaf43120d2f693172c07a41275fa

[2] https://cgit.freedesktop.org/libreoffice/core/commit/?id=036bf5c78a3ead56f48b4be4d0462e23242c80e0&h=libreoffice-6-0
Comment 32 landi 2018-03-21 15:02:36 UTC
It's not fixed in either of these builds:

Version: 6.0.3.0.0+
Build ID: e722d9a406da01514bb256def98624da3eafee0c
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-0, Time: 2018-03-13_10:45:37
Locale: en-US (en_US.UTF-8); Calc: group


Version: 6.1.0.0.alpha0+
Build ID: 8e8dd8f320a3ff59ff8a16c1a7a867888ce80700
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-13_23:59:29
Locale: en-US (en_US.UTF-8); Calc: group
Comment 33 V Stuart Foote 2018-03-21 16:55:17 UTC
Install to desktop with new profile --> bootstraprc edit $SYSUSERCONFIG changed to $ORIGIN/../Data/settings

Version: 6.1.0.0.alpha0+
Build ID: 8e8dd8f320a3ff59ff8a16c1a7a867888ce80700
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-13_23:59:29
Locale: en-US (en_US.UTF-8); Calc: group

<cmd>+` advances between all LO modules, including Calc

<ctrl>+` performs Formula/Value toggle in active cell in Calc

Builds of master from 2018-02-15 onward function correctly. If not please reset user profile, or create a profile linked to $ORIGIN

No 6.0 branch build of 6.0.3+ has yet turned with the patch applied. The last 2018-03-13 build does not have it as commit was made 2018-03-15
Comment 34 landi 2018-03-28 13:13:50 UTC
It appears that it wasn't pushed to this version:

Version: 6.0.4.0.0+
Build ID: 90fb652ebbc4b16ae5001140076f52209e913345
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-0, Time: 2018-03-23_08:28:32
Locale: en-US (en_US.UTF-8); Calc: group

Or at least, I can't get it to work at this point.
Comment 35 V Stuart Foote 2018-03-28 18:05:43 UTC
On macOS 10.13.3 with
Version: 6.0.3.1
Build ID: 62abb169b0efa1520d7bee1f586865354060b989
CPU threads: 8; OS: Mac OS X 10.13.3; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

The commit is present in this 6.0.3.1 buildfix2 release build (2018-03-21 22:05:45).
The QUOTELEFT_MOD1 (macOS advance app frame), and QUOTELEFT_MOD3 (Calc formula toggle) shortcuts are functioning as they do on master.

=> WFM
Comment 36 Alex Thurgood 2018-04-23 07:15:40 UTC
*** Bug 117161 has been marked as a duplicate of this bug. ***
Comment 37 Alex Thurgood 2018-04-23 07:16:26 UTC
*** Bug 117027 has been marked as a duplicate of this bug. ***
Comment 38 Alex Thurgood 2018-04-23 07:22:56 UTC
Sorry for erroneous duplicate reference in comment 36, fingers too fast for brain...
Comment 39 Alex Thurgood 2018-04-23 07:29:38 UTC
The reporter of bug 117027 indicates that they are still encountering the problem with LO6032.
Comment 40 Theo 2018-04-23 07:43:33 UTC
In can confirm that in safe mode on LO 6.0.3.2 cmd+~ works as expected on Mac.
Comment 41 landi 2018-10-10 16:06:39 UTC
I tested on the following, with the following results:

It DOES work on this version:

Version: 6.0.6.2
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU threads: 8; OS: Mac OS X 10.13.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group



Does NOT work on this version:

Version: 6.1.3.0.0+
Build ID: c523d9556a354e1afac3203b6f1c8b75a2f7d2f0
CPU threads: 8; OS: Mac OS X 10.13.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:libreoffice-6-1, Time: 2018-10-09_06:32:49
Locale: en-US (en_US.UTF-8); Calc: group threaded