Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

375
Vistas
KeyboardEvent.keyCode deprecated, but what about diacritics?

We had an interesting bug at the company I work on: we have an application with lots of key shortcuts, including "`" (backtick character), and because KeyboardEvent.keyCode has been deprecated, it was changed on a refactor from

KeyboardEvent.keyCode === 192

to

KeyboardEvent.key === '`'

This works on keyboards without diacritics activated - for instance, US keyboard with no diacritics where pressing the ` key would immediately write the ` character - while for users with diacritics activated, it would not (on such cases, to type the ` one needs to press the ` key then space), because if you press the key ` and then the letter a, for instance, you get the character à. Apparently with diacritics activated, KeyboardEvent.key returns Dead, so we had to revert this refactor.

That being said, is there a different option then using this deprecated feature?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use KeyboardEvent.code

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda