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

"Sticky" shortcuts #127

Closed
OscarGodson opened this issue May 29, 2012 · 14 comments
Closed

"Sticky" shortcuts #127

OscarGodson opened this issue May 29, 2012 · 14 comments

Comments

@OscarGodson
Copy link
Owner

I can't reproduce this reliably but the best way to reproduce this, I guess, is to just write a document. Switch tabs, copy random bits, paste them, write, etc. Try to break it. At some point, sometimes, the shortcut keys get sticky. The "modifier" key seems to always return true therefore pressing a shortcut key like f will trigger fullscreen or o will just not show up in the editor (because it's triggering the edit() method).

@larzconwell
Copy link

Oh just to let you know, F key gets stuck as well. When you press it, it toggles full screen.

@OscarGodson
Copy link
Owner Author

Yeah. All shortcuts should "stick" when this happens. Not sure why yet, but altKey always returns true sometimes. Hmm

@dadambickford
Copy link
Collaborator

Can't reproduce here in chrome or FF, I remember it happening once or twice a while back, but it never happened repeatedly.

@OscarGodson
Copy link
Owner Author

@dadambickford Can you try https://t.co/7oLbp7NR (written up by @larzconwell)? I believe he's on Ubuntu like you. Those steps don't work for me personally. Also, can you see #133 who is a user on W7?

OscarGodson added a commit that referenced this issue Jun 27, 2012
…odifier key to false after each successful key shortcut executed.
@OscarGodson
Copy link
Owner Author

I could only come up with a half ass fix. I'm setting isMod (what checks if the modifier key is being pressed) to false after each successful key shortcut that is executed. The only problem is you can't do back to back shortcuts like: alt+p o to preview then flip back to edit without lifting alt. I think for the most part this is ok, but I'll wanna come up with some other fix eventually (if possible).

@larzconwell I could only reproduce what you mentioned on Win7 Firefox. Could you see if the fix which is now in develop also works for your OS and browser? (fingers crossed)

@dadambickford
Copy link
Collaborator

i was still unable to purposely produce any sticky shortcuts with the steps provided. ctrl+alt+arrows just changes desktops for me, and doesn't have any effect messing with epic editors shortcuts.

@OscarGodson
Copy link
Owner Author

@dadambickford So after switching tabs and going back the shortcuts were still working?

@dadambickford
Copy link
Collaborator

like a charm, switching tabs in the browser, switching the desktop tabs with the short cuts, minimizing, maximizing, i couldn't get them to fail.

my only experience with it was like i said earlier, it happened once or twice months ago and i couldn't reproduce then either, so no clue what caused it.

@OscarGodson
Copy link
Owner Author

Nice, alright, well in that case ill wait for @larzconwell to reopen the issue if it persists after this change. Thanks @dadambickford

@larzconwell
Copy link

I am in fact running Ubuntu and my ctrl+alt+arrows switch desktops as well.

It mostly fixed it, the only time it messes up now is when I change desktops then try to use the S key. the O key is working perfectly in all cases.

@OscarGodson
Copy link
Owner Author

I think I know the problem. DMed you on Twitter, but thought I should write here so it's saved. Since I can't reproduce it I want to make sure what I think will fix it actually fixes it before pushing to develop. I think adding the highlighted line to src/editor.js would fix it:

@larzconwell
Copy link

Yep that works perfectly!

@OscarGodson
Copy link
Owner Author

Awesome ill push a fix right now then. Thanks for the help!

@larzconwell
Copy link

Your welcome!

OscarGodson added a commit that referenced this issue Jun 27, 2012
OscarGodson added a commit that referenced this issue Jul 1, 2012
…to handle allkey combos including ones that arent shortcuts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants