WPS / egon.io

A tool to visualize Domain Stories in your browser
http://domainstorytelling.org
738 stars 104 forks source link

Shortcuts on MacOS should use CMD as modifier instead of CTRL #160

Open Morl99 opened 6 days ago

Morl99 commented 6 days ago

Describe the bug When I first used the modeller, I was dissappointed, that there is no save shortcut, because intuitively I used cmd + s. This is the default shortcut for most editing tools and I did not bother to look in the manual or the handy popup at the top. Only later did I discover, that I had to press ctrl instead of cmd for shortcuts. I would expect, that egon.io is aware of the platform the users browser runs on and handles the shortcuts according to the expectation of the user.

To Reproduce Use egon.io on a MacOS and press cmd + s or any other shortcut that uses a modifier

Expected behavior All the shortcuts that have ctrl today should trigger with cmd instead if the user works on a MacOS system. The description should also state this.

Version

Solution options One way to find out which operating system the user is on, is to use the angular-device-information package. An easier way to handle this is to just listen to both modifiers, with the side effect, that on a MacOS System, ctrl or cmd will both work. I don't think, that this will really create a usability problem though, as MacOS users don't usually use the ctrl modifier anyways. This has the added benefit of not being a breaking change, so we could keep the old behaviour and additionally fix this for new users.

The shortcuts that are handed by the modeller itself already listen to both modifiers, so I would suggest that we go this way for consistency.

Let me know if you would be willing to accept a PR, and which solution you prefer.