diff --git a/src/negative_test/crucible-code-schema/not-a-send.json b/src/negative_test/crucible-code-schema/not-a-send.json new file mode 100644 index 00000000000..9be1ede4cb3 --- /dev/null +++ b/src/negative_test/crucible-code-schema/not-a-send.json @@ -0,0 +1,3 @@ +{ + "input": { "send": "shiftEnter" } +} diff --git a/src/schemas/json/crucible-code-schema.json b/src/schemas/json/crucible-code-schema.json index 63826340646..6b698f3282f 100644 --- a/src/schemas/json/crucible-code-schema.json +++ b/src/schemas/json/crucible-code-schema.json @@ -66,6 +66,24 @@ }, "type": "object" }, + "input": { + "additionalProperties": false, + "description": "What the keyboard does", + "properties": { + "$schema": { + "type": "string" + }, + "$comment": { + "type": "string" + }, + "send": { + "description": "Which press sends a prompt: enter sends and Shift+Enter, Alt+Enter or Ctrl+J opens a line; altEnter swaps the two, for a terminal that keeps Enter for itself", + "enum": ["enter", "altEnter"], + "type": "string" + } + }, + "type": "object" + }, "output": { "additionalProperties": false, "description": "What the terminal shows", diff --git a/src/test/crucible-code-schema/config.json b/src/test/crucible-code-schema/config.json index e1c19609b1b..5ba98e91e34 100644 --- a/src/test/crucible-code-schema/config.json +++ b/src/test/crucible-code-schema/config.json @@ -12,6 +12,9 @@ "CRUCIBLE_CODE_MOUSE_SCROLL_SPEED": "12", "RUST_LOG": "warn" }, + "input": { + "send": "altEnter" + }, "output": { "color": "auto", "glyphs": "unicode",