acidglitter Posted May 7, 2008 Share Posted May 7, 2008 is there a way to tell which key on the keyboard is pressed? i think it would be cute to make a tiny javascript game and you would use the arrows on the keyboard to move but i don't know how to tell which arrow is pressed on Link to comment https://forums.phpfreaks.com/topic/104632-how-do-you-tell-which-key-is-pressed/ Share on other sites More sharing options...
rarebit Posted May 7, 2008 Share Posted May 7, 2008 Have a look here Link to comment https://forums.phpfreaks.com/topic/104632-how-do-you-tell-which-key-is-pressed/#findComment-535536 Share on other sites More sharing options...
acidglitter Posted May 8, 2008 Author Share Posted May 8, 2008 unless i completely missed it, it doesn't look like any of those were for the arrow keys on the keyboard Link to comment https://forums.phpfreaks.com/topic/104632-how-do-you-tell-which-key-is-pressed/#findComment-535658 Share on other sites More sharing options...
acidglitter Posted May 8, 2008 Author Share Posted May 8, 2008 okay i found this http://www.w3schools.com/js/tryit.asp?filename=try_dom_event_keycode the arrows on my keyboard are 37-40. would it be the same on everyones keyboard?? Link to comment https://forums.phpfreaks.com/topic/104632-how-do-you-tell-which-key-is-pressed/#findComment-535661 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.