Instalar ZYBERMART

Abre cualquier herramienta desde tu pantalla de inicio o el Dock, en su propia ventana. Las que ya has usado también funcionan sin conexión.

Buscador de keycodes

Pulsa cualquier tecla para ver sus valores JavaScript event.key, event.code, keyCode y modificadores.

Press any key

⌨

Click here first if nothing happens, then press a key.

CtrlShiftAlt / OptionMeta / ⌘

Recent keys

keycodekeyCodeModifiers
Keys you press will appear here.

Common keys

Keyevent.keyevent.codekeyCode
EnterEnterEnter13
EscapeEscapeEscape27
Space" "Space32
TabTabTab9
BackspaceBackspaceBackspace8
Arrow left / up / right / downArrowLeft …ArrowLeft …37–40
A–Za–zKeyA–KeyZ65–90
0–9 (top row)0–9Digit0–Digit948–57
F1–F12F1–F12F1–F12112–123

Example

document.addEventListener('keydown', (event) => {
  if (event.key === 'Escape') closeDialog();
  if ((event.ctrlKey || event.metaKey) && event.key === 's') {
    event.preventDefault();
    save();
  }
});

Frequently asked questions

What is the difference between key and code?

event.key is the character or action the key produces, which depends on the keyboard layout and Shift (for example "a", "A" or "Enter"). event.code is the physical key position, which stays the same on every layout (for example "KeyA").

Should I still use keyCode?

No. event.keyCode and event.which are deprecated and differ between browsers and layouts. Use event.key for text and shortcuts, and event.code for games or position-based controls. They're shown here for older code you may still be maintaining.

Why doesn't a key show up?

Some keys are handled by the operating system or browser before the page sees them, such as the Windows key, Print Screen, or shortcuts like Ctrl+W. The Fn key usually isn't sent to web pages at all.

Does it work on phones?

On-screen keyboards often report key as "Unidentified" and keyCode as 229 while typing. For reliable results, use a physical keyboard.

Inicia sesión en ZYBERMART

Ten tus CV, facturas, tarjetas de estudio, notas y herramientas guardadas en todos tus dispositivos. Es gratis, y las herramientas funcionan igual sin cuenta.

o

No necesitas contraseña. Al iniciar sesión aceptas los términos; consulta cómo tratamos tus datos en la política de privacidad.

Tu cuenta

Al cerrar sesión se guarda una copia de tu trabajo en este navegador. En un ordenador compartido, borra después los datos del navegador.

¿Qué quieres crear?

Diseños

Redes sociales

Documentos

Estudio

Editar

Ver las 282 herramientas