Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

event.keyCode not working on Firefox 65.0.1

  • 1 отговор
  • 1 има този проблем
  • 11 изгледи
  • Последен отговор от Wesley Branton

more options

Hello,

I have a system for years already, using java script event.keyCode and always worked well.

After the new upgrade for Firefox 65.0.1, the function event.keyCode stops to work.

What happened? How can I solve this issue?

Thank you

Hello, I have a system for years already, using java script event.keyCode and always worked well. After the new upgrade for Firefox 65.0.1, the function event.keyCode stops to work. What happened? How can I solve this issue? Thank you

Всички отговори (1)

more options

This isn't really a direct answer to your question, but the event.keyCode API is obsolete at this point. This means that future versions of web browsers may eventually drop this feature. That's not the case right now, since I checked and it's still working for me.

However, you should consider using the new event.key API instead. It's actually a little better because it will return the key value. For example, pressing the F key will return "f" instead of "70".

As for your specific issue, it's difficult to troubleshoot since it's very dependent on your specific code. All I can tell you is that the API is still working fine, so it's more likely a code-specific issue than a Firefox-specific issue.

Hope this helps.