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

oneshot timeout would only timeout after an event. #1010

Merged
merged 2 commits into from
Feb 6, 2017

Conversation

SjB
Copy link
Contributor

@SjB SjB commented Jan 16, 2017

After setting a ONESHOT_TIMEOUT value, the oneshot layer state would
not expire without an event being triggered (key pressed). The reason
was that in the process_record function we would return priort to
execute the process_action function if it detected a NOEVENT cycle. The
process_action contained the codes to timeout the oneshot layer state.
The codes to clear the oneshot layer state have been move just in
front of where we check for the NOEVENT cycle in the process_record
function.

SjB added 2 commits January 15, 2017 23:29
After setting a ONESHOT_TIMEOUT value, the oneshot layer state would
not expire without an event being triggered (key pressed). The reason
was that in the process_record function we would return priort to
execute the process_action function if it detected a NOEVENT cycle. The
process_action contained the codes to timeout the oneshot layer state.
The codes to clear the oneshot layer state have been move just in
front of where we check for the NOEVENT cycle in the process_record
function.
The oneshot cancellation code do not depend on the
action_tapping_process and since process_record get called via the
action_tapping_process logic moved the oneshot cancellation code into
the action_exec function just before the action_tapping_process call
@jackhumbert
Copy link
Member

Great! Thanks :)

@jackhumbert jackhumbert merged commit b6ffda4 into qmk:master Feb 6, 2017
@cquiroz cquiroz mentioned this pull request Jun 17, 2017
mattpcaswell pushed a commit to mattpcaswell/qmk_firmware that referenced this pull request Jun 7, 2023
* Enable ISO legends on keymap
Add a config option to display ISO legends rather than ANSI

* Update var to let

* Update logic for mutating array to search
Add enable and disable ISO mutations
Steno and Iso mutations check to make sure they dont override each other

* Fire keycodes mutation on toggleIso

* Subscribe to setIso mutation to change tab

* Added use of lookupKeycode getter to BaseKey
Allows the keymap to dynamically update legends based on the ISO toggle

* Wrap if branches and use store in clause

* Suggested Implementation

 - moved active state to keycodes model to make it easier to coordinate
   state changes from events
 - track state of steno in keycodes
 - add generateKeycodes helper function to reduce boilerplate
 - add helper isISO to wrap deep inspection into state model
 - remove explicit subscription to model changes
 - only change tab state if we are looking at ANSI/ISO tab

* Updated generateKeycodes to use state
steno arg passed into func was overriding imported steno

* Modify generateKeycodes to use object.key

* Reverted to pass args but updated arg names

* Update ISO setting label

Co-authored-by: Yan-Fa Li <yanfali@gmail.com>
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