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

Fix up tap_code functionality #4609

Merged
merged 8 commits into from
Dec 14, 2018
Merged

Fix up tap_code functionality #4609

merged 8 commits into from
Dec 14, 2018

Conversation

drashna
Copy link
Member

@drashna drashna commented Dec 12, 2018

Description

  • Moves tap_code to c files, since some compilers don't like the inline.
  • Adds a delay between registering and unregistering the keycodes (since some systems have issues)
  • Adds documentation of this setting.

Types of changes

  • Core
  • Bugfix
  • New Feature
  • Enhancement/Optimization
  • Keyboard (addition or update)
  • Keymap/Layout/Userspace (addition or update)
  • Documentation

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document. (https://docs.qmk.fm/#/contributing)
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

I think a few people have reporting issues with it working properly, and it may be a timing issue.  The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.

Adding the 100ms delay should hopefully fix any issues with it.
Bad copy-paste job
quantum/quantum.c Outdated Show resolved Hide resolved
tmk_core/common/action.c Outdated Show resolved Hide resolved
void tap_code(uint8_t code) {
register_code(code);
#if defined(TAP_CODE_DELAY) && TAP_CODE_DELAY > 0
wait_ms(TAP_CODE_DELAY);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
wait_ms(TAP_CODE_DELAY);
wait_ms(TAP_CODE_DELAY);

register_code(code);
#if defined(TAP_CODE_DELAY) && TAP_CODE_DELAY > 0
wait_ms(TAP_CODE_DELAY);
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#endif
#endif

@vomindoraan
Copy link
Contributor

LGTM otherwise.

docs/feature_macros.md Outdated Show resolved Hide resolved
docs/config_options.md Outdated Show resolved Hide resolved
vomindoraan and others added 3 commits December 12, 2018 09:54
Co-Authored-By: drashna <drashna@live.com>
Co-Authored-By: drashna <drashna@live.com>
Copy link
Contributor

@mechmerlin mechmerlin left a comment

Choose a reason for hiding this comment

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

Great!

@mechmerlin mechmerlin merged commit 02d44be into qmk:master Dec 14, 2018
@drashna drashna deleted the tap_code_tweak branch December 14, 2018 17:03
ishtob pushed a commit to ishtob/qmk_firmware that referenced this pull request Jan 1, 2019
* Add delay in Tap Code to avoid issues

I think a few people have reporting issues with it working properly, and it may be a timing issue.  The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.

Adding the 100ms delay should hopefully fix any issues with it.

* Make tap_code delay configurable

* Update documentation

* Bring tap_code16 inline with changes

* Fix type for tap_code16

Bad copy-paste job

* Just use the value check for the define

* Clarify timing in docs

Co-Authored-By: drashna <drashna@live.com>

* Wordsmithing

Co-Authored-By: drashna <drashna@live.com>
yeliu84 pushed a commit to yeliu84/qmk_firmware that referenced this pull request Jan 7, 2019
* Add delay in Tap Code to avoid issues

I think a few people have reporting issues with it working properly, and it may be a timing issue.  The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.

Adding the 100ms delay should hopefully fix any issues with it.

* Make tap_code delay configurable

* Update documentation

* Bring tap_code16 inline with changes

* Fix type for tap_code16

Bad copy-paste job

* Just use the value check for the define

* Clarify timing in docs

Co-Authored-By: drashna <drashna@live.com>

* Wordsmithing

Co-Authored-By: drashna <drashna@live.com>
rseymour pushed a commit to rseymour/qmk_firmware that referenced this pull request Mar 13, 2019
* Add delay in Tap Code to avoid issues

I think a few people have reporting issues with it working properly, and it may be a timing issue.  The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.

Adding the 100ms delay should hopefully fix any issues with it.

* Make tap_code delay configurable

* Update documentation

* Bring tap_code16 inline with changes

* Fix type for tap_code16

Bad copy-paste job

* Just use the value check for the define

* Clarify timing in docs

Co-Authored-By: drashna <drashna@live.com>

* Wordsmithing

Co-Authored-By: drashna <drashna@live.com>
djthread pushed a commit to djthread/qmk_firmware that referenced this pull request Mar 17, 2019
* Add delay in Tap Code to avoid issues

I think a few people have reporting issues with it working properly, and it may be a timing issue.  The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.

Adding the 100ms delay should hopefully fix any issues with it.

* Make tap_code delay configurable

* Update documentation

* Bring tap_code16 inline with changes

* Fix type for tap_code16

Bad copy-paste job

* Just use the value check for the define

* Clarify timing in docs

Co-Authored-By: drashna <drashna@live.com>

* Wordsmithing

Co-Authored-By: drashna <drashna@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants