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
[Bug] Mod-tap doesn't work with KC_TRANSPARENT #23365
Comments
Unfortunately, the behavior that you expected here is not actually implemented — And internally QMK has some other definitions of what a “basic” keycode is — e.g., You may try to implement the behavior that you want in custom code — see the Intercepting Mod-Taps section for a way to change the tap function. Although you may need to be careful here — if the layer state changes between the press and release (which may happen for a tap if quick tap is enabled, which is the default), just using the current layer state to determine which keycode to register or unregister for a tap may result in stuck keys (although if you don't care about reporting holds with the quick tap feature properly, you may just call Implementing that behavior in core (where it would need to work in the most generic way possible) may be difficult though — the problem is that it would require two instances of the source layers cache (one which would remember the layer where the |
That's what I suspected. Can I submit a pull request for docs to communicate this caveat more clearly? |
Docs claim MT works with KC_TRANSPARENT hwen that is not the case. See qmk#23365
Describe the Bug
According to docs, MT(mod, kc) should work with KC_TRANSPARENT.
KC_TRANSPARENT is present in Basic Keycode set: https://docs.qmk.fm/#/keycodes_basic?id=special-keys
Yet, when I setup a layer with keycodes such as LCTL_T(KC_TRANSPARENT), tapping the key does not yield the key from the preceding layer.
Here is what I was trying to achieve:
This would allow toggling mod-tap behaviour by toggling the MOD_TAP layer. I am using my dip switch to set layer 0 or layer 1 as default, which are COLEMAK and QWERTY layouts respectively.
You can find full example here: https://github.com/VitalyArtemiev/qmk_firmware/blob/mt_trsp_bug/keyboards/keychron/q11/ansi_encoder/keymaps/vital/keymap.c
Expected behaviour: When tapping the A key, I expect the letter A. When holding the A key, I expect the Ctrl modifier.
Actual behaviour: When tapping the A key, nothing. Holding the A key activates Ctrl as expected. This is regardless of the selected default layer (0 or 1).
Keyboard Used
keychron/q11/ansi_encoder
Link to product page (if applicable)
https://www.keychron.com/products/keychron-q11-qmk-custom-mechanical-keyboard
Operating System
Win10
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: