FrameworkComputer / qmk_firmware

Fork of QMK for the Framework Laptop 16
GNU General Public License v2.0
84 stars 24 forks source link

[Bug] Return value of process_record_user is ignored in framework.c #34

Open nicknimchuk opened 6 months ago

nicknimchuk commented 6 months ago

Describe the Bug

The framework.c file in the Framework 16 keyboard folder ignores the return value of process_record_user:

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  process_record_user(keycode, record);

This means that returning false in a keymap does not prevent further processing of the keycode, causing problems with custom behavior on already-valid keycodes.

I changed it to this:

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  if (!process_record_user(keycode, record)) { return false; }

However, if you want to potentially do some additional processing, you could choose to save the return value and just make sure it is applied when you return later in the function.

Keyboard Used

framework/ansi

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

Other keyboard-related software installed

No response

Additional Context

No response