Skip to content

Remove synchronization from key press handling#53

Merged
Lakritzator merged 1 commit intomasterfrom
Lakritzator-patch-1
Mar 26, 2026
Merged

Remove synchronization from key press handling#53
Lakritzator merged 1 commit intomasterfrom
Lakritzator-patch-1

Conversation

@Lakritzator
Copy link
Copy Markdown
Member

Removed synchronization and current thread observation for key press handling.
This should fix issues when applications try to handle a key combination and prevent it to go on to other applications or the operating system.

This fix was suggested by Gemini, and the bug was found in greenshot/greenshot#1116

Removed synchronization and current thread observation for key press handling.
@Lakritzator
Copy link
Copy Markdown
Member Author

If this works I will also fix this for mouse events

@Lakritzator Lakritzator merged commit 803dcc2 into master Mar 26, 2026
3 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the .Synchronize() and .ObserveOn(Scheduler.CurrentThread) operators from the KeyboardHook observable chain. These changes ensure that keyboard events are processed synchronously on the hook thread, which is necessary for the Handled property to correctly suppress key propagation. I have no feedback to provide.

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.

1 participant