only allow English characters and numbers for text input
So describe the error behavior. What is it doing/not doing?
Tim van Steenbergen
Try this, comparing with key directly using regex instead of keycode
var ew = event.key;
if( /[A-Za-z0-9 ]/.test(ew))