--- title: event.isChar slug: Web/API/UIEvent/isChar tags: - DOM - Gecko - Reference_del_DOM_di_Gecko - Tutte_le_categorie translation_of: Web/API/UIEvent/isChar original_slug: Web/API/Event/isChar ---

{{ ApiRef() }}

Sommario

Restituisce un booleano che indica se è stato premuto un tasto carattere o meno.

Sintassi

bool = event.isChar

Esempio

 if e.isChar
   ripetiInput(e.type);
 }

Note

Alcune combinazioni di tasti potrebbero produrre degli eventi ma non produrre alcun carattere (per esempio CTRL+b). Quando questo accade, isChar restituisce false.

Attenzione: attualmente isChar è afflitto da un bug, a causa del quale il risultato è sempre false. Gli sviluppatori di Mozilla potrebbero correggere questo bug, ma potrebbero anche decidere di eliminare questa proprietà non standard.

Specifiche

Non è parte di alcuna specifica.

{{ languages( { "en": "en/DOM/event.isChar", "pl": "pl/DOM/event.isChar" } ) }}