Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
nicknimchuk opened this issue Mar 10, 2024 · 0 comments
Open
2 tasks
Labels
bug Something isn't working

Comments

@nicknimchuk
Copy link

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

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

@nicknimchuk nicknimchuk added the bug Something isn't working label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant