Skip to content

Avoid modifier release immediately followed by modifier press#1810

Merged
user202729 merged 1 commit intoopensteno:mainfrom
user202729:avoid-modifier-release-then-press
Jan 17, 2026
Merged

Avoid modifier release immediately followed by modifier press#1810
user202729 merged 1 commit intoopensteno:mainfrom
user202729:avoid-modifier-release-then-press

Conversation

@user202729
Copy link
Member

Summary of changes

If the user wants to type an all-uppercase string e.g. ABC,

before this change, the following events will be sent

+shift
+A
-A
-shift
sync
(delay)
+shift
+B
-B
-shift
sync
(delay)
+shift
+C
-C
-shift
sync
(delay)

now we get the following, which is much more reasonable

+shift
+A
-A
sync
(delay)
+B
-B
sync
(delay)
+C
-C
-shift
sync
(delay)

I recall some issues (laggy Discord on Firefox?) that is suspected to be caused by this behavior (which is likely enough if some heavy logic are executed on shift key press/release), but I can't find the bug report anymore.

Caveat: not sure if news entry should go into linux or core, since I've only implemented it for linux.

Pull Request Checklist

  • Changes have tests (this part isn't easy to unit test)
  • News fragment added in news.d. See documentation for details

@user202729 user202729 force-pushed the avoid-modifier-release-then-press branch from 97c3936 to 2272f0b Compare January 10, 2026 09:08
Copy link
Contributor

@mkrnr mkrnr left a comment

Choose a reason for hiding this comment

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

The change looks good to me, thanks!

Just a small one: better move the news file to "linux" instead of "core".

@user202729 user202729 force-pushed the avoid-modifier-release-then-press branch from 2272f0b to 3362363 Compare January 17, 2026 00:11
Copy link
Contributor

@mkrnr mkrnr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Feel free to merge when ready.

@user202729 user202729 merged commit a05af15 into opensteno:main Jan 17, 2026
18 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.

2 participants