Given the following code:
[:input {:type "text"
:value (:text @app-state)
:on-change (fn [e]
(if (= 31 (.-keyCode e))
(println "ENTER")
(println "NOT ENTER")))}]
How to change the if
condition so that enter keypresses can be distinguished from normal keys? All properties in e
except target
seem to be null.