funcao com o botao esc do teclado javascript
document.querySelector('body').addEventListener('keydown', function(event) {
var tecla = event.keyCode;
if(tecla == 13) {
// tecla ENTER
} else if(tecla == 27) {
// tecla ESC
} else if(tecla == 37) {
// seta pra ESQUERDA
} else if(tecla == 38) {
// seta pra CIMA
} else if(tecla == 39) {
// seta pra DIREITA
} else if(tecla == 40) {
// seta pra BAIXO
}
});
Also in JavaScript:
- How to append to a file in Node?
- dropdown validation using jquery
- nodejs generate ethereum address
- javascript display block
- try catch javascript
- jsx full form
- jquery get class name
- discord.js custom create channel
- prevent form submission on onsubmit function calls
- vue for loop
- jquery ajax promise
- jquery remove disabled property from button
- javascript tutorial pdf
- mocha supertest
- document.title you clicked count times
- if member has role discord.js
- javascript pass this to callback
- firebase cloud functions send email
- axios react post form data
- js string minus number
- javascript onclick open url same window
- reverse number in js
- how to concatenate strings javascript
- js remove item array