Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the keyboard key held state occurring due to bad network conditions #146

Merged
merged 2 commits into from
May 2, 2024

Conversation

PMohanJ
Copy link
Contributor

@PMohanJ PMohanJ commented May 2, 2024

Reference the issue numbers and reviewers
Use # and @ to tag issues and reviewers.
@ehfd
Fixes #145

Explain relevant issues and how this pull request solves them
This pull request resolves the issue by replicating the solution provided in the reference https://github.com/Xpra-org/xpra/blob/a5a13a993139d9d48a60734e7bab3ec9d53c919a/xpra/server/mixins/input.py#L257.

Describe the changes in code and its dependencies and justify that they work as intended after testing
The changes are around the web interface and python server, where the client sends key-repeat event for the keys that are in key pressed state to the server. The server monitors these key-repeat event for the held keys and manages them based on the time interval of the key-repeat event sent by the client. When there's a unstable network, the server would just release those keys.

Describe alternatives you've considered
NA

Additional context
Add any other context or screenshots about the pull request here. Please describe whether you are willing to provide funding, as this will greatly accelerate your request.

  • I confirm that this pull request is relevant to the scope of this project. If you know that upstream projects are the cause of this problem, please file the pull request there.
  • I confirm that this pull request has been tested thoroughly and to the best of my knowledge that additional unintended problems do not arise.
  • I confirm that the style of the changed code conforms to the overall style of the project.
  • I confirm that I have read other open and closed pull requests and that duplicates do not exist.
  • I confirm that I have justified the need for this pull request and that the changes reflect the fix for the specified problem.
  • I confirm that no portion of this pull request contains credentials or other private information, and it is my own responsibility to protect my privacy.

PMohanJ and others added 2 commits May 2, 2024 18:24
…ey held state

to distinguish from key held state which might occur under some bad network conditions.

The server releases those keys that are held due to bad network conditions by analysing
the time interval of key-repeat events of the corresponding keys.
@ehfd ehfd merged commit a2003bc into selkies-project:main May 2, 2024
13 checks passed
@ehfd ehfd deleted the fix-key-congestion branch May 2, 2024 19:17
@ehfd
Copy link
Member

ehfd commented May 2, 2024

All good, except that the internal could be fine-tuned based on our experiences. Balance between excess type strokes under unstable networks vs responsiveness in interactive control (such as gaming).

@PMohanJ

ehfd added a commit that referenced this pull request May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants