mirror of https://github.com/jitsi/jitsi-meet
Come over for a fun story, dear reader! Here is a not-so-fun difference in behavior, observed in macOS: - The builtin keyboard doesn't seem to send the same key over and over again while it's being held. - On the contrary, a USB keyboard does. That means that for some keyboards PTT has been broken. We get keydown/keyup pairs in quick successing. One would think that KeyboardEvent.repeat would solve that, but it doesn't seem to, in practice. See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat So, in order to solve this, delay handling the keyup event by 50ms. This way, if a new keydown comes before the keyup has been handled we'll cancel it and act as it never happened, restoring PTT functionality. While we're at it, use window.addEventListener rather than onkeyup/onkeydown, since it's 2024 :-)pull/14851/head jitsi-meet_9626
parent
de1e470c68
commit
74b02af318
Loading…
Reference in new issue