keycodes.jsonschema 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema#",
  3. "$id": "qmk.keycodes.v1",
  4. "title": "Keycode Information",
  5. "type": "object",
  6. "definitions": {
  7. "define": {
  8. "type": "string",
  9. "minLength": 2,
  10. "maxLength": 50,
  11. "pattern": "^[A-Zs_0-9]*$"
  12. },
  13. "hex_number_4d": {
  14. "type": "string",
  15. "pattern": "^0x[0-9A-F]{4}$"
  16. }
  17. },
  18. "properties": {
  19. "ranges": {
  20. "type": "object",
  21. "propertyNames": {
  22. "type": "string"
  23. },
  24. "additionalProperties": {
  25. "type": "object",
  26. "required": [
  27. "define"
  28. ],
  29. "properties": {
  30. "define": {"$ref": "#/definitions/define"}
  31. }
  32. }
  33. },
  34. "keycodes": {
  35. "type": "object",
  36. "propertyNames": {
  37. "$ref": "#/definitions/hex_number_4d"
  38. },
  39. "additionalProperties": {
  40. "type": "object",
  41. "required": [
  42. "key"
  43. ],
  44. "properties": {
  45. "key": {"$ref": "#/definitions/define"},
  46. "aliases": {
  47. "type": "array",
  48. "minItems": 1,
  49. "items": {
  50. "type": "string"
  51. }
  52. }
  53. }
  54. }
  55. }
  56. }
  57. }