Closed tathougies closed 9 years ago
preventDefault will also be desired for other keys, like up/down/left/right, spacebar, and others
+1. This would be very useful.
You can do this kind of stuff with elm-html
now, so that'd be the recommended route for now.
If you need to do it another way, please open an issue on https://github.com/elm-lang/core/issues describing your particular use case (i.e. what your architecture is and what your project is)
Some applications may want to handle the backspace key, rather than let the browser do the default behavior (go to the last page). There should be some way for applications to tell Elm that they want to capture the backspace key.
Javascript-wise, this would involve calling preventDefault on the event object.