From e1668aaaedf8c38bffbaec4554b6e280f299a49d Mon Sep 17 00:00:00 2001 From: Njoyim Peguy Date: Fri, 21 Aug 2026 05:07:49 +0200 Subject: [PATCH] Update crucible-code schema for the input block. (#6230) Co-authored-by: NjoyimPeguy --- .../crucible-code-schema/not-a-send.json | 3 +++ src/schemas/json/crucible-code-schema.json | 18 ++++++++++++++++++ src/test/crucible-code-schema/config.json | 3 +++ 3 files changed, 24 insertions(+) create mode 100644 src/negative_test/crucible-code-schema/not-a-send.json 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",