+ 3
How to code a key as a button
How do u make the enter key on a computer be a button
5 Respuestas
+ 3
Hi! Can you explain what you want to do exactly ?
+ 3
You mean a GUI program ? An application where you can have buttons and other ?
+ 3
https://code.sololearn.com/Wg8En00z15Os/?ref=app
so i want the enter button be the grade button on the screen
+ 1
yes so let say some one wants to make the enter button on a computer act like the button you click on the screen
+ 1
Use key event listeners, in javascript.
Just as you use button on click , you can use on key down , on key press, on key up , the same way.
The assigned function will be called whenever the listener receives the key presses
the passed event, event.keycode can be used to get key code pressed, to detect whenever someone presses return key