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

Subscription to Keypress State #1

@JoshuaOSHickman

Description

@JoshuaOSHickman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions