Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

372
Views
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 answers
Answer question

0

You can use KeyboardEvent.code

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!