misbehave icon indicating copy to clipboard operation
misbehave copied to clipboard

Prevent default behaviour on key press

Open nikolayemrikh opened this issue 7 years ago • 1 comments

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)

nikolayemrikh avatar Jul 09 '18 18:07 nikolayemrikh

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

orbitbot avatar Jul 09 '18 23:07 orbitbot