Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcuts in Mac should use the Cmd key instead of Ctrl #27

Closed
r03ert0 opened this issue Dec 5, 2015 · 1 comment
Closed

Comments

@r03ert0
Copy link
Owner

r03ert0 commented Dec 5, 2015

Keyboard shortcuts in Mac should use the Cmd key instead of Ctrl.
The keyboard shortcut assignment in the initMicrodraw function should check for 'Mac', probably like this:

if (navigator.userAgent.indexOf('Mac OS X') != -1) {
  $("body").addClass("mac");
} else {
  $("body").addClass("pc");
}
@r03ert0
Copy link
Owner Author

r03ert0 commented Dec 6, 2015

Commit 69215c9 handles mac and pc shortcuts. I changed the shortcut functions to take an object as first argument with mac and pc shortcuts such as {pc:"^ z",mac:"cmd z"} (the space is important!). The next argument is the function callback. To enter key codes directly, use "#46" for example. I also updated the code for the delete key in mac which is not "#46" but "#8".

@r03ert0 r03ert0 closed this as completed Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant