--- title: GlobalEventHandlers.onkeydown slug: Web/API/GlobalEventHandlers/onkeydown translation_of: Web/API/GlobalEventHandlers/onkeydown ---
{{ApiRef("HTML DOM")}}

La propiedad onkeydown devuelve un manejador para el evento onKeyDown del elemento actual.

Sintaxis

element.onkeydown = event handling code

Notas

El evento keydown se lanza cuando el usuario presiona una tecla.

Especificaciones

Specification Status Comment
{{SpecName('HTML WHATWG','webappapis.html#handler-onkeydown','onkeydown')}} {{Spec2('HTML WHATWG')}}  

Compatibilidad con navegadores

{{CompatibilityTable}}
Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Android Webview Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatVersionUnknown}}