toolbox4minecraft / amidst

Advanced Minecraft Interface and Data/Structure Tracking
GNU General Public License v3.0
2.15k stars 239 forks source link

Add support for Cmd+Plus symbol and Cmd+- for zooming in/out on macOS #533

Open EdricChan03 opened 5 years ago

EdricChan03 commented 5 years ago

Currently, the keybinds are set to Cmd+K to zoom in and Cmd+J to zoom out.

However, it's not very common to see these keybinds for zoom controls. Instead, most apps that support macOS typically use Cmd+Plus symbol and the Cmd+- keybinds.

heuermh commented 4 years ago

I was thinking of creating an issue for the same -- I'll create a pull request shortly.

stefandollase commented 4 years ago

I agree that these shortcuts would be nice to have. However, when I tried to bind to them I noticed that it did not work reliable across different operating systems and keyboard layouts. I think this was due to the fact that sometimes the plus or the minus sign had to be typed with and sometimes without the shift key. I don't remember the details, but if you want to open a pull-request, please make sure it actually works reliably across different operating systems and keyboard layouts.

Back then, I decided to simply use the reliable shortcuts CTRL+K and CTRL+J and to not change them anymore, to provide the users with working shortcuts and to protect them from having to relearn the shortcuts. But if you can make the intuitive shortcut work reliably it might be fine to change it once again.

Anyway, I am no longer the one to decide on whether something gets merged.

Related:

heuermh commented 4 years ago

Agreed, those key mappings are problematic. In other apps, I've used InputMap and multiple key mappings to make it work. After a quick look in the source, I see that Actions are not used when building the menus, so I'd have to special-case zoomIn and zoomOut handling in Menus.java.

Anyway, I am no longer the one to decide on whether something gets merged.

Does that mean that this repository is not the right place to pull request?

stefandollase commented 4 years ago

Does that mean that this repository is not the right place to pull request?

This repository is the right place for anything related to the Amidst development. So this is indeed the right place for such a pull request. However, I handed over the project to @moulins. See #483.