macros - Complete code for detecting the keypress q in javascript -


this question has answer here:

is there way detect when press letter q in javascript. working on keyboard macro league of legends press key upon letter q being pressed. have code key being pressed in applescript not sure if send key ingame. address issue myself. need complete javascript code detecting q since don't know syntax well.

try this

<html> <head> <script type="text/javascript">     function getkeystroke(e){         var keystroke;         if(window.event){ // ie                              keystroke = e.keycode;         }else if(e.which){ // netscape/firefox/opera                                 keystroke = e.which;         }         alert(string.fromcharcode(keystroke));     } </script>  <body> <form>     <input type="text" onkeypress="getkeystroke(event)" /> </form> </body> </html> 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -