shemetz / ZoomPanOptions

FoundryVTT module for zooming and panning better
MIT License
7 stars 8 forks source link

Create Keybindings to toggle between modes #52

Closed mrkwnzl closed 1 year ago

mrkwnzl commented 1 year ago

This adds Keybindings to manually toggle between Mouse/Touchpad and Mouse/Alternative modes. In my current situation, I often switch between mouse and touchpad and the auto-detection doesn’t work reliably with my hardware. This would solve my problem by allowing to quickly toggle modes. The keybindings are customizable, so any conflict can be resolved by the users.

I hope a PR is okay for that. Otherwise, I’ll open a separate issue for that.

Thank you for considering this!

mrkwnzl commented 1 year ago

I just realized that I didn't mention the most crucial part. The keyboard shortcut is ctrl/cmd + M to toggle between mouse touchpad mode and alt + M to toggle between mouse and alternative mode. If you are in touchpad mode and press alt + M, it goes to alternative mode before toggling between mouse and alternative mode, and vice versa.

shemetz commented 1 year ago

I like this, but I think the keybindings should be opt-in, rather than defaulting to Ctrl+M or anything. Seems to me like very few people would need to swap between them like this, less than the number of people who currently use Ctrl+M for other keybinds. Plus, I wouldn't want somebody to accidentally activate the keybind they don't know about (wihle trying to e.g. mute themselves on a different app), and then suddenly getting a wonky pan/zoom situation.