-
-
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
Community modules #24848
Open
tzarc
wants to merge
16
commits into
develop
Choose a base branch
from
community-modules
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+615
−83
Open
Community modules #24848
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e3fe9fa
First stab at codegen.
tzarc 11b9ff0
Appease the gods of formatting.
tzarc 8f79ed1
More APIs added, versioning.
tzarc 5a70aec
Suspend callbacks.
tzarc fe3eac2
Preprocessor guards, OS detection hooks.
tzarc d4733cc
user/kb module hooks.
tzarc c9ee24b
keyboard and keymap modules
tzarc 5467374
nitpicks
tzarc 1354424
First stab at keycodes.
tzarc 1c4c6ae
Appease the gods of formatting.
tzarc c6454b5
Add support for `features` object.
tzarc fa53413
Ensure modules are subject to formatting rules.
tzarc d3300da
Automatic addition of `community_module` label.
tzarc 8b47562
Userspace modules.
tzarc 37e3ee0
Add onekey.
tzarc d7e374b
Allow for modules in subdirectories.
tzarc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ranges": { | ||
"0x77C0/0x003F": { | ||
"define": "QK_COMMUNITY_MODULE" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema#", | ||
"$id": "qmk.community_module.v1", | ||
"title": "Community Module Information", | ||
"type": "object", | ||
"required": ["module_name", "maintainer"] | ||
"properties": { | ||
"module_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, | ||
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"}, | ||
"url": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"}, | ||
"features": {"$ref": "qmk.keyboard.v1#/definitions/features_config"}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright 2025 Nick Brassel (@tzarc) | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#include QMK_KEYBOARD_H | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
LAYOUT_ortho_1x1(CM_HELLO) | ||
}; |
3 changes: 3 additions & 0 deletions
3
keyboards/handwired/onekey/keymaps/community_module/keymap.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"modules": ["hello_world"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 see range
QK_COMMUNITY_MODULE
toQK_COMMUNITY_MODULE_MAX
is reserved for modules, which is helpful. If multiple modules are used at once, and each needs a few keycodes, is there a way that each module could get part of this range without overlapping with other modules? It would be great if modules could each allocate keycodes in a standardized way, essentially, an automatic way to enumerate the range like: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.
All module keycodes are assigned automatically, with keyboard module keycodes preceding keymap module keycodes, in the module order specified in the keyboard or keymap json.
Basically does exactly what you specified but with stable ordering. The define is mainly just to allocate a range, rather than using the keycode directly.