Skip to content

[Enhancement] Make Hold-Tap work with transparent keycodes  #1039

@hariganti

Description

@hariganti

Describe the bug
When using hold-tap (KC.HT(KC.TAP, KC.HOLD)), using KC.TRNS for the tap action doesn't properly send the keycode that should be sent.

To Reproduce
Steps to reproduce the behavior:

from kmk.keys import KC
CUST = KC.HT(KC.TRNS, KC.LCTL)
Keyboard.keymap = [
  [ ... KC.A, KC.B ... ],
  [ ... CUST, CUST ... ]
]
  1. Activate second layer
  2. Press 'B'
  3. Press 'A'
  4. Release 'A'
  5. Release 'B'

Expected behavior
Control + A (select all) should be the result

Debug output
No output available at this time

Additional context
What I'd like to do is have a layer with home row mods, so holding a key will momentarily enable that layer, then holding one of the hold-tap keys will give me the desired modifier. As I have other layers, using the transparency keycode for the tap function is desirable since it will allow me to use the home row mods on whichever layer I was actively using before activating the momentary layer. This is also why I can't just do something like, KC.HT(KC.A, KT.LCTL), since that won't allow me to use control as a modifier on all layers

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions