Skip to content

fix: client to server modifier press/release - #9056

Merged
nbolton merged 1 commit into
deskflow:masterfrom
enzious:fix/client-to-server-modifier-press-release
Oct 21, 2025
Merged

fix: client to server modifier press/release#9056
nbolton merged 1 commit into
deskflow:masterfrom
enzious:fix/client-to-server-modifier-press-release

Conversation

@enzious

@enzious enzious commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

Pressing a modifier on the client and moving to the server and releasing it breaks the modifier on the client. This resolves the issue for me.

@enzious
enzious force-pushed the fix/client-to-server-modifier-press-release branch 5 times, most recently from a1a43e5 to de123ad Compare October 18, 2025 17:06
@enzious

enzious commented Oct 18, 2025

Copy link
Copy Markdown
Contributor Author

Looks like the mac test had a random failure?

@sithlord48

Copy link
Copy Markdown
Member

The key press tests are horrible and yeah it random fails on mac os sometimes.

@sithlord48

Copy link
Copy Markdown
Member

This fix should be applied to the other screen types as well

@enzious

enzious commented Oct 18, 2025

Copy link
Copy Markdown
Contributor Author

I don't really know how this would affect the other types, so I left them no-op

@sithlord48

sithlord48 commented Oct 18, 2025

Copy link
Copy Markdown
Member

@nbolton Thoughts on how we can use this on the other screen types ?

@sithlord48 sithlord48 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked on a quick EI test

@nbolton

nbolton commented Oct 21, 2025

Copy link
Copy Markdown
Member

key press tests are horrible

Agreed.

@nbolton Thoughts on how we can use this on the other screen types ?

Edit: Could you elaborate?

Pressing a modifier on the client and moving to the server and releasing
it breaks the modifier on the client. This resolves the issue.
@nbolton
nbolton force-pushed the fix/client-to-server-modifier-press-release branch from de123ad to d5c66f9 Compare October 21, 2025 12:35
@sithlord48

Copy link
Copy Markdown
Member

key press tests are horrible

Agreed.

@nbolton Thoughts on how we can use this on the other screen types ?

Edit: Could you elaborate?

On other screen types i know we have some issues with stuck modifiers

@nbolton

nbolton commented Oct 21, 2025

Copy link
Copy Markdown
Member

screen types

You mean other OS or just Xorg?

Edit: It's been a long time, so that's paged out for me... I'd need to have a good dig to see if the same idea can be applied to other platforms. This rings a bell for me though so either I tried to solve it before or the fix is there somewhere but isn't working reliably.

@sithlord48

Copy link
Copy Markdown
Member

all oses could have this issues ..since this is now part of the base class we could use this method if we need to

@nbolton

nbolton commented Oct 21, 2025

Copy link
Copy Markdown
Member

Pressing a modifier on the client and moving to the server and releasing it breaks the modifier on the client.

Can confirm this bug and that this PR fixes it.

Edit: Great PR, thanks.

Steps in other words:

  1. Move mouse from server to client
  2. Press and hold shift key (keep held)
  3. Move mouse back to server
  4. Release shift key
  5. Move mouse back to client
  6. Type 'a'

Expect: Lower case 'a'
Actual: Upper case 'A' (shift is stuck on)

all oses could have this issues ..since this is now part of the base class we could use this method if we need to

Edit: I'll have a poke and a think.

Edit: Hmm, well on macOS we use GetCurrentKeyModifiers (OS API) to get the active modifiers rather than maintaining a state like we do in our EI code. On Windows, I think we use KeyState::m_keys as the state, so maybe there's something there to look at?

@nbolton
nbolton merged commit b8bd690 into deskflow:master Oct 21, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants