I seem to be having the same problem as this guy:
http://stackoverflow.com/questions/22123055/react-keyboard-event-handlers-all-null
I need some assistance how to translate this answer into clojurescript. I have
an Om component (a dom/input) with this handler:
:onKeyPress #(.log js/console % "pressed: " (.-keyCode %))
The event itself is logged and everything is null when I type an Esc key, Enter
key, etc. It's not clear to me how to access this synthesized information using
CLJS syntax, can anyone assist?
Before logging, I tried to actually do something like this:
(when (== (.-keyCode %) 27) ;escape key ....
But since the keyCode value is always 0, that didn't work.
Andrew
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.