Page 1 of 1

How to access the event object in key event handler

Posted: Mon Jun 23, 2014 10:28 pm
by therendus

How to access the event object and it's keyCode attribute inside a key event handler ?


How to access the event object in key event handler

Posted: Mon Jun 23, 2014 11:21 pm
by Yurii Orishchuk

Hi Daniel,

Please use following code:

pre

var event = arguments[0];

//Here you can use event object.
console.log(event.keyCode);

/pre

http://prntscr.com/3vucev/direct

Regards.