Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Learn More

Capture the shift key when pressed

  • 1 одговор
  • 1 има овај проблем
  • 1 преглед
  • Последњи одговор послао codyb29

more options

I am writing a program that requires me to detect when a shift key is pressed and do something. Something like

window.addEventListener('keydown', event => console.log(event), false); // expect to see an event logged to console when pushing the "shift" key

This works great on all browsers except Firefox. "alt" and "fn" keys are also not able to be detected on Firefox. Is there some sort of advanced security settings I can disable to let me capture these things?

Thanks in advance.

I am writing a program that requires me to detect when a shift key is pressed and do something. Something like window.addEventListener('keydown', event => console.log(event), false); // expect to see an event logged to console when pushing the "shift" key This works great on all browsers except Firefox. "alt" and "fn" keys are also not able to be detected on Firefox. Is there some sort of advanced security settings I can disable to let me capture these things? Thanks in advance.

Сви одговори (1)

more options

This is actually working on Windows. This could be a mac OS issue.