constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
385 stars 59 forks source link

Change default shortcuts for zooming in and out of graph #2181

Closed Quasar985 closed 1 month ago

Quasar985 commented 1 month ago

Prerequisites

Description of the Change

Changed the default keyboard shortcuts for zooming in and zooming out to better suit Linux. CTRL - now zooms out and CTRL = now zooms in. The thought process being the physical keys have the plus and minus symbol on them.

Alternate Designs

None.

Why Should This Be In Core?

N/A

Benefits

Default key binds now work on Linux

Possible Drawbacks

None.

Verification Process

  1. Open consty
  2. Open or create a graph with nodes in it.
  3. Use CTRL - to zoom out
  4. Use CTRL = to zoom in

Applicable Issues

https://github.com/constellation-app/constellation/issues/2165

antares1470 commented 1 month ago

@Quasar985 just had an idea, if we are using - and = for zoom out and in, would it also make sense to include shortcuts using - and + on the num pad (i.e. Ctrl-Subtract and Ctrl-Add)?

Quasar985 commented 1 month ago

@Quasar985 just had an idea, if we are using - and = for zoom out and in, would it also make sense to include shortcuts using - and + on the num pad (i.e. Ctrl-Subtract and Ctrl-Add)?

I've added these as extra shortcuts

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Quasar985 commented 1 month ago

It appears the Ctrl-Add and Ctrl-Subtract shortcuts don't work for me. When looking at the keymap, it appears the actions are only applied to one shortcut each

That's odd. The extra shortcuts should be listed in the keymap. They should be called something along the lines of "Zoom In (Additional)". Just checking, have you pulled the latest version?

antares1470 commented 1 month ago

That's odd. The extra shortcuts should be listed in the keymap. They should be called something along the lines of "Zoom In (Additional)". Just checking, have you pulled the latest version?

So I thought I had as I had just checked out the branch for the first time...but apparently it wasn't checked out with the most recent commit...we're all good now