mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #1175] Held keys randomly "bounce" #943
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#943
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Techjar on GitHub (May 30, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1175
Describe the bug
When holding a key down for an extended period of time, it will sometimes quickly release and press again, despite still holding down the physical key. This only happens on the client machine(s) through Barrier, not on the server machine, so it isn't a hardware issue or anything. My client machine is Windows in this case, and server machine is Linux. I don't know if it happens with other operating system combinations and I don't have the means to test that.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The key should remain held and never release until I actually release the physical key.
Desktop (please complete the following information):
Additional context
This causes annoyance in games that require you to hold down a key for several seconds to complete an action, as the action will randomly restart due to this issue.
@Techjar commented on GitHub (May 31, 2021):
I have narrowed the issue down to key repeat. If I disable key repeat on the Linux (server) machine, the issue goes away.
@apanteleev commented on GitHub (Jun 29, 2021):
I'm observing the same issue with a Windows server and Linux clients. When holding a key long enough, the client gets "key released" events followed by "key pressed", which can break things like camera controls in 3D apps.
Easily reproducible with the glfw "events" test running on the client, see https://github.com/glfw/glfw/tree/master/tests
@CloudMax94 commented on GitHub (Apr 23, 2022):
I've come across this problem as well when playing certain games for months now with movement sometimes stuttering in weird ways. Wasn't until just today that I realized what was actually happening. Became pretty obvious that holding a key was not working properly in some situations when I was playing a game which required me to hold down a button without interruption for several seconds.
More interestingly, I noticed that this problem never happens if I constantly move my mouse (when set at a decent polling rate) while holding down a key. So an annoying workaround for me right now is to simply move the mouse constantly whenever I need to hold down a key without interruption, which is less than ideal, but at least its something.
This led me to believe that the issue might be polling related and that repeat state is lost for whatever reason when events aren't received often enough? Or at least something in that vein. I tried looking over the code but it goes way beyond me.
Disabling Repeat Keys on the host as mentioned above also works, but that will then ofc. also disable repeat keys which is something I absolutely do not want to do as it makes typing, among other things, very awkward.
I'm on Barrier 2.4.0, Linux host & Windows client.