Skip to content

fix: held keys are not longer toggled - #9217

Merged
nbolton merged 1 commit into
masterfrom
repeatKeys
Nov 27, 2025
Merged

fix: held keys are not longer toggled#9217
nbolton merged 1 commit into
masterfrom
repeatKeys

Conversation

@sithlord48

@sithlord48 sithlord48 commented Nov 26, 2025

Copy link
Copy Markdown
Member

fixes: #7971
suggested by: PseudoResonance #7971 (comment)

Tested this on mac os and it was way smoother in game also tested on kde plasma didn't see any change here (it was working for me before and it remains working)

fixes: #7971
suggested by: PseudoResonance #7971 (comment)
@sithlord48
sithlord48 requested a review from a team November 26, 2025 21:33
@sithlord48
sithlord48 requested a review from nbolton as a code owner November 26, 2025 21:33
@sithlord48 sithlord48 added the 🩹 fix This PR fixes a reported bug label Nov 26, 2025
@sithlord48 sithlord48 changed the title fix: keyholding fix: held keys are not longer toggled Nov 26, 2025
@PseudoResonance

Copy link
Copy Markdown
Contributor

Just for reference, this site is good for testing: https://w3c.github.io/uievents/tools/key-event-viewer.html

On the repeated key events, you should see the "repeat" column marked with a checkmark.

image

As opposed to just having the key go up/down each time.

image

@nbolton nbolton 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.

Works!

Image

@nbolton

nbolton commented Nov 27, 2025

Copy link
Copy Markdown
Member

Just for reference, this site is good for testing: https://w3c.github.io/uievents/tools/key-event-viewer.html

On the repeated key events, you should see the "repeat" column marked with a checkmark.

Thanks, that was super helpful.

@nbolton
nbolton merged commit 2f5166f into master Nov 27, 2025
62 of 63 checks passed
@nbolton
nbolton deleted the repeatKeys branch November 27, 2025 12:05
ljepson added a commit to ljepson/deskflow that referenced this pull request Jan 30, 2026
Key repeat from Windows servers wasn't working on macOS because the
repeat keystroke paths were disabled for non-Windows (PR deskflow#9217/deskflow#9234)

OSXKeyState never set the autorepeat flag on synthetic events

Now we enable repeat keystroke generation for macOS alongside Windows,
skip repeat key-ups in fakeKey() (matching MSWindowsKeyState behavior),
and set kCGKeyboardEventAutorepeat/event.key.repeat so macOS recognizes
the events as held keys rather than discrete taps.

Fixes deskflow#7971, fixes deskflow#3510
ljepson added a commit to ljepson/deskflow that referenced this pull request Jan 30, 2026
Key repeat from Windows servers wasn't working on macOS because the
repeat keystroke paths were disabled for non-Windows (PR deskflow#9217/deskflow#9234)

OSXKeyState never set the autorepeat flag on synthetic events

Now we enable repeat keystroke generation for macOS alongside Windows,
skip repeat key-ups in fakeKey() (matching MSWindowsKeyState behavior),
and set kCGKeyboardEventAutorepeat/event.key.repeat so macOS recognizes
the events as held keys rather than discrete taps.

Fixes deskflow#7971, fixes deskflow#3510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🩹 fix This PR fixes a reported bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Holding a key acts like tapping after a few seconds

3 participants