Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Update store_or_get_action to cache keycode on key press, return cached keycode on key release #24517
base: develop
Are you sure you want to change the base?
Update store_or_get_action to cache keycode on key press, return cached keycode on key release #24517
Changes from 3 commits
b7dfced
37d8824
e890fa0
9f3e5fa
d3b8178
751ad39
4edc916
168cabe
3727bc7
46d0724
1dc3373
f512383
1378e56
9f71517
610863f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 1 in quantum/dynamic_keymap.c
GitHub Actions / lint
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.
As discussed on discord, this wont correctly handle keycode that are non-basic, and changing it to
unregister_code16
would then only handle basic+modded. Usingclear_keyboard()
covers more scenarios but still does not cover any side effects of quantum keycodes.Im also not a fan of coupling storage directly to its eventual use, wherever in the tmk action code. I agree updating
via.c
to be responsible would be error prone for other eventual uses ofdynamic_keymap_set_keycode
, but it still feels like the cleaner workaround till a better solution is implemented.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.
A reason I handled things in here was to cover the scenario of:
Is changing
unregister_code
to handle non-basic keycodes an option?Or creating a new, all-encompassing function to handle unregistering any code?
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.
Also, when you suggest to have
via.c
be responsible, would having the same logic but instead immediately before and after the call todynamic_keymap_set_keycode
within theid_dynamic_keymap_set_keycode
case suffice? Or would there be more to having this happen invia.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.
resolving since I made
via.c
responsible to handle thisThere 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.
Unresolving as its still using
unregister_code
.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.
Hey mate, if you have time and still have interest, I think my new implementation is ready for further review