Leitor de Teclas em Javascript e PHP
Publicado por Buckminster em 01/02/2023
[ Hits: 3.042 ]
<!DOCTYPE html> <html> <head> <meta charset="utf-8" lang="pt-br"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Leitor de Teclas</title> <style> html { display: flex; align-items: center; justify-content: center; height: 100%; background: #FFD700; text-align: center; font-family: monospace; line-height: 1.4; font-size: 25px; color:blue; } pre { text-align: left; } </style> <script> document.addEventListener("keydown", function(event) { console.log(event); document.body.innerHTML = ` <b>key (which): ${event.key}</b> <br> <b>which: ${event.which}</b> <br> <b>keyCode:</b> ${event.keyCode} <br> <b>shiftKey:</b> ${event.shiftKey} </br> <b>altKey:</b> ${event.altKey} <br> <b>ctrlKey:</b> ${event.ctrlKey} <br> <b>metaKey:</b> ${event.metaKey} `; }); </script> </head> <body> Pressione uma tecla. </body> </html>
Desligar Windows remotamente pelo Linux
Instalar Google Chrome no Slackware 15
Debian Wheezy - Atalho para minimizar todas as janelas abertas
Instalar Google Chrome no Debian e derivados
Chromium e Firefox - Forma prática de abrir links em nova aba
Can I use - Checar compatibilidade de comandos HTML5, CSS, JavaScript e outros
Codificação HEXADECIMAL para HTML
Copiando texto para área de transferência em JavaScript
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Descritores de Arquivos e Swappiness
Solução rápida para o problema do Network Manager conectar mas não navegar
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit