misbehave
misbehave copied to clipboard
Prevent default behaviour on key press
Hello, is there a way to prevent default behaviour on key press? I'm trying to use your lib to build a javascript in-browser console. Currently i've stuck on problem with impossibility of not append a new line character on "run" code. (not insert \n if user pressed Enter)
It should be possible to achieve if you overwrite the enter keypress on the keys field of your misbehave instance, see https://github.com/orbitbot/misbehave/blob/master/editable.js#L53 . Didn't try this though