Skip to content
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

Added new KeyPressRecorder and new KeyCode value #43

Closed
wants to merge 2 commits into from

Conversation

ryjacky
Copy link

@ryjacky ryjacky commented Dec 4, 2023

Added new widget KeyPressRecorder and new KeyCode value for use in KeyPressRecorder.

KeyPressRecorder
KeyPressRecorder is a rewrite of the HotKeyRecorder widget using the newer KeyEvent API, specifically, using the Focus widget. KeyPressRecorder fixes some of the bugs of HotKeyRecorder such as the one mentioned in #42 .

Also, hotkeys are now only recorded when the widget itself is being focused on. Instead of recording and rewriting all keys, KeyPressRecorder uses non-modifier keys as the 'trigger' for onHotKeyRecorded.

KeyCode
A new KeyCode, empty (' '), is also added to the KeyCode enum and the display string map for use in KeyPressRecorder.

When only modifier keys are pressed, an empty block will be displayed at the end representing the not-yet-pressed trigger key.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@lijy91
Copy link
Member

lijy91 commented Mar 16, 2024

I abandoned the KeyCode and KeyModifier classes in v0.2.0, which prevented me from integrating them into your PR

@lijy91 lijy91 closed this Mar 16, 2024
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.

None yet

2 participants