Bug 45705 - DRAW/IMPRESS: New UNO commands for "Zoom in" and "Zoom out" of document canvas, to support keyboard zoom (comment 47)
Summary: DRAW/IMPRESS: New UNO commands for "Zoom in" and "Zoom out" of document canva...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high enhancement
Assignee: Rafael Lima
URL:
Whiteboard: target:7.1.0 target:7.6.0
Keywords: easyHack, needsDevEval, topicUI
: 48485 52503 59617 68929 101867 104653 108895 112896 115217 118552 122391 122414 124331 136669 146240 153513 (view as bug list)
Depends on:
Blocks: Customize-Dialog-Keyboard UNO-Command-New Shortcuts-Accelerators Zoom
  Show dependency treegraph
 
Reported: 2012-02-06 07:48 UTC by Florian R. A. Angermeier
Modified: 2024-02-24 04:24 UTC (History)
38 users (show)

See Also:
Crash report or crash signature:


Attachments
Basic macro which has needed functionality (19.10 KB, application/vnd.oasis.opendocument.text)
2012-12-14 07:35 UTC, sasha.libreoffice
Details
variant of macro for presentations (21.69 KB, application/vnd.oasis.opendocument.presentation)
2012-12-14 10:14 UTC, sasha.libreoffice
Details
Zoom toolbar for Writer and Calc packaged as extension (6.21 KB, application/vnd.openofficeorg.extension)
2014-10-06 13:18 UTC, sasha.libreoffice
Details
Zoom toolbar for Impress packaged as extension (6.25 KB, application/vnd.openofficeorg.extension)
2014-10-06 13:20 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian R. A. Angermeier 2012-02-06 07:48:20 UTC
I want to propose a - i guess - simple improvement of the useablity.

It is at least affecting Writer (including Math and Web), Calc, Impress and Draw. I am not sure if there the possibility of zooming in Base.

Shortcuts for "Zoom in", "Zoom out" and "Zoom to 100 %". I have tried to find them but have not found one so I guess there noones at the moment. If I am wrong please let me know.

Ctrl + "+" and Ctrl + "-" are not free so they can not be used.

I would suggest:
(Ctrl +) Alt + "+" for "Zoom in"
(Ctrl +) Alt + "-" for "Zoom out"
(Ctrl +) Alt + "0" (Zero) for "Zoom to 100 %"

And maybe:
(Ctrl +) Alt + "2" for "Zoom to 200 %"
(Ctrl +) Alt + "5" for "Zoom to 50 %"

Anyone else who is interessted in such improvement?
Comment 1 sasha.libreoffice 2012-03-21 02:17:21 UTC
Thanks for new idea
Such functionality exist in InkScape. May be assign shortcuts as there for users not re-learn shortcuts?

Meanwhile, enable experimental functionality in settings, record Basic macros for this. Use Tools->Macros->Record macro.
Then assign produced macros to shortcuts. Use Tools->Customize, tab "Keyboard", category "LibreOffice macros"
Comment 2 peter Roots 2012-09-04 19:14:46 UTC
On Tools> Customise >Keyboard is is possible to attach the function Zoom in and Zoom out from the View category. Unfortunately these do not work even though Zoom does, but this is not that much use as a shortcut.
http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=47378
Comment 3 peter Roots 2012-09-04 19:18:22 UTC Comment hidden (obsolete)
Comment 4 sasha.libreoffice 2012-12-14 07:35:30 UTC
Created attachment 71489 [details]
Basic macro which has needed functionality

I have written Basic Macro which allows Zoom In, Zoom Out, Zoom 100% and some another.
Comment 5 Stefan Knorr (astron) 2012-12-14 09:25:01 UTC
*** Bug 52503 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Knorr (astron) 2012-12-14 09:32:13 UTC
Confirming with 4.1.0.0alpha0+ (master) for Writer, Calc and Math.
In Impress/Draw it works – with some hickups:
* only Alt-– and Alt–+ work, Alt-0 does nothing;
* it doesn't work immediately after opening a file, you have to click the
  document area first
* when editing text, it doesn't work either.
Comment 7 sasha.libreoffice 2012-12-14 10:14:59 UTC
Created attachment 71494 [details]
variant of macro for presentations
Comment 8 brian.bj.parker99 2013-03-10 08:05:59 UTC
In Mac OS X, CMD+ and CMD- are the standard keyboard commands for zooming across all applications, and it is quite disorienting to have otherwise in LibreOffice. 
As a special case for OS X, these shortcuts should be used (I believe they do not clash with anything else). (In particular, Draw currently counter-intuitively uses shift-+ and - to zoom).
Comment 9 Liam Morland 2014-06-08 16:15:41 UTC
*** Bug 68929 has been marked as a duplicate of this bug. ***
Comment 10 Liam Morland 2014-06-08 16:15:57 UTC
*** Bug 48485 has been marked as a duplicate of this bug. ***
Comment 11 Liam Morland 2014-06-08 16:16:18 UTC
*** Bug 59617 has been marked as a duplicate of this bug. ***
Comment 12 sasha.libreoffice 2014-10-06 13:18:55 UTC
Created attachment 107426 [details]
Zoom toolbar for Writer and Calc packaged as extension
Comment 13 sasha.libreoffice 2014-10-06 13:20:17 UTC
Created attachment 107427 [details]
Zoom toolbar for Impress packaged as extension
Comment 14 Yousuf Philips (jay) (retired) 2016-03-01 17:31:23 UTC
Was just about to submit a duplicate bug report because i was unable to assign a shortcut for the Zoom In and Out commands in the Customize dialog, though shortcuts for other Zoom commands worked fine - .uno:ZoomPage, .uno:ZoomPageWidth, .uno:ZoomOptimal, .uno:Zoom100Percent

I planned to set Zoom In and Zoom Out as Ctrl + Alt + Plus and Ctrl + Alt + Minus on all 3 platforms. (Cmd + Alt + Plus and Cmd + Alt + Minus on mac are reserved for screen zooming on Mac)

@Maxim, @Samuel, @Bubli: Any idea why these two commands are the only ones acting strange?
Comment 15 Yousuf Philips (jay) (retired) 2016-03-01 17:53:42 UTC
Adding the commands to the toolbar show that they are disabled, which would be the reason why they dont work with the shortcuts. But why as they work fine in print preview mode.
Comment 16 Maxim Monastirsky 2016-03-01 20:46:34 UTC
(In reply to Yousuf (Jay) Philips from comment #15)
> But why as they work fine in print preview mode.
They implemented only for print preview.
Comment 17 Yousuf Philips (jay) (retired) 2016-03-01 20:54:59 UTC Comment hidden (me-too)
Comment 18 Buovjaga 2016-09-23 19:57:43 UTC
*** Bug 101867 has been marked as a duplicate of this bug. ***
Comment 19 Mike Kaganski 2017-07-02 06:59:47 UTC
*** Bug 108895 has been marked as a duplicate of this bug. ***
Comment 20 Rogerio Luz Coelho 2017-09-17 15:16:09 UTC Comment hidden (obsolete)
Comment 21 Mike Kaganski 2017-09-17 18:11:48 UTC
(In reply to Rogerio Luz Coelho from comment #20)
> Now working on the 5.4.1.2 :
> 
> There are in the Customize > Keyboards > View > Zoom In / Out options for
> assigning shortcuts to these features, but the assignment does not work.

Wrong. It works. There's just misunderstanding about what this feature does. It is "zoom in/out in preview", which is unfortunately isn't explained well.

> Since the features IS available and it is broken, I changed the Importance
> of this bug.

Wrong. It is not broken, but is not implemented for what is expected by many users, that's why it's enhancement.

> Do not know if this ever worked in previous versions to be called a
> regression.

It is clearly stated in above discussion.
Comment 22 Mike Kaganski 2017-10-05 14:55:30 UTC
*** Bug 112896 has been marked as a duplicate of this bug. ***
Comment 23 Buovjaga 2018-02-16 16:35:08 UTC
*** Bug 115217 has been marked as a duplicate of this bug. ***
Comment 24 darrenllr 2018-02-20 07:14:16 UTC
Mine just got marked as a duplicate of this one - 

So I'll put it here also, not sure if anything is on the table to address the issue.

Also not sure how things are marked as 'bugs' or not, but according to the info on "How to report Bugs" at https://wiki.documentfoundation.org/QA/BugReport, this looks by definition to be a 'bug' :-

(..."Confirm that it really is a bug. Most of the time, a bug is something that makes the software behave in a way that a reasonable user would not want it to behave. This includes the software not doing what you want it to do")


LibreOffice Writer
Tools >
Customize >
Keyboard >
Category: View >

Set keys & Modify to:::

Zoom In = Ctrl++
Zoom Out = Ctrl--

Once modified in Keys, click OK

Nothing happens when using these keyboard shortcuts.

If you need anything else, just let me know.

Thanks ;-)

Steps to Reproduce:
LibreOffice Writer
Tools >
Customize >
Keyboard >
Category: View >

Set keys & Modify to:::

Zoom In = Ctrl++
Zoom Out = Ctrl--

Once modified in Keys, click OK

Nothing happens when using these keyboard shortcuts.

Actual Results:  
Nothing happens when using keyboard shortcuts

Expected Results:
Zoom in, and out (common keys Ctrl++, Ctrl-- work on lots of programs / applications - it's 2nd nature to use that key combo for me at least. 
 Probably for lots of others too, or a variant like Alt + for Photoshop etc.)


Reproducible: Always

User Profile Reset: No


Additional Info:
Not such an issue on a desktop (where a user would more often have a mouse with a scroll-wheel and can probably use Ctrl + scroll.

But on a laptop with a touchpad - not so convenient.

And, just not what I 'expect' after actually setting those in keyboard shortcuts etc.

Version: 5.3.7.2 (x64)
Build ID: 6b8ed514a9f8b44d37a1b96673cbbdd077e24059
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-GB (en_US); Calc: group
Comment 25 V Stuart Foote 2018-07-05 14:12:29 UTC
*** Bug 118552 has been marked as a duplicate of this bug. ***
Comment 26 Maxim Monastirsky 2019-01-24 15:25:59 UTC
*** Bug 104653 has been marked as a duplicate of this bug. ***
Comment 27 Maxim Monastirsky 2019-01-24 15:32:23 UTC
*** Bug 122391 has been marked as a duplicate of this bug. ***
Comment 28 V Stuart Foote 2019-03-26 23:48:21 UTC
*** Bug 124331 has been marked as a duplicate of this bug. ***
Comment 29 Xisco Faulí 2019-12-02 11:09:15 UTC
Changing priority to 'high' since the number of duplicates is 5 or higher
Comment 30 nurali.medeu01 2020-09-11 07:14:00 UTC
I am using LibreOffice 7.0.1.2 and this issue is still present, 8 years since the first report of this bug. I am curious, when are you going to fix it?
Comment 31 Tom Atkinson 2020-09-11 14:41:00 UTC
@Mike I agree, in fact I have written up an extended article / review that focuses *purely* on the Zoom In / Zoom Out bug, and even has a screenshot of a real bad outcome: a bunch of cells overwritten, and the "Insert Cells" dialog appearing surprisingly.

Please see:
https://tomachi.co/review-libre-office-zoom-in-out-bug/

I breifly thought it was getting addrsesed also, because I was poking about this bug report a lot while writing this blog. Fingers crossed yours and now my comment this one will be the stimulation required. I'm going to also post a fresh new bug (I know theres lot of dupes already but heck, I already wrote it up in the post above so it's no biggy. If I had a faster more powerful computer I'd look into setting up my build env for some potentially contributions open source stylee. But for now I prey to the gods of open-source!

PS perhaps a 'bug bounty' on stack exchange should be considered? to raise funds for the friendly programmer or team that finally fixes this one?
Comment 32 V Stuart Foote 2020-09-11 15:15:57 UTC
*** Bug 122414 has been marked as a duplicate of this bug. ***
Comment 33 Buovjaga 2020-09-11 15:35:13 UTC
*** Bug 136669 has been marked as a duplicate of this bug. ***
Comment 34 V Stuart Foote 2020-09-11 17:40:16 UTC
Currently document canvas Zoom is implemented for document via popup dialog, zoom bar, or <ctrl>+mousewheel events.

Projects zoom via key_MOD1+mousewheel will progressively increase or decrease zoom percentage, the needed function. It unfortunately requires use of a mouse.

Keyboard only Zoom-in or zoom-out action is possible currently but it is *very* cumbersome, i.e. F10 + v + z + z (or as mnemonics are localized) and then enter zoom percentage or select zoom preset radio button.

Enhancement is to supplement the dialog, zoom bar, and key_Mod1+mousewheel Zoom actions with new control(s) (zoom-in/zoom-out), using existing SVX zoomtools/zoomctrl/zoom framework.  A simple key_mod controlled keyboard only stepped adjustment of zoom level at the zoom steps defined in zoomtools.cxx, that could also be reassigned via keyboard customizations.

Implementing with default shortcut assignments to match os/DE norms would help make for a seamless UX.
Comment 35 V Stuart Foote 2020-09-12 13:22:31 UTC
@Jim R, if you are looking for something lighter weight as you wrap up Outline mode this might be appealing...
Comment 36 Jim Raykowski 2020-09-16 06:51:24 UTC
Here is a patch that integrates the existing .uno:ZoomPlus and .uno:ZoomMinus user interface commands into the Writer document canvas.

https://gerrit.libreoffice.org/c/core/+/102830
Comment 37 Commit Notification 2020-09-27 04:35:56 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2cddaa6e199ed8bb6185b7825791199f9da4a670

tdf#45705 Integrate zoom UI commands into Writer text edit view

It will be available in 7.1.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.
Comment 38 V Stuart Foote 2020-09-27 14:57:12 UTC
@Jim, looks great! 

We'll get to test drive with the 2020-09-28 TB nightlies...
Comment 39 Reuben Thomas 2020-09-27 15:11:19 UTC
Thanks very much to everyone involved in landing this enhancement!
Comment 40 V Stuart Foote 2020-10-01 18:45:03 UTC
Thanks Jim!

The shortcuts remain unassigned by default--and believe that is acceptable.

Rather the ZoomIn and ZoomOut UNO commands are now available to search for and assign via the Tools -> Customize dialog to the Writer module.

Zoom steps match well with behavior with Scroll wheel, so that is what most folks wanted--smooth keyboard zoom, in or out.

@Jim, Mike -- suitable for backport to 7.0?

=-testing-=
Version: 7.1.0.0.alpha0+ (x64)
Build ID: dda71436b8594fb0669b3ac06c02a3997a0674be
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 41 Rogerio Luz Coelho 2020-10-02 02:11:35 UTC
Many thanks for all the invovled ... Great work !!!
Comment 42 Timur 2020-11-13 12:46:04 UTC
This bug is Verified but please explain:
1. how is this used, not with shortcuts in Comment 0 ?
2. request was for all modules and fix is for Writer, what's the status for all?
3. are duplicates checked?
Comment 43 Timur 2020-11-13 12:46:55 UTC
4. should something from here for Writer be added to Impress in bug 38169 ?
Comment 44 V Stuart Foote 2020-11-13 14:47:19 UTC
(In reply to Timur from comment #42)
> This bug is Verified but please explain:
> 1. how is this used, not with shortcuts in Comment 0 ?
> 2. request was for all modules and fix is for Writer, what's the status for
> all?

The UNO commands are available to apply as keyboard shortcut in all modules. The effects by module could use some work.

sm (Math) responds as sw (Writer) with smooth zoom increments.

sd (Draw, Impress) respond, but the increments are not the smooth scaling of the <Ctrl>+<MouseScroll> now present in sw (Writer).  The sc (Calc) sheets do not respond to the .uno:ZoomIn, .uno:ZoomOut controls, they apply against the print preview.

Something done for each module similar to https://gerrit.libreoffice.org/c/core/+/102830 perhaps?

> 3. are duplicates checked?

Feel free.
Comment 45 Commit Notification 2020-11-13 16:53:37 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/95b27dd2e5b5bdcb39962f72882dcdf406bcb393

tdf#45705 rework zoom in and zoom out UI commands in Calc

It will be available in 7.1.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.
Comment 46 V Stuart Foote 2020-11-15 18:14:00 UTC
(In reply to Commit Notification from comment #45)

> Affected users are encouraged to test the fix and report feedback.

Tested in Calc against
Version: 7.1.0.0.alpha1+ (x64)
Build ID: 42a691933429dbb315de2bd7ba2724993c60411f
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Tools -> Customize dialog -> Keyboard tab

Searching for zoom, select ZoomIn and then ZoomOut and modify a keyboard binding for each (used <Alt>+[ and <Alt>+] respectively).

The assigned keyboard shortcuts have nice smooth zoom scaling matching behavior of the <Ctrl>+<mousewheel> movements. Exactly what was needed for Calc.

Thanks Jim!

ps. didn't see that you'd had anything worked up for sd (Draw/Impress) a tougher nut to crack?
Comment 47 Jim Raykowski 2020-11-15 20:59:55 UTC
(In reply to V Stuart Foote from comment #46)
> 
> ps. didn't see that you'd had anything worked up for sd (Draw/Impress) a
> tougher nut to crack?

Stuart, thanks for testing!

I think this would be a nice beginning hack.

code pointers: 

Examine patches made for Writer and Calc and do the same for Draw/Impress.

sd/source/ui/view/viewshel.cxx is where the CommandEventId::Wheel behavior is defined.

sd/source/ui/view/drviewse.cxx is where user commands are handled: 
case SID_ZOOM_IN:
and
case SID_ZOOM_OUT:
Comment 48 V Stuart Foote 2021-12-15 13:18:25 UTC
*** Bug 146240 has been marked as a duplicate of this bug. ***
Comment 49 V Stuart Foote 2022-08-30 18:21:41 UTC
=> NEW for remaining Easyhack to provide UNO for sdraw and simpress use and keyboard assignment. Code pointers in comment 47.

@Jusitn, saw you unassigned Jim R. did you have a mentoree that is going to take this?
Comment 50 V Stuart Foote 2023-02-10 21:50:08 UTC
*** Bug 153513 has been marked as a duplicate of this bug. ***
Comment 51 Rafael Lima 2023-02-11 19:41:15 UTC
From what I understood of this ticket, we need a smoother SID_ZOOM_IN / SID_ZOOM_OUT in Impress/Draw.

The proposed patch is here:
https://gerrit.libreoffice.org/c/core/+/146825

This patch fixes the step size and makes it work as the zoom slider.

One question remains. Should we create default shortcuts for these commands?
Comment 52 Bernie Innocenti 2023-02-11 19:53:38 UTC
(In reply to Rafael Lima from comment #51)
> This patch fixes the step size and makes it work as the zoom slider.

Thanks!


> One question remains. Should we create default shortcuts for these commands?

Yes please. Many modern apps use ctrl +, ctrl - for zoom, and LibreOffice could follow this convention.
Comment 53 V Stuart Foote 2023-02-11 20:58:16 UTC
(In reply to Rafael Lima from comment #51)
> From what I understood of this ticket, we need a smoother SID_ZOOM_IN /
> SID_ZOOM_OUT in Impress/Draw.
> 
> The proposed patch is here:
> https://gerrit.libreoffice.org/c/core/+/146825
> 
> This patch fixes the step size and makes it work as the zoom slider.

Or the <Ctrl>+<M.Wheel> -- both at "incremental" steps of the +/- of the slider.

> 
> One question remains. Should we create default shortcuts for these commands?

Probably OK now to go ahead and set it globally.--users with dfferent prefs can customize the keyboard entries by module or globally.  

The <Ctrl>+ "- / =" might be a better assignment than "- / +" to avoid requiring use of a <Ctrl>+<Shift>. 

That seems to be the preferred Apple assignment (<Opt><Cmd>+= ) for Zoom-in
Comment 54 Commit Notification 2023-02-11 21:07:54 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c96e1ec61835bc01e2969ec97fce9a1674fbf6d7

tdf#45705 Make SID_ZOOM_IN and SID_ZOOM_OUT smoother in Impress

It will be available in 7.6.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.
Comment 55 Rafael Lima 2023-02-19 22:07:26 UTC
(In reply to V Stuart Foote from comment #53)
> The <Ctrl>+ "- / =" might be a better assignment than "- / +" to avoid
> requiring use of a <Ctrl>+<Shift>. 

It would be nice to have the same shortcut for .uno:ZoomMinus and .uno:ZoomPlus in all LO applications. From comment #53 the best candidates are <Ctrl>+ "- / =".

However, Ctrl + "-" is already used differently across applications:

In Writer
- Ctrl + "-" is associated with "Insert soft Hyphen"
- Ctrl + "=" is empty

In Calc
- Ctrl + "-" is associated with "Delete Cells"
- Ctrl + "=" is empty

In Impress/Draw
- Ctrl + "-" is associated with "Send Backward"
- Ctrl + "=" is empty

In the Basic IDE
- Ctrl + "-" is empty
- Ctrl + "=" is empty

In short, Ctrl + "=" is free to be associated with ZommPlus. But what can we do about ZoomMinus?
Comment 56 V Stuart Foote 2023-04-11 16:23:59 UTC
(In reply to Rafael Lima from comment #55)

@Heiko, some UX-design perspective on now doing a global keyboard assignment for the .uno:ZoomMinus and .uno:ZoomPlus available in all modules?

Benefit/risk to globally reassigning the keyboard "-" paired with the generally available "=".

Alternative might be to use the "[", "]" cross module for assignment as <Ctrl>+[ and <Ctrl>+]--most keyboards support directly, though some locales require <AltGr> or <R-Alt> mappings for the pairing.
Comment 57 Heiko Tietze 2023-04-12 07:51:50 UTC
(In reply to V Stuart Foote from comment #56)
> globally reassigning the keyboard "-" ... "=".
> Alternative might be to use the "[", "]"

On my German keyboard the equal sign is shift+0 and the square bracket altgr+8 (on macOS not even shown on the layout). Chromium/Firefox use ctrl+plus/minus for zoom in/out (with ctrl+0 for 100%) and I guess this is well known. Plus, +/- is available on the number block.

Wouldn't _add_ more zoom commands considering bug 154733; we have rather too many zoom commands ;-).
Comment 58 V Stuart Foote 2023-04-12 16:19:19 UTC
(In reply to Heiko Tietze from comment #57)
> (In reply to V Stuart Foote from comment #56)
> > globally reassigning the keyboard "-" ... "=".
> > Alternative might be to use the "[", "]"
> 
> On my German keyboard the equal sign is shift+0 and the square bracket
> altgr+8 (on macOS not even shown on the layout). Chromium/Firefox use
> ctrl+plus/minus for zoom in/out (with ctrl+0 for 100%) and I guess this is
> well known. Plus, +/- is available on the number block.
> 
> Wouldn't _add_ more zoom commands considering bug 154733; we have rather too
> many zoom commands ;-).

So do we maintain status quo of not mapping a shortcut (retaining shortcuts of comment 55) or do we shuffle some of the legacy shortcuts to be able to map the <Ctrl>+<Plus>/<Minus> (needing modifiers depending on locale keyboard in use)?

Jim chose not to map shortcuts (they can be customized of course) when he reworked the UNO for Writer & Calc. Rafael extended the UNO for Draw & Impress use. No new commands involved.

But since the UNO can now be applied cross module, should they receive global keybaord shortcuts?  With changed documentation of course.

Or should we leave it to the user to pick the shortcuts themselves via Customize dialog.
Comment 59 Heiko Tietze 2023-04-12 17:49:03 UTC
(In reply to V Stuart Foote from comment #58)
> So do we maintain status quo of not mapping a shortcut (retaining shortcuts
> of comment 55) or do we shuffle some of the legacy shortcuts to be able to
> map the <Ctrl>+<Plus>/<Minus> (needing modifiers depending on locale
> keyboard in use)?

Ctrl+Plus/Minus is has been established to be a standard for zoom. I'm not aware what needs to be shuffled but if the effort or rather impact is low I suggest to do it.
Comment 60 Rafael Lima 2023-04-12 18:18:24 UTC
(In reply to Heiko Tietze from comment #59)
> Ctrl+Plus/Minus is has been established to be a standard for zoom. I'm not
> aware what needs to be shuffled but if the effort or rather impact is low I
> suggest to do it.

+1

I also support the use of Ctrl+Plus and Ctrl+Minus. It indeed is the standard in most applications and users expect LO to be this way too.

I'll propose a patch for this in Gerrit.
Comment 61 V Stuart Foote 2023-04-12 18:30:43 UTC
(In reply to Rafael Lima from comment #60)

> 
> I'll propose a patch for this in Gerrit.

+1 to use the <Ctrl>+<Minus> for .uno:ZoomOut and <Ctrl>+<Plus> for .uno:ZoomIn linked to SID_ZOOM_OUT and SID_ZOOM_IN respectively.  

But would these be just sd, sw, sc? Or be done globaly, with remap for the existing module specific assignments of <Ctrl>+<Minus>?

I guess your choice Rafael, I'm fine either way.
Comment 62 Rafael Lima 2023-04-12 19:18:43 UTC
(In reply to V Stuart Foote from comment #61)
> But would these be just sd, sw, sc? Or be done globaly, with remap for the
> existing module specific assignments of <Ctrl>+<Minus>?

Here's the proposed patch.

https://gerrit.libreoffice.org/c/core/+/150212

I defined Ctrl + plus/minus globally and reassigned the commands that previously used these accelerators. Here's a list of what changed:

In Calc:
.uno:DeleteCell       was SUBTRACT_MOD1 -> now is DELETE_SHIFT_MOD1
.uno:InsertCell       was ADD_MOD1      -> now is INSERT_SHIFT_MOD1

In Writer
.uno:CalculateSel     was ADD_MOD1      -> now is INSERT_SHIFT_MOD1
.uno:InsertSoftHyphen was SUBTRACT_MOD1 -> now is H_SHIFT_MOD1

In Impress
.uno:Forward          was ADD_MOD1      -> now is H_MOD1_MOD2
.uno:Backward         was SUBTRACT_MOD1 -> now is G_MOD1_MOD2

In Draw
.uno:Forward          was ADD_MOD1      -> now is H_MOD1_MOD2
.uno:Backward         was SUBTRACT_MOD1 -> now is G_MOD1_MOD2
Comment 63 Heiko Tietze 2023-04-13 06:46:20 UTC
(In reply to Rafael Lima from comment #62)
> In Calc:
> .uno:DeleteCell       was SUBTRACT_MOD1 -> now is DELETE_SHIFT_MOD1
> .uno:InsertCell       was ADD_MOD1      -> now is INSERT_SHIFT_MOD1
These functions shift the content up/down or left/right. I suggest to remove the hard-coded shortcut and let the users customize it.

> In Writer
> .uno:CalculateSel     was ADD_MOD1      -> now is INSERT_SHIFT_MOD1
No idea what this command is good for. Changing cell content automatically updates formula for me. The pendant is probably Calculate Table, assigned to shift+F9 and we could use alt+F9. But I suggest to not assign a precious shortcut to rarely used functions.

> .uno:InsertSoftHyphen was SUBTRACT_MOD1 -> now is H_SHIFT_MOD1
This is a tough one, widely used and hard to replace. Combine with Alt, ie. SUBTRACT_MOD2?

> In Impress
> .uno:Forward          was ADD_MOD1      -> now is H_MOD1_MOD2
> .uno:Backward         was SUBTRACT_MOD1 -> now is G_MOD1_MOD2
> 
> In Draw
> .uno:Forward          was ADD_MOD1      -> now is H_MOD1_MOD2
> .uno:Backward         was SUBTRACT_MOD1 -> now is G_MOD1_MOD2
Fordward/Backward change the z-order of objects. Inkscape and most other drawing applications use <modifier> with PgUp/Down for this purpose together with home/end to reach the top/bottom.
Comment 64 Heiko Tietze 2023-04-13 14:12:32 UTC
(In reply to Heiko Tietze from comment #63)
> > .uno:InsertSoftHyphen was SUBTRACT_MOD1 -> now is H_SHIFT_MOD1
> This is a tough one, widely used and hard to replace. Combine with Alt, ie.
> SUBTRACT_MOD2?

MSO uses ctrl+minus for soft hyphen (and ctrl+plus for super script); changing this shortcut would be a major difference to Word.

An idea is to use minus/plus from the num block only, if this can be done at all, with the obvious disadvantage for notebook or TKL-keyboard users.
Comment 65 Rafael Lima 2023-04-13 14:24:04 UTC
Heiko, a new version of the patch implements the changes suggested in Comment 63.

(In reply to Heiko Tietze from comment #64)
> MSO uses ctrl+minus for soft hyphen (and ctrl+plus for super script);
> changing this shortcut would be a major difference to Word.

Indeed. It turns out the existing shortcuts for Writer/Calc try to replicate the shortcuts used in Word/Excel.

Try using Ctrl +/- in Excel and it will try to insert/remove the selected range.

So what should we do now? Having similar shortcuts to MSO is important for users who need to use LO and MSO at the same time.
Comment 66 Heiko Tietze 2023-04-13 14:35:33 UTC
(In reply to Rafael Lima from comment #65)
> So what should we do now?

The compromise is KEYGROUP_NUM + KEY_ADD/KEY_SUBTRACT. Some challenge to not use in case of TKL.
Comment 67 Mike Kaganski 2023-04-13 15:13:40 UTC
Ctrl+Alt+PLUS/MINUS?

No idea how (if) would that translate to macOS.
But please note that zooming is not even close by importance to the current functionality bound to the Ctrl+PLUS/MINUS.
Comment 68 V Stuart Foote 2023-04-13 15:56:46 UTC
(In reply to Mike Kaganski from comment #67)
> Ctrl+Alt+PLUS/MINUS?
> 
> No idea how (if) would that translate to macOS.
> But please note that zooming is not even close by importance to the current
> functionality bound to the Ctrl+PLUS/MINUS.

So <Alt>+<Plus>/<Minus> two button shortcuts would work also. 

The issue here was to provide zoom control available for keyboard shortcut assignments. That is achieved. While making zoom widget behavior more consistent cross module is getting attention as in see also bug 154733#c4

Yes assigning three button <Ctrl>+<Alt> (with locale keyboard mappings requiring  <AltGr> and <Shift> sequences) or assigning to the NUMPAD Plus/Minus could get us global shortcuts. They would be *odd* LO only, and likely we would have folks complaining it is not the accepted well known <Ctrl>+<Plus>/<Minus> shortcuts from browsers, DTP, and graphics programs.

We could simply not make any shortcut assignment for the zoom controls (per module, or global) and allow users to customize as they see fit. 

Is a pre-assign global for keyboard zooms still an imperative?

I notice on Windows builds, the track pad/touch pad and the touch screen support for non-mouse zoom has gotten more stable. Don't know for the Linux DEs, or macOS--if likewise usable there the shortcuts are less important?

So my take, either use the well know shortcuts <Ctrl>+<Plus>/<Minus> globally, or do as Jim chose and assign none--leave it for user customization only. 

But don't globally assign to an *odd* shortcut choice. Users would have to fix it anyway to their liking.
Comment 69 V Stuart Foote 2023-04-13 16:25:11 UTC
Noticed the ESC minutes for today and responded.

>  -> + Shortcuts for "Zoom in" and "Zoom out"
> 
> https://bugs.documentfoundation.org/show_bug.cgi?id=45705
> ...
>       + Word has no zoom in/out, unclear what to do
> ...

Actually, the Word 2019 desktop canvas responds to "pinch" zoom on trackpad and on touch screens.  And similar to LO Zoom bar handling with Zoom Out and Zoom In buttons.  And also <Ctrl>+<Mousewheel> zoom.

Desktop Word < 2021,  has no exposed action for keyboard shortcut.  

But the Word 365 cloud and Word > 2021 (16.0) has now "diverged from Word’s initial implementation" and implemented <Ctrl>+<Minus>/<Plus>/0  ( https://insider.office.com/en-us/blog/new-zoom-shortcuts-in-word ) 

Any reason we shouldn't as well.  If not global, then at least for the sw and sd modules.
Comment 70 Stéphane Guillou (stragu) 2023-04-14 09:38:43 UTC
Patrick, any input regarding macOS for this change in shortcuts?
Comment 71 Patrick Luby (volunteer) 2023-04-14 13:22:25 UTC
(In reply to Mike Kaganski from comment #67)
> Ctrl+Alt+PLUS/MINUS?
> 
> No idea how (if) would that translate to macOS.
> But please note that zooming is not even close by importance to the current
> functionality bound to the Ctrl+PLUS/MINUS.

Command+Alt+Plus/Minus are used by macOS accessibility to zoom in/out of the entire screen. I am no UI expert, but Safari uses Command+Plus/Minus to zoom content in/out.
Comment 72 V Stuart Foote 2023-04-15 18:37:50 UTC
@Heiko, no real feedback from ESC. Can we +1 Rafael's https://gerrit.libreoffice.org/c/core/+/150212 for the global ZoomIn ZoomOut shortcuts?

Especially as MS has gone that direction for Word 2021 [1], can't we decide later if Calc needs some alternate handling?

=-ref-=

[1] https://insider.office.com/en-us/blog/new-zoom-shortcuts-in-word
Comment 73 Rafael Lima 2023-04-16 23:40:51 UTC
(In reply to Heiko Tietze from comment #66)
> The compromise is KEYGROUP_NUM + KEY_ADD/KEY_SUBTRACT. Some challenge to not
> use in case of TKL.

I could not figure out how to use this in Accelerators.xcu file.

> But don't globally assign to an *odd* shortcut choice. Users would have to fix it
> anyway to their liking.

I agree with this statement. We would still get bug reports about this.

So now we're in a difficult situation...

I bet if we change Ctrl-<minus> for Zoom Out, we'll receive complaints that the previews shortcut for Soft Hyphen changed. I just don't know how popular this shortcut actually is.

On the other hand, if we don't assign zoom commands to Cltr-<plus>/<minus>, we'll keep getting duplicates of this request.

Maybe we could simply assign the zoom in/out shortcuts in Impress/Draw and Basic IDE (and leave Writer and Calc as is).

Anyways, this is a tough decision... I'll wait for more input from the UX team.

Side notes
1) I can confirm that Word Online indeed is using Cltr-<plus>/<minus> for zooming in and out.
2) Google Docs does not have any shortcut for zooming in/out (the browser zooms its view instead).
3) OnlyOffice uses Cltr-<plus>/<minus> for zoom commands (but weirdly enough, Ctrl-<minus> zooms out AND adds the soft hyphen... go figure).
Comment 74 Heiko Tietze 2023-04-17 07:52:52 UTC
Two reasonable solutions have been proposed:

* Ctrl/Cmd + Alt + Plus/Minus globally
* Ctrl/Cmd + Plus/Minus for Draw/Impress

The doer decides.
Comment 75 Rafael Lima 2023-04-17 10:57:40 UTC
(In reply to Heiko Tietze from comment #74)
> * Ctrl/Cmd + Alt + Plus/Minus globally
> * Ctrl/Cmd + Plus/Minus for Draw/Impress

The only problem is that the combination Ctrl + Alt + <plus>/<minus> is not available in the Customize options.

We would have to add it as one of the possible options first. I'll see if I can do it.
Comment 76 Heiko Tietze 2023-04-17 11:00:19 UTC
(In reply to Rafael Lima from comment #75)
> We would have to add it as one of the possible options first. I'll see if I
> can do it.

See https://gerrit.libreoffice.org/c/core/+/80436 how it worked for the equal sign.
Comment 77 Rafael Lima 2023-04-17 14:30:00 UTC
Heiko, a new PS is available in Gerrit.

For some reason, Ctrl+Alt+<plus>/<minus> is not recognized in my computer. All other combinations with "+" and "-" are recognized, except for this one.

Considering that this might be a common issue, I used the shortcut Ctrl+Shift+<plus>/<minus> instead.
Comment 78 Commit Notification 2023-04-29 11:38:28 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/139e0fb7132cb7b943ea50930a8a7ede72ea5e47

tdf#45705 Define accelerators for zoom in/out

It will be available in 7.6.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.
Comment 79 Rafael Lima 2023-04-29 11:41:16 UTC
After various discussions in the ticket, we decided to set Ctrl + Shift + PageUp / PageDown as the default zoom in/out commands in all applications.

Other options either clashed with existing popular commands or didn't work well on all keyboards or desktop environments.
Comment 80 Patrick Luby (volunteer) 2023-04-29 12:31:53 UTC
(In reply to Rafael Lima from comment #79)
> After various discussions in the ticket, we decided to set Ctrl + Shift +
> PageUp / PageDown as the default zoom in/out commands in all applications.
> 
> Other options either clashed with existing popular commands or didn't work
> well on all keyboards or desktop environments.

I can confirm that the new key shortcuts work in Writer, Calc, and Impress on macOS Monterery 12.6.5.

Note for macOS laptops: PageUp is Fn-UpArrow and PageDown is Fn-DownArrow so the shortcuts are Shift-Command-Fn-UpArrow to zoon out and Shift-Command-Fn-DownArrow to zoom out.
Comment 81 steve 2023-04-29 16:14:45 UTC
> Note for macOS laptops: PageUp is Fn-UpArrow and PageDown is Fn-DownArrow so the shortcuts are Shift-Command-Fn-UpArrow to zoon out and Shift-Command-Fn-DownArrow to zoom out.

Slightly surprised that after 10 years of various proposals, this is what we end up with on macOS. As a laptop + compact keyboard user I am not finding this a great solution.

To re-iterate (Zoom In and Zoom Out)
- Word: cmd+ and cmd-
- Apple Pages: cmd: and cmd;
- LibreOffice: Shift Cmd Fn DownArrow and Shift Cmd Fn UpArrow

Honestly, the Word shortcut seems most intuitive and convincing (I understand this brings conflicts in some of the components).
Comment 82 Rafael Lima 2023-04-30 00:20:14 UTC
(In reply to steve from comment #81)
> - LibreOffice: Shift Cmd Fn DownArrow and Shift Cmd Fn UpArrow
>
> Honestly, the Word shortcut seems most intuitive and convincing (I
> understand this brings conflicts in some of the components).

The shortcut Ctrl + Shift + PgUp / PgDown in Linux/Windows feels good to me... it's quite easy to use these key combinations and they're easy to memorize.

However, I did not know what they would translate to in MacOS. I do not have access to any Apple device for testing.

From what you're saying, you need to combine 4 keys?

Apparently in the Accelerators.xcu file it is possible to create shortcuts that are specific to certain operating systems. We could try using this:

<value xml:lang="en-US" install:module="macosx">.uno:Command</value>

Maybe this can be used to specify a different shortcut for MacOS. However, someone else would have to push a patch for this, since I cannot test it on my machine.
Comment 83 Patrick Luby (volunteer) 2023-04-30 00:49:40 UTC
(In reply to Rafael Lima from comment #82)
> From what you're saying, you need to combine 4 keys?
> 

Only on Mac laptops. Mac laptops don't have any PageUp or PageDown keys so you emulate such key presses with Fn-ArrowUp and Fn-Arrow down.

Personally, I have no opinion whether this is a big deal or not as I am used to constantly pressing Fn-ArrowUp/Down/Left/Right to navigate in web pages in Safari and Firefox. So I'll defer to whatever everyone else wants.
Comment 84 Stéphane Guillou (stragu) 2023-09-19 09:33:06 UTC
Just noting that the new shortcuts were previously used for .uno:JumpToNextTableSel (select to next sheet) and .uno:JumpToPrevTableSel (select to previous sheet) in Calc.
(But I assume not many users will miss those ones. If they need a replacement, I can imagine Ctrl + Shift + Alt + arrows, to be consistent with the existing Ctrl + Shift + Arrow range selection shortcuts.)

See bug 132067.