qmk/qmk_firmware

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

Open

#26 041 ouverte le 28 févr. 2026

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C (43 867 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (20 368 stars)
Métriques de merge PR
 (Merge moyen 20j 9h) (27 PRs mergées en 30 j)

Description

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

Guide contributeur