Skip to content

Pause/break support #18

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

Merged
merged 5 commits into from
Aug 28, 2022
Merged

Pause/break support #18

merged 5 commits into from
Aug 28, 2022

Conversation

thejpster
Copy link
Member

@thejpster thejpster commented Aug 28, 2022

Adds support for Pause/Break and PrintScreen keys on Scancode Set 2.
Makes Key Events non-exhaustive (so we can add more later without a breaking change)
Switches to Github Actions (we were still on travis-ci!)

Tapping "Pause" generates E1,14,77,E1,F0,14,F0,77

We now decode this as:

* PauseBreak/Down
* NumLock/Down
* PauseBreak/Up
* NumLock/Up

Tapping "Print Scr" generates E0,12,E0,7C. This becomes:

We now decode this as:

* PrintScreen/SingleShot
* PrintScreen2/SingleShot

Note the addition of the "SingleShot" KeyState, for keys that don't
have a Make/Break pair. This avoids users waiting a "Break" that never
happens.
Means we can add keys without breaking backwards compatibility.

KeyEvents are also manually numbered to discourage anyone adding one
in the middle instead of at the end.
@thejpster
Copy link
Member Author

Need to change MSRV

@thejpster thejpster requested a review from jamesmunns August 28, 2022 15:06
Required for [non-exhaustive]
@thejpster
Copy link
Member Author

Closes #17

Copy link
Member

@jamesmunns jamesmunns left a comment

Choose a reason for hiding this comment

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

Overall looks good to me - I know very little about keyboards though, but I don't see any glaring errors in this diff.

@thejpster thejpster merged commit 0089d3b into master Aug 28, 2022
@thejpster thejpster deleted the pause-break-support branch August 28, 2022 19:27
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