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

Certain questions cannot be answered because the cmd key is not override #32

Closed
amychan331 opened this issue Oct 5, 2018 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@amychan331
Copy link
Collaborator

When users answer the "hide the window" question with Cmd-H, it will actually close user's own window, thus the practice would not precede to the next question. The Cmd-h needs to be override somehow.

@amychan331 amychan331 added the bug Something isn't working label Oct 5, 2018
@amychan331 amychan331 changed the title Answering "hide the window" with Cmd H will actually close user's own window Certain questions cannot be answered because the cmd key is not override Oct 5, 2018
@amychan331
Copy link
Collaborator Author

Actually, cmd-h is not the only one. The question on "minimize window" also hides user's own window. (Cmd-M).

@amychan331
Copy link
Collaborator Author

Actually, make that rest of the question set, because none of the answer that require Cmd works.

@shiftyp
Copy link

shiftyp commented Oct 9, 2018

I think a solution @amychan331 would be to add e.preventDefault() to the end of this handle function.. This function could use some indentation cleanup as well, maybe a separate issue.

@amychan331
Copy link
Collaborator Author

@shiftyp Having indentation fix as a separate issue was actually talked about in #35, so I made another pull request for the indentation(#36). For some strange reason, when I merge the changes for indentation, #35 also merged. So I will probably create another pull request later...
Actually, I did tried the handle function with e.preventDefault(), but it didn't have any effects.

@shiftyp
Copy link

shiftyp commented Oct 9, 2018

You're right, it's a bit tricker than that. I put together a JSFiddle with a solution, which involves preventing the keyDown event default when the meta or ctrl keys are engaged. You also need to prevent the keyPress. I found this stackOverflow particularly helpful in putting together a solution.

@deeptiGarg
Copy link
Contributor

Add next & previous buttons for commands which cannot be overridden.

@alodahl
Copy link
Collaborator

alodahl commented Oct 2, 2020

duplicate of #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants