-
-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
possible [Bug] , tap-dance with macros #7585
Comments
I have similar problem with interrupted Tap Dance and changing to layers with custom keycodes. My goal is to have an otherwise normal space key on thumb, but with the exception that when pressed quickly in conjunction with another key (interrupted single hold), it would change layer and send the keycode from there. And of course change the layer back when the Tap Dance key is released. Now the desired action works only after the TAPPING_TERM expired, i.e. when the hold is NOT interrupted. If the hold is interrupted, custom keycodes act as if they're on the wrong layer; on base layer they get called instead of those on the top layer, and on the upper layer the first tap outputs nothing. Basic keycodes seem to work fine. Getting this functionality to work would be invaluable considering the four thumb keys on an Ergodox, meaning four instantly accessible layers with zero keys sacrificed to layer changing, and minimal impact on the regular key behavior. The regular keycodes may have failsafe duplicates on the thumb layers if necessary. Has anyone got an idea for a fix or a workaround? Some custom Tap Dance / timer code and matrix_scan_user ? Heres part of the code I'm using: void td_rspace_each(qk_tap_dance_state_t *state, void *user_data) { // Right thumb space - Navi/ArrowKey layer |
@username11236 I had this exact same problem. For me the workaround is to track the state of the tap dance and check if it's INTERRUPTED in the macro in the switch-case block. If it is INTERRUPTED and not pressed I let the macro run and clear the tap dance state after that code block does run. See my qmk source, line 536 for example. Note the cleanup on line 548 which from what I can tell is required. |
The underlying issue appears to be that the record event pressed property is falsy during the first tap in process_record_user() press when keycode is triggered before the tap dance tap term expires. |
This issue has been automatically closed because it has not had any recent activity. |
Describe the Bug
I have searched issues and could not find anything related to my problem. In case I have overlooked smth useful, please let me know.
I believe this to be bug, however the error might be caused by the user (me)
I have one key, with a tapdance function(QUOT_LAYR). On tap this key permanentely switches my layer to _NUMBP. On hold it switches to the layer _NAVC temporarily. (and back after release)
On _NAVC I have arrow keys and a macro. (CUST_ALTTAB)
The macro registrers KC_ALT and KC_TAB on press, and releases KC_TAB on release.
The tapdance key QUOT_LAYR releases KC_ALT on release.
This enables me to alt-tab through multiple entries and use arrow keys as well.
The only downside i experience with this setup is that the macro only executes after the timeout of the tapdance function. The button is completely unresponsive before that, simple keycodes are registered correctly though.
I tried to achieve this functionality using an advanced tap dance function instead of the macro, with exactly the same effect.
Any help is greatly appreciated!
System Information
Signum3.1, elite-c (pro micro)
ubuntu for build, win81 for flash (atmel flip)
avr-gcc (GCC) 5.4.0
arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620
0.7.97
No
Additional Context
keymap:
TD(QUOT_LAYR) on _BASE; CUST_ALTTAB on _NAVC
https://pastebin.com/2kjMp1WE
edit:
The layer switches immediately after press, as desired. And, if released before the timer runs out, permanently to another layer, as desired.
However, it seems that "process_record_user" is not called as long as the tapdance timer has not run out. Neither are any tapdance functions. Normal keycodes do work instantly.
The text was updated successfully, but these errors were encountered: