Example below demonstrates the working of KeyboardEvent listeners. In the example when certain specific keys are pressed the function eventListener invokes the functions neo and trinity. These specific keys are shift and ctrl which when pressed together opens a web page url. Also listener for keys are created using conditional statements and with these listeners when ever the boolean condition becomes true, an alert box is generated.
when the ctrl + shift is pressed following url
web page opens in you default browser
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial