Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MacOS] Keyboard Shortcuts to Zoom In & Out #978

Closed
2 tasks done
OliverPearmain opened this issue Apr 28, 2022 · 19 comments
Closed
2 tasks done

[MacOS] Keyboard Shortcuts to Zoom In & Out #978

OliverPearmain opened this issue Apr 28, 2022 · 19 comments

Comments

@OliverPearmain
Copy link

OliverPearmain commented Apr 28, 2022

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug
This is regarding the Mac app specifically, although it may also apply to other platforms

I would expect CMD - and CMD + to control the zoom, as is done in most other applications, however this does not work in drawio-desktop.

From looking at the hints, it looks like the numpad might be required to perform zoom operations via the keyboard. However I don't have a numpad keyboard, and I suspect the large majority of Mac users don't either

Screenshot 2022-04-28 at 13 50 56

Its therefore impossible to zoom in and out using keyboard shortcuts, unless one uses the alt mouse-scroll option but thats massively over-sensitive and unusable in my opinion.

It would be highly benefical if one could zoom in and out with regular CMD - and CMD +

To Reproduce
Steps to reproduce the behavior:

  1. Open any diagram in Mac draw.io desktop
  2. Press CMD - or CMD +
  3. The diagrams zoom level does not change

Expected behavior
The diagram should zoom in with CMD + and out with CMD -

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 17.4.2

Desktop (please complete the following information):

  • OS: MacOS Monterey 12.1

Additional context
The draw.io website also does not respond to CMD - and CMD + shortcuts either. I expect this is to avoid a clash with the browsers zoom shortcuts (see video below) however in the context of the drawio-desktop application we don't have the browser keyboard shortcuts to contend with so I was wondering if the application layer could just forward CMD - / CMD + presses to CMD - (numpad) / CMD + (numpad)

Draw.io-zoom.mov
@baronne

This comment was marked as duplicate.

@ignaciofite
Copy link

I fully agree with the suggestion, the mouse option is highly unusable and no num keypad in most Macs...

@stale
Copy link

stale bot commented Mar 25, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

@stale stale bot added wontfix and removed wontfix labels Mar 25, 2023
@OliverPearmain
Copy link
Author

Please don't close it, the issue still persists and is still relevant.

@bbugh
Copy link

bbugh commented Dec 15, 2023

I had this problem as well and ended up here from some searching. I was able to "solve" (hack) the problem using BetterTouchTool (and using an Accessibility Keyboard Panel to temporarily simulate the number pad, which you don't need to do).

I've exported the settings for the draw.io app which you can import into BetterTouchTool if you use it. This maps Cmd++ to Cmd+Pad + and Cmd+- to Cmd+Pad - in the draw.io app, so that draw.io works like most other Mac tools with zoom.

https://gist.github.com/bbugh/40f852294fcb3029bfd06044bd994538

@karijkangas
Copy link

karijkangas commented Apr 10, 2024

Having this same problem. FYI: noticed chancing the zoom level explicitly using "control + 0" works okayish for the zoom in/zoom out purposes from the laptop keyboard.

@schoblaska
Copy link

I use awesome-hammerspoon (shoutout @wyne) to remap CMD + and CMD - in the draw.io app:

spoon.AppBindings:bind("draw.io", {
	{ { "cmd" }, "=", { "cmd" }, "pad+" },
})

spoon.AppBindings:bind("draw.io", {
	{ { "cmd" }, "-", { "cmd" }, "pad-" },
})

@datgausaigon
Copy link

Hi all,
Please take a look at this related Issue in drawio-core

jgraph/drawio#4159

@datgausaigon
Copy link

I use awesome-hammerspoon (shoutout @wyne) to remap CMD + and CMD - in the draw.io app:

spoon.AppBindings:bind("draw.io", {
	{ { "cmd" }, "=", { "cmd" }, "pad+" },
})

spoon.AppBindings:bind("draw.io", {
	{ { "cmd" }, "-", { "cmd" }, "pad-" },
})

Hi @schoblaska ,
How to use it? I use macOS 14.5 Sonoma. After downloading it and unzipping it, AppBindings.spoon is a Folder. I cannot run the application.

@gammalogic
Copy link

@datgausaigon It looks like it's a Lua script, so you would need to have Lua installed on your Mac.

@datgausaigon
Copy link

@gammalogic Got it, thanks ❤️

@davidjgraph
Copy link
Contributor

davidjgraph commented Jun 20, 2024

In 24.6.1.

@datgausaigon
Copy link

@davidjgraph In 24.6.1 this issue is fixed. But the Zoom In Shortcut (cmd +) not work. Please check.
Thanks ❤️

@davidjgraph
Copy link
Contributor

@datgausaigon you're not the original poster, please open a new issue with full details.

@datgausaigon
Copy link

@davidjgraph Yep, this is my mistake. I created the issue here: #1792
Thanks ❤️

@OliverPearmain
Copy link
Author

@davidjgraph hey, original poster here. Thank you for looking into the issue. I just downloaded the latest version 24.6.1 on Mac and whilst CMD-- now works to zoom out 🎉, CMD-+ doesn't seem to do anything.

@davidjgraph
Copy link
Contributor

Yeah, we've got a new issue for that, as posted. It's working on the online version, we're trying to work out why it's not working for cmd + in the desktop version.

@OliverPearmain
Copy link
Author

Both zoom in and out are working in v24.6.4
🥳 🙇

@datgausaigon
Copy link

datgausaigon commented Jun 28, 2024

@OliverPearmain Yep, both Web and Desktop app work well. Thanks @davidjgraph ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants