qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.37k stars 39.56k forks source link

[Bug] NOOP keys kill combos #19446

Open xJayMorex opened 1 year ago

xJayMorex commented 1 year ago

Describe the Bug

The issue is that whenever a NOOP key is pressed down along with a valid combo, the combo doesn't fire.

Use case:

I am using an ortholinear split keyboard with left shift + right shift combo as caps lock toggle. The right shift is 2U with a POS keycap so the underlaying switches are KC_RSFT and XXXXXXX (using the right switch as a stabilizer because the pcb doesn't support 2U key in that position).

Expected behavior:

NOOP shouldn't interfere with combos because by definition the key should be ignored.

Notes:

I tried the combo with 1U keycaps (meaning the NOOP key is not pressed) and it works fine, so the problem is indeed the NOOP interfering with combos.

Keyboard Used

keebio/viterbi/rev2

Link to product page (if applicable)

https://keeb.io/products/viterbi-keyboard-pcbs-5x7-70-split-ortholinear

Operating System

Microsoft Windows 11

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

Other keyboard-related software installed

No response

Additional Context

No response

xJayMorex commented 1 year ago

Proposed solution:

bool process_combo(uint16_t keycode, keyrecord_t *record) {
    // ignore noop keys during combos
    if (keycode == KC_NO) {
        return true;
    }
    (...)
}
johnwilmes commented 6 months ago

This is a special case of #15911