Skip to content

[Bug] Cannot release a 2 key combo on a single key release #26041

@nyliya

Description

@nyliya

Describe the Bug

I made a simple combo that sends X when both A & D are pressed.

enum combos {
  C_AD
};

const uint16_t PROGMEM combo_AD[] = {KC_A, KC_D, COMBO_END};

combo_t key_combos[] = {
  [C_AD] = COMBO(combo_AD, KC_X),
};

I cannot get the combo to release if only A or D is released using process_combo_key_release from the docs. It will release only once both A and D have been released.

This is what I have tried:

bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) {
    return true;
}

as well as:

bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) {
    switch (combo_index) {
        case C_AD:
            switch(keycode) {
                case KC_A:
                    unregister_code(KC_X);
                    break;
                case KC_D:
                    unregister_code(KC_X);
                    break;
            }
            return true; //release combo
    }
    return false;
}

Keyboard Used

royal_kludge/rk61

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output


Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions