-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Community modules #24848
Community modules #24848
Conversation
Very cool! I'm excited to see #if !defined(IS_QK_MOD_TAP)
// Attempt to detect out-of-date QMK installation, which would fail with
// implicit-function-declaration errors in the code below.
#error "achordion: QMK version is too old to build. Please update QMK."
#else
// Achordion implementation...
|
8e3cec0
to
e86d8d2
Compare
138b726
to
4758f6c
Compare
519bd5a
to
244a9cf
Compare
Made a simple conversion of @getreuer's https://github.com/tzarc/qmk_modules/tree/main/socd_cleaner |
61b8e6f
to
ed36462
Compare
This is a super cool development, and it's looking good! A suggestion I'd like to make would be to have a community module be able to define their own part of the switch matrix, as a way to support hardware modules. We added support for our splitkb.com Halcyon modules (which currently are a display, rotary encoder and cirque trackpad) through a QMK userspace, but I feel like the implementation of modules in this pull request could be far cleaner and easier to adapt and adopt for users. A challenge we faced is that hardware modules (such as the encoder) can introduce additional inputs to the keyboard matrix, while the keyboard has no dedicated spots in its matrix for them. I think it would be nice if a module could introduce its own part of the matrix, so that keys can be mapped to it in software like VIA or Vial. VIA or Vial would be able to display an additional tab called "Modules" for example, in which each module could expose its matrix for easy remapping. It's a long shot for sure! I hope this idea might provide inspiration for future development if it comes to that. Thank you very much! |
There's definitely future improvements to be made, including stuff like dealing with data storage and persistence. |
Description
Add support for community modules. Community modules are intended to be an area which provides common functionality to be easily imported into a keymap.
Additionally, community modules support placement inside userspace; module developers can thus create modules in separate repositories, and users can subsequently add them as userspace-local submodules to make them available for use in user keymaps.
keyboard.json
,info.json
, andkeymap.json
now accept a top-level array of strings called"modules"
_modules
=>_kb
=>_user
._modules
, in the module order provided.hello_world
module has the following overridable functions defined:process_record_hello_world_user
-- a no-op but allows user keymaps to hook the moduleprocess_record_hello_world_kb
-- invokes_user
by default, follows the same callback ordering as the rest of QMKprocess_record_hello_world
-- the actual module implementation ofprocess_record_xxxx
, executed beforeprocess_record_kb
orprocess_record_user
.introspection.c
file present in the module's directory will automatically be injected into thekeymap.c
during compilation, using the same mechanism as the rest of core'skeymap_introspection.c
. Same forintrospection.h
.A couple of community modules I've used for testing can be found here.
Types of Changes
Checklist