简体   繁体   中英

document.createEvent(“KeyboardEvent”) - get keycode for manually created event d

I am using the custom input event found @ http://whattheheadsaid.com/projects/input-special-event ..

The trouble is that I am not able to get the keycode for the event. any ideas?

Found the cure..

in the end, I updated the following lines;-

 else if (onprop)
    $(this).bind("onpropertychange", handler);

to;-

 else if (onprop)
    $(this).bind("keypress", function(e){
    handler.call(this, e)
    });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM