Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Èròjà atẹ̀lélànà yii ni a ti fi pamọ́ fọ́jọ́ pípẹ́. Jọ̀wọ́ béèrè ìbéèrè titun bí o bá nílò ìrànwọ́.

Capture the shift key when pressed

  • 1 èsì
  • 1 ní ìṣòro yìí
  • 22 views
  • Èsì tí ó kẹ́hìn lọ́wọ́ 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.

All Replies (1)

more options

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