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

Add Ctrl/Cmd-Q keyboard shortcut to quit #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

towerofnix
Copy link

Resolves #15 by causing the browser window to close when the user presses Ctrl-Q (or Cmd-Q on a Mac). This does mesh nicely with #23.

The diff is pretty tough to read as it is, so I recommend reading the two commits one at a time, or at least specifying ?w=1 in the "files" URL.

We will need to define a proxy for a function on WorldMorph in order to
support Ctrl/Cmd-Q keyboard shortcuts. This is also cleaner code anyhow
(it uses function scoping instead of the global namespace and is
arguably easier to understand).

This diff is pretty hard to read because of indentation changes. You can
get a cleaner diff by specifying -w in git-diff (or ?w=1 in the URL on
GitHub).
Fairly straightforward - we detect if a quit combo was pressed, then
tell the window to close if one was.
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

Successfully merging this pull request may close these issues.

Snap! Needs to let go of Cmd-Q
1 participant