-
-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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] Keymap introspection with key_overrides
#24457
Comments
Just saw this changelog, I could swear I copy pasted the documentation example though. But maybe I missed something, taking a look now 🤷 |
Unfortunately same error on my new branch |
Related to PR #24120 and the removal of the global variable |
This works: INTROSPECTION_KEYMAP_C = features/overrides.c But I cannot have 2 I would love to have a way to split my configuration as I have multiple keyboards and features enabled or not. How can I achieve this in a QMK compliant way? |
SuggestionMake Happy to contribute a PR if you're open to the idea. |
Make an #include "my_combos.c"
#include "my_keyoverrides.c"
Or, just stick the Doing different |
Thanks, will try your suggestion 🤞 I'd be happy to restructure my files "the QMK way" as long as I can do multiple keyboards with different features and, preferably, not have a giant megafile. Do you have an example I could follow? Or advice on how to achieve that? I did not came up with that file structure but was inspired by different people doing the same, might be worth to be documented somewhere even for the 0.01% of us 😅 |
I effectively created that file structure; I added the We don't really advertise its use under normal circumstances as it's not aligned with the docs, but for "power users" it's the suggestion. We've been actively removing user keymaps from the repo due to their maintenance cost, so it's hard to point you at anything, really. Perhaps looking at some active forks of https://github.com/qmk/qmk_userspace might show up some nuggets of gold? |
Well I looked at @drashna's config here for tap dances organized separately which seems to require introspection as well but I can't figure out what exactly makes it work 😕 Will look at others' or try to come up with something,thanks for your help 🙏 |
That would be the fact that it's Introspection basically requires the ability to calculate the size of each array, so declaring them up-front like @drashna has serves the same purpose. |
I see, looks like I can get it to work 👍 The docs mention the use of enums for tap dances and combos so it's a good start then for key overrides I imagine it may be possible to do the same. The only downside is that it requires to modify 2 files to add one but I can live with that. |
All good, it works with this trick. Thanks a lot for the help! |
Also hitting this, the way i see it we're all power users, after all here we are writing C code, building firmware and flashing onto keyboards. Plus this was working perfectly fine before, my project has 7 different .c files that were
|
Feel free to propose an alternate solution that allows raw and overridable access to the number and content of keymap layers, tapdances, combos, and soon Unicode mappings without requiring all users to predefine things in other files. Sure, so-called “C power users” may have been inconvenienced by this, but they’re also much more equipped to work with and/or around this structure. 99% of QMK users are not power users nor are they familiar with C, and so far this is the easiest solution and matches how users have been told to write their keymaps in the documentation for a very long time — if you’ve got better ideas we’re all ears. |
Describe the Bug
Using latest versions of QMK 0.26.6 I cannot compile my keymap that uses key overrides.
It worked fine with 0.25.22 and stopped working with 0.26.0
It seems to stem from the introspection like it's the case for combos
I tried to play with various settings and compilation options but to no avail. What changed in 0.26.x that could cause this? How can I adapt my config such that it works again?
Keyboard Used
Kyria rev 1.4
Link to product page (if applicable)
No response
Operating System
Arch Linux
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: