-
Notifications
You must be signed in to change notification settings - Fork 14
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
onkeydown event not working #36
Comments
If I type a key in the page, nothing changes. |
Note that Elm provides not only an event for keydown but also for keyup (which are useful to implememt games with elm-playground). |
Any help? Is this project dead? Should I switch to another OCaml library (e.g., Brr by daniel buenzli?) |
If no element under the div has the focus, the KeyDown event won't trigger. You might want to use a Custom elements to attach a global handler. |
Is there any code doing that I could imitate? I'm not very familiar with those custom elements. |
Is this issue fixed in the vdom 0.3 version? |
For context, I try to port the elm-playground library to OCaml using ocaml-vdom. I manage to get a few examples working
but I am currently stuck with the way the keyboard is handled in ocaml-vdom vs Elm.
I would like to generate a msg `Keydown each time the user press a key anyway in the page, but it does not work.
Here is the smallest program showing the problem:
The text was updated successfully, but these errors were encountered: