Custom keycodes in JSON (#19925)
This commit is contained in:
parent
e35bb8ebfa
commit
79b0f9168e
9 changed files with 129 additions and 13 deletions
|
@ -71,6 +71,38 @@
|
|||
"type": "string",
|
||||
"pattern": "^[0-9a-z][0-9a-z_/]*$"
|
||||
},
|
||||
"keycode": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 50,
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
},
|
||||
"keycode_short": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 7,
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
},
|
||||
"keycode_decl": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {"$ref": "#/keycode"},
|
||||
"label": {"$ref": "#/text_identifier"},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "#/keycode_short"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycode_decl_array": {
|
||||
"type": "array",
|
||||
"minItems": 1
|
||||
"items": {"$ref": "#/keycode_decl"}
|
||||
},
|
||||
"mcu_pin_array": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "#/mcu_pin"}
|
||||
|
|
|
@ -259,6 +259,7 @@
|
|||
"on_state": {"$ref": "qmk.definitions.v1#/bit"}
|
||||
}
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"layout_aliases": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
|
||||
|
|
|
@ -8,11 +8,7 @@
|
|||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 50,
|
||||
"pattern": "^[A-Zs_0-9]*$"
|
||||
},
|
||||
"hex_number_4d": {
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F]{4}$"
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
@ -34,10 +30,10 @@
|
|||
"keycodes": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"$ref": "#/definitions/hex_number_4d"
|
||||
"$ref": "qmk.definitions.v1#/hex_number_4d"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"type": "object", // use 'qmk.definitions.v1#/keycode_decl' when problem keycodes are removed
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"config": {"$ref": "qmk.keyboard.v1"},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue