Is the JS key entry timing off on Edge?

Asked 2 years ago, Updated 2 years ago, 53 views

When you receive keystrokes in JavaScript on your browser's Edge,
Is it just my imagination that the timing sometimes goes wrong?

For the most obvious example, press and hold the right side of the direction key and
Pressing or releasing the direction keys can delay the pressing time by about 0.5 seconds.
Other than that, pressing itself is not recognized or
The key that has already been released is considered to have been pressed.

Simply receive key events with onkeydown and onkeyup, rewrite the flag, and
We are testing the flags of each key with a program that simply draws them in canvas at intervals of 20 milliseconds in setInterval.

The same symptom occurred on other pages.
(Or rather, I noticed it and looked it up.)

Does anyone know anything about this phenomenon?

javascript html5

2022-09-30 15:02

1 Answers

I think it's not a browser or Javascript problem, but a hardware or OS specification.

There are two keyboard features (specifications):
·Make it the same as when you hit continuously when you leave it pressed.(Depending on the driver or BIOS, you can change the number of consecutive hits.)
·If keys are continuously inputted earlier than the speed of the acceptance processing of the key input, the input is stored in a buffer and sequentially the acceptance processing of the input acceptance processing is performed.(The size of the buffer varies greatly depending on the application, environment, etc.)

The status of the question should be "The input has exceeded the speed of the application, so the input has been delayed from the keyboard buffer".


2022-09-30 15:02

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.