On Tuesday November 28th from 9:00AM PT - 12PM PT (5:00PM UTC - 8PM UTC), we will be performing system maintenance on support.mozilla.org. During the maintenance period, users will not be able to sign in to the website, and all users signed in at the start of the maintenance period will be signed out.

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

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

Firefox skips key events

  • 3 پاسخ
  • 0 have this problem
  • 6 views
  • آخرین پاسخ توسّط !evil

more options

Hi,

I'm on Arch Linux and use uinput to create key events. It works reliably for >12months in all applications and under all circumstances except in Firefox where some key events are skipped non-deterministically. My test case is:

in a text field, emit `<ctrl down>a<ctrl up>123456789987654321<left>...<left>` with 9 times `<left>`. Sometimes a 9 is missing and sometimes the cursor is further to the right than expected.

This happens every 8th try or so, which is too frequent to not break the user experience.

What I have tried: - multiple PCs (2 with this issue and 1 without) - Troubleshoot Mode - `window.onkeydown=(e)=>console.log(e)` (events are missing)

Since I've only ever seen repeated characters/keys disappear and never when writing manually, I would guess there is some kind of event cleanup algorithm kicking in. (the events are emitted without any delays)

I would really like to fix this issue because Firefox is my favorite browser. Any idea how to track it down?

Maybe related: https://support.mozilla.org/en-US/questions/1363234

Hi, I'm on Arch Linux and use uinput to create key events. It works reliably for >12months in all applications and under all circumstances except in Firefox where some key events are skipped non-deterministically. My test case is: in a text field, emit `<ctrl down>a<ctrl up><del>123456789987654321<left>...<left>` with 9 times `<left>`. Sometimes a 9 is missing and sometimes the cursor is further to the right than expected. This happens every 8th try or so, which is too frequent to not break the user experience. What I have tried: - multiple PCs (2 with this issue and 1 without) - Troubleshoot Mode - `window.onkeydown=(e)=>console.log(e)` (events are missing) Since I've only ever seen repeated characters/keys disappear and never when writing manually, I would guess there is some kind of event cleanup algorithm kicking in. (the events are emitted without any delays) I would really like to fix this issue because Firefox is my favorite browser. Any idea how to track it down? Maybe related: https://support.mozilla.org/en-US/questions/1363234

All Replies (3)

more options

after `<ctrl up>` there is a `<d e l>`

Helpful?

more options

X11 or Wayland? Does setting the environment variable MOZ_ENABLE_WAYLAND=1 make any difference?

This is a good site for testing: https://w3c.github.io/uievents/tools/key-event-viewer.html

Helpful?

more options

Thanks for the reply! Its Wayland and MOZ_ENABLE_WAYLAND=1 doesn't.

The event viewer showed that keydown are missing (two keyup back to back). I've did some more testing:

- if JS is idle, I can't reproduce - if JS is busy, it happens ever so often (I created a minimal page with a busy loop on "input" of the input element) - it really only affects consecutive events of the same key. For instance, emitting 12121212112121212121 only hicks up exactly at 11 (one of them ends up missing)

Btw, can't reproduce in Chrome

Helpful?

یک سؤال بپرسید

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.