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

No access to modifier states #9

Open
wehlutyk opened this issue Dec 8, 2016 · 1 comment
Open

No access to modifier states #9

wehlutyk opened this issue Dec 8, 2016 · 1 comment

Comments

@wehlutyk
Copy link

wehlutyk commented Dec 8, 2016

Problem

I have a project that uses Ctrl+Enter for control. Tracking this in pure Elm requires keeping track of which keys are up or down à la ohanhi/keyboard-extra. But this method is error-prone as it runs into the problem described here in #1: if Ctrl is down, and the browser is not focused at the moment Ctrl goes up, the tracked state in Elm is still "down" (ohanhi/keyboard-extra only tracks ups and downs, not window blurs).

I guess giving access to modifier states isn't hard, but as suggested in the Readme I'll leave potential solutions out of the report :)

@rgrempel
Copy link

rgrempel commented Jun 9, 2017

In the interim, there are things in http://package.elm-lang.org/packages/Gizra/elm-keyboard-event/latest which you might find helpful.

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

2 participants