Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Subscription to Keypress State #1

Open
JoshuaOSHickman opened this issue May 12, 2016 · 0 comments
Open

Subscription to Keypress State #1

JoshuaOSHickman opened this issue May 12, 2016 · 0 comments

Comments

@JoshuaOSHickman
Copy link

I wrote some code to try and track which keys are pressed using this package and the standard JS suggestion:

https://gist.github.com/JoshuaOSHickman/694447f77986bbfb5add80247cd801e5

Doesn't work completely right. For instance, I can press 'a' and then use my mouse to switch focus to another window. Since elm doesn't hear the keyup, even when I return to the window, it appears to be down. I could add in blur checks to empty out the keys-down list, but I'm not 100% sure that's the only scenario where discrepancies could happen. It'd be nice to have in the library either way -- this is 100% how I'm using this package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant