if (whichCode == 13) return true; // Enter if (whichCode == 8) return true; // Tecla de retroceso key = String.fromCharCode(whichCode); // Get key value from key code