diff --git a/common/schemas/keyboard_info/README.md b/common/schemas/keyboard_info/README.md index 83425ab232..3222a465a8 100644 --- a/common/schemas/keyboard_info/README.md +++ b/common/schemas/keyboard_info/README.md @@ -5,7 +5,11 @@ Documentation at https://help.keyman.com/developer/cloud/keyboard_info -New versions should be deployed to **keymanapp/keyman/common/schemas/keyboard_info** and **keymanapp/keyboards/tools** +* Primary version: + * https://github.com/keymanapp/api.keyman.com/tree/master/schemas/keyboard_info.source + * https://github.com/keymanapp/api.keyman.com/tree/master/schemas/keyboard_info.distribution +* Synchronized copies at: + * https://github.com/keymanapp/keyman/tree/master/common/schemas/keyboard_info # .keyboard_info version history diff --git a/common/schemas/keyman-touch-layout/README.md b/common/schemas/keyman-touch-layout/README.md new file mode 100644 index 0000000000..0cc4087c8b --- /dev/null +++ b/common/schemas/keyman-touch-layout/README.md @@ -0,0 +1,19 @@ +# keyman-touch-layout + +Documentation at https://help.keyman.com/developer/...TODO... + +* Primary version: + * https://github.com/keymanapp/keyman/tree/master/common/schemas/keyman-touch-layout +* Deployed to: + * N/A + +# .keyman-touch-layout version history + +## 2022-06-27 1.0 stable +* Initial schema version + +## 2018-05-28 0.2 .keyman-touch-layout format +* Changed file extension to .keyman-touch-layout in https://github.com/keymanapp/keyman/pull/897 + +## 0.1 -layout.js format +* Initial version diff --git a/common/schemas/keyman-touch-layout/keyman-touch-layout.spec.json b/common/schemas/keyman-touch-layout/keyman-touch-layout.spec.json new file mode 100644 index 0000000000..6cb928e75f --- /dev/null +++ b/common/schemas/keyman-touch-layout/keyman-touch-layout.spec.json @@ -0,0 +1,120 @@ +{ + "$schema": "http://json-schema.org/schema#", + "$ref": "#/definitions/touch-layout", + + "definitions": { + "touch-layout": { + "type": "object", + "properties": { + "tablet": { "$ref": "#/definitions/platform" }, + "phone": { "$ref": "#/definitions/platform" }, + "desktop": { "$ref": "#/definitions/platform" } + } + }, + + "platform": { + "type": "object", + "properties": { + "font": { "$ref": "#/definitions/font-spec" }, + "fontsize": { "$ref": "#/definitions/fontsize-spec" }, + "layer": { "$ref": "#/definitions/layers" }, + "displayUnderlying": { "type": "boolean" } + }, + "required": ["layer"], + "additionalProperties": false + }, + + "layers": { + "type": "array", + "items": { "$ref": "#/definitions/layer" } + }, + + "layer": { + "type": "object", + "properties": { + "id": { "$ref": "#/definitions/layer-id" }, + "row": { "$ref": "#/definitions/rows" } + }, + "required": ["id", "row"], + "additionalProperties": false + }, + + "layer-id": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + + "rows": { + "type": "array", + "items": { "$ref": "#/definitions/row" } + }, + + "row": { + "type": "object", + "properties": { + "id": { "$ref": "#/definitions/row-id" }, + "key": { "$ref": "#/definitions/keys" } + }, + "required": ["id", "key"], + "additionalProperties": false + }, + + "row-id": { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + + "keys": { + "type": "array", + "items": { "$ref": "#/definitions/key" } + }, + + "key": { + "type": "object", + "properties": { + "id": { "$ref": "#/definitions/key-id" }, + "text": { "type": "string" }, + "layer": { "$ref": "#/definitions/layer-id" }, + "nextlayer": { "$ref": "#/definitions/layer-id" }, + "sp": { "type": "string", "pattern": "^[0-9]+$" }, + "pad": { "type": "string" }, + "width": { "type": "string" }, + "sk": { "$ref": "#/definitions/subkeys" } + }, + "required": ["id"], + "additionalProperties": false + }, + + "key-id": { + "type": "string", + "pattern": "^[TKUtku]_[a-zA-Z0-9_]+$" + }, + + "subkeys": { + "type": "array", + "items": { "$ref": "#/definitions/subkey" } + }, + + "subkey": { + "type": "object", + "properties": { + "id": { "$ref": "#/definitions/key-id" }, + "text": { "type": "string" }, + "layer": { "$ref": "#/definitions/layer-id" }, + "nextlayer": { "$ref": "#/definitions/layer-id" }, + "sp": { "type": "string", "pattern": "^[0-9]+$" } + }, + "required": ["id"], + "additionalProperties": false + }, + + "font-spec": { + "type": "string" + }, + + "fontsize-spec": { + "type": "string" + } + } +}