Closed mhodgson closed 9 years ago
The fix should be pretty easy, but I don't have a Mac. Are you (or anyone else) willing to test it for me?
@rocketraman sure. If you care to check it out, Keypress.js has feature parity with Mousetrap and can take care of the platform differences for you.
http://dmauro.github.io/Keypress/
In short, they give you the ability to define shortcuts as ‘meta b’ which maps to ‘control b’ on Windows and ‘command b’ on Mac.
@rocketraman sure. If you care to check it out, Keypress.js has feature parity with Mousetrap and can take care of the platform differences for you.
Thanks for the pointer. I remember looking at Keypress.js before and went with Mousetrap because the API seemed a bit simpler.
Just perusing the Mousetrap site again and it looks like Mousetrap now has the mod
keyword for the same purpose:
Mousetrap 1.4 introduced a generic mod helper which lets you set cross platform shortcuts.
Mousetrap.bind('mod+s', _saveDraft);
On Mac this ends up mapping to command+s whereas on Windows and Linux it maps to ctrl+s.
I'll give it a shot!
:+1:
@mhodgson Can you checkout branch https://github.com/ritzyed/ritzy/tree/macosx-shortcuts and test for me please? You'll need a redis instance running. Then if you have npm and node v0.12 installed, you should be able to just npm install
, gulp
to run the server on port 5000.
I'll assume the fix worked and go ahead and commit this to master. Feel free to reopen / raise another issue if it is still a problem.
Looks good :+1: !
Currently they use the control key, which is not consistent with any other editor on the platform.