Community modules (#24848)
This commit is contained in:
parent
63b095212b
commit
1efc82403b
37 changed files with 987 additions and 84 deletions
7
data/constants/keycodes/keycodes_0.0.7.hjson
Normal file
7
data/constants/keycodes/keycodes_0.0.7.hjson
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"ranges": {
|
||||
"0x77C0/0x003F": {
|
||||
"define": "QK_COMMUNITY_MODULE"
|
||||
}
|
||||
}
|
||||
}
|
25
data/constants/module_hooks/0.1.0.hjson
Normal file
25
data/constants/module_hooks/0.1.0.hjson
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
keyboard_pre_init: {
|
||||
ret_type: void
|
||||
args: void
|
||||
}
|
||||
keyboard_post_init: {
|
||||
ret_type: void
|
||||
args: void
|
||||
}
|
||||
pre_process_record: {
|
||||
ret_type: bool
|
||||
args: uint16_t keycode, keyrecord_t *record
|
||||
call_params: keycode, record
|
||||
}
|
||||
process_record: {
|
||||
ret_type: bool
|
||||
args: uint16_t keycode, keyrecord_t *record
|
||||
call_params: keycode, record
|
||||
}
|
||||
post_process_record: {
|
||||
ret_type: void
|
||||
args: uint16_t keycode, keyrecord_t *record
|
||||
call_params: keycode, record
|
||||
}
|
||||
}
|
26
data/constants/module_hooks/1.0.0.hjson
Normal file
26
data/constants/module_hooks/1.0.0.hjson
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
housekeeping_task: {
|
||||
ret_type: void
|
||||
args: void
|
||||
}
|
||||
suspend_power_down: {
|
||||
ret_type: void
|
||||
args: void
|
||||
}
|
||||
suspend_wakeup_init: {
|
||||
ret_type: void
|
||||
args: void
|
||||
}
|
||||
shutdown: {
|
||||
ret_type: bool
|
||||
args: bool jump_to_bootloader
|
||||
call_params: jump_to_bootloader
|
||||
}
|
||||
process_detected_host_os: {
|
||||
ret_type: bool
|
||||
args: os_variant_t os
|
||||
call_params: os
|
||||
guard: defined(OS_DETECTION_ENABLE)
|
||||
header: os_detection.h
|
||||
}
|
||||
}
|
17
data/schemas/community_module.jsonschema
Normal file
17
data/schemas/community_module.jsonschema
Normal file
|
@ -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"},
|
||||
}
|
||||
}
|
|
@ -31,6 +31,11 @@
|
|||
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
}
|
||||
}
|
||||
"features_config": {
|
||||
"$ref": "qmk.definitions.v1#/boolean_array",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"not": {"required": ["lto"]}
|
||||
},
|
||||
},
|
||||
"type": "object",
|
||||
"not": {"required": ["vendorId", "productId"]}, // reject via keys...
|
||||
|
@ -328,11 +333,7 @@
|
|||
"enabled": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"$ref": "qmk.definitions.v1#/boolean_array",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"not": {"required": ["lto"]}
|
||||
},
|
||||
"features": { "$ref": "#/definitions/features_config" },
|
||||
"indicators": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -467,6 +468,12 @@
|
|||
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
}
|
||||
},
|
||||
"modules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"mouse_key": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -71,6 +71,12 @@
|
|||
"config": {"$ref": "qmk.keyboard.v1"},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"modules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue