-
-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Core: Allow C and JSON keymaps to be used together #16636
Conversation
Keep your keymaps nice and simple with JSON keymaps, but use the full power of macros written in C.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I would prefer a lighter touch such as what #13197 provided. Be it difficult to implement with the current injection of a generated process_record_user
, but could be implemented by a hacky macro to rename any previous declaration.
@@ -108,6 +108,10 @@ __attribute__((weak)) bool process_action_kb(keyrecord_t *record) { | |||
} | |||
|
|||
__attribute__((weak)) bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
return process_record_json(keycode, record); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really not a fan of introducing this convention, its already bad enough that keyboards forget to call process_record_user
. Now there will be a new convention, and a bunch of "broken" keyboards as they do process_record_kb -> process_record_user
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not married to this implementation, but other approaches seemed more "hacky".
Although keyboard's process_record_kb
can certainly brake this, keyboards breaking convention might be an other problem we have to tackle in some other way.
I marked this PR to be Draft until we decide how to proceed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anything, I would say that it should be moved into to the rest of the process_record_* handling is done, just like a normal feature.
Closing for now as #19939 was added. |
Description
Keep your keymaps nice and simple with JSON keymaps, but use the full
power of macros written in C.
Types of Changes
Issues Fixed or Closed by This PR
Checklist