From 63da6e77d85cc3033143a54449318fc92b551cbe Mon Sep 17 00:00:00 2001 From: EwdErna Date: Wed, 23 Sep 2026 14:51:21 +0900 Subject: [PATCH] =?UTF-8?q?map:=20=E3=82=AD=E3=83=BC=E3=83=9E=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=82=92=E4=B8=A6?= =?UTF-8?q?=E3=81=B3=E9=A0=86=E3=81=A8=E7=8B=AC=E7=AB=8B=E3=81=97=E3=81=9F?= =?UTF-8?q?=E5=90=8D=E5=89=8D=E3=81=A7=E8=AD=98=E5=88=A5=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit レイヤーを切り替える動作も名前で参照し、番号へは出力時に並び順から 変換する。並べ替えや挿入で参照先がずれないようにするため。 スキーマのlayerからidを外し、MAP内で一意なnameを識別子とする。 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CBmwYrXocgCoFJfxVcKSGH --- MAPレイヤー.md | 6 ++++++ phase1-json-schema.md | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/MAPレイヤー.md b/MAPレイヤー.md index 0cf689a..f4f4638 100644 --- a/MAPレイヤー.md +++ b/MAPレイヤー.md @@ -19,6 +19,12 @@ MAPのキー参照にはPHYのキーIDを使い、実機との通信に使うア レイヤー別のキーコード割り当てを出発点とする。 動作定義と保存形式の拡張範囲は、[P-1](#p-1-割り当てる動作と保存形式の範囲)で扱う。 +## キーマップレイヤーの識別 + +キーマップレイヤーは、並び順と独立した名前で識別する。名前はMAP内で一意とする。 +レイヤーを切り替える動作も名前でレイヤーを参照し、番号へは出力時に並び順から変換する。 +レイヤーの並べ替えや挿入で参照先がずれないようにするため。IDXがキー番号を正本にしないのと同じ理由による。 + ## MAPエディタの責務 - PHYの配置を参照し、キーマップレイヤーごとの割り当てを編集・保存する。 diff --git a/phase1-json-schema.md b/phase1-json-schema.md index 971417a..2318505 100644 --- a/phase1-json-schema.md +++ b/phase1-json-schema.md @@ -646,10 +646,12 @@ ELC・IDX・MAPはどれもPHYを参照する。ELCはIDXを参照せず、MAP "$defs": { "layer": { "type": "object", - "required": ["id", "name", "keymap"], + "required": ["name", "keymap"], "properties": { - "id": { "type": "integer", "minimum": 0 }, - "name": { "type": "string" }, + "name": { + "type": "string", + "description": "Layer identifier, unique within the MAP. Layer order is the array order" + }, "keymap": { "type": "array", "items": {