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

race condition between oneshot_mods and tap_dance #1049

Merged
merged 1 commit into from
Feb 2, 2017

Conversation

SjB
Copy link
Contributor

@SjB SjB commented Jan 29, 2017

since the keycode for a tap dance process gets process only after the
TAPPING_TERM timeout, you really only have ONESHOT_TIMEOUT -
TAPPING_TERM time to tap or double tap on the key. This fix save the
oneshot_mods into the action.state structure and applies the mods with
the keycode when it's registered. It also unregisters the mod when the
the tap dance process gets reset.

since the keycode for a tap dance process gets process only after the
TAPPING_TERM timeout, you really only have ONESHOT_TIMEOUT -
TAPPING_TERM time to tap or double tap on the key. This fix save the
oneshot_mods into the action.state structure and applies the mods with
the keycode when it's registered. It also unregisters the mod when the
the tap dance process gets reset.
@ezuk
Copy link
Contributor

ezuk commented Feb 1, 2017

@algernon what do you think?

@ezuk
Copy link
Contributor

ezuk commented Feb 1, 2017

and thank you @SjB!

@algernon
Copy link
Contributor

algernon commented Feb 1, 2017

I'm trying to wrap my head around this. Gut feeling is that this is a good change, but I don't quite see yet how the race manifests (and I've been a heavy one-shot + tap-dance user, but perhaps I'm too slow to trigger the race).

I'll give the PR a go today at work, and report back.

@algernon
Copy link
Contributor

algernon commented Feb 1, 2017

Just tried the PR, and I can't notice any ill side-effects. So :shipit: !

@ezuk
Copy link
Contributor

ezuk commented Feb 2, 2017

Awesome! Thank you @algernon and @SjB again! merging up

@ezuk ezuk merged commit 45e5b32 into qmk:master Feb 2, 2017
@SjB SjB deleted the tap_dance_save_oneshot_mods branch February 3, 2017 02:21
@deftsp
Copy link
Contributor

deftsp commented Sep 29, 2018

This commit casue the set_oneshot_mods can not timeout and the mods will emit key_down event, even no next key been pressed. I think remove the send_keyboard_report in process_tap_dance_action_on_reset can slove this. @SjB @algernon

mattpcaswell pushed a commit to mattpcaswell/qmk_firmware that referenced this pull request Jun 7, 2023
* First pass moving to VITE

 - time to put vue-cli out to pasture

* Shim the loader into the vite plugin

 - using
   https://github.com/SirwanAfifi/vite-plugin-csv/blob/main/src/index.ts
   as a reference for plugin, shim the loader.js into vite so it can
   translate the i18n csv files into JS.
 - re-uses all the excellent work by zekth

* Fix keypress listener init

* Reduce Bundle Size

 - extra copies of Vue, still one I haven't gotten rid of
 - use lazy loading for routes to reduce bundle size

* Formatting

* Fix lint task

* Cypress Fixes

 - upgrade vue-router to 3.5
   - use new isNavigationFailure feature to process errors we don't care
     about
 - fix cypress tests
   - ports have changed with vite
   - some matchers produce no output now instead of no match
   - wait before handling typing test because we now init in vuex
     instead of directly in page

prettier

* Fix up actions

* Fix up env variable prefixes

* Attempt to cache Cypress

* Fix ajv script so it returns errors to caller

* Dangling Comma

* Remove stray console
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.

4 participants