{
	"name": "form/nc/nc-define/nc-layout-editor/keyboard-rule.json",
	"info": "modifier keys are javascript event modifiers plus extra cmdOrCtrlKey, which is metaKey on Mac and ctrlKey on other operating systems",
	"draw_area": {
		"info": "Keyboard rules for movement and actions inside the drawing area",
		"alias": { "KeyW": "ArrowUp", "KeyS": "ArrowDown", "KeyA": "ArrowLeft", "KeyD": "ArrowRight" },
		"default": {
			"Delete": [{ "action": "delete" }],
			"Enter": [{ "action": "toggle" }],
			"KeyF": [{ "action": "file" }],
			"KeyE": [{ "action": "element" }],
			"KeyP": [{ "action": "property" }],
			"KeyT": [{ "action": "template" }],
			"KeyR": [{ "action": "reuse_element" }],
			"KeyX": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "cut", "style": "cut" }],
			"KeyC": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "copy", "style": "copy" }],
			"KeyV": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "paste" }],
			"KeyD": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "duplicate" }],
			"Digit0": [{ "action": "column-width", "parameter": "auto" }],
			"Digit1": [{ "action": "column-width", "parameter": "1" }],
			"Digit2": [{ "action": "column-width", "parameter": "2" }],
			"Digit3": [{ "action": "column-width", "parameter": "3" }],
			"Digit4": [{ "action": "column-width", "parameter": "4" }],
			"Digit5": [{ "action": "column-width", "parameter": "5" }],
			"Digit6": [{ "action": "column-width", "parameter": "6" }],
			"Digit7": [{ "action": "column-width", "parameter": "7" }],
			"Digit8": [{ "action": "column-width", "parameter": "8" }],
			"Digit9": [{ "action": "column-width", "parameter": "9" }],
			"Numpad0": [{ "action": "column-width", "parameter": "auto" }],
			"Numpad1": [{ "action": "column-width", "parameter": "1" }],
			"Numpad2": [{ "action": "column-width", "parameter": "2" }],
			"Numpad3": [{ "action": "column-width", "parameter": "3" }],
			"Numpad4": [{ "action": "column-width", "parameter": "4" }],
			"Numpad5": [{ "action": "column-width", "parameter": "5" }],
			"Numpad6": [{ "action": "column-width", "parameter": "6" }],
			"Numpad7": [{ "action": "column-width", "parameter": "7" }],
			"Numpad8": [{ "action": "column-width", "parameter": "8" }],
			"Numpad9": [{ "action": "column-width", "parameter": "9" }],
			"ArrowUp": [
				{ "modifier": { "cmdOrCtrlKey": true, "altKey": true }, "action": "swap-col-row-previous" },
				{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-parent-row-previous" },
				{ "modifier": { "altKey": true }, "action": "select-parent" },
				{ "action": "select-parent-row-previous" }
			],
			"ArrowDown": [
				{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-parent-row-next" },
				{ "modifier": { "altKey": true }, "action": "select-child" },
				{ "action": "select-parent-row-next" }
			],
			"ArrowLeft": [
				{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-sibling-previous" },
				{ "modifier": { "altKey": true }, "action": "select-previous-or-parent" },
				{ "action": "select-sibling-previous" }
			],
			"ArrowRight": [
				{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-sibling-next" },
				{ "modifier": { "altKey": true }, "action": "select-next-or-child" },
				{ "action": "select-sibling-next" }
			],
			"Tab": [{ "modifier": { "shiftKey": true }, "action": "select-previous-or-parent" }, { "action": "select-next-or-child" }],
			"Home": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-sibling-first" }, { "action": "select-sibling-first" }],
			"End": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-sibling-last" }, { "action": "select-sibling-last" }],
			"Plus": [{ "action": "add-element" }]
		},
		"nc-row": {
			"ArrowLeft": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-parent-row-previous" }, { "action": "select-last-child" }],
			"ArrowRight": [{ "modifier": { "cmdOrCtrlKey": true }, "action": "swap-parent-row-next" }, { "action": "select-child" }]
		},
		"nc-form": {
			"ArrowUp": [{ "modifier": { "altKey": true }, "action": "select-child" }, { "action": "select-last-child" }],
			"ArrowDown": [{ "modifier": { "altKey": true }, "action": "select-child" }, { "action": "select-first-child" }],
			"ArrowLeft": [{ "action": "select-last-child" }],
			"ArrowRight": [{ "action": "select-child" }]
		}
	},
	"global": {
		"info": "Global keyboard rules, moving between element, properties and draw_area sections",
		"default": {
			"KeyE": [{ "modifier": { "altKey": true }, "action": "elements-active" }],
			"KeyD": [{ "modifier": { "altKey": true }, "action": "drawing-active" }],
			"KeyP": [{ "modifier": { "altKey": true }, "action": "properties-active" }],
			"ArrowLeft": [{ "action": "select-left" }, { "modifier": { "cmdOrCtrlKey": true }, "action": "previous-area" }],
			"ArrowRight": [{ "action": "select-right" }, { "modifier": { "cmdOrCtrlKey": true }, "action": "next-area" }]
		}
	},
	"element": {
		"info": "Keyboard rules for movement and actions inside the element toolbar",
		"default": {
			"Enter": [{ "action": "add-after" }, { "modifier": { "ShiftLeft": true }, "action": "add-before" }],
			"Minus": [{ "action": "add-before" }],
			"Plus": [{ "action": "add-after" }],
			"ArrowUp": [{ "action": "select-up" }, { "modifier": { "cmdOrCtrlKey": true }, "action": "add-before" }],
			"ArrowDown": [{ "action": "select-down" }, { "modifier": { "cmdOrCtrlKey": true }, "action": "add-after" }]
		}
	},
	"property": {
		"info": "Keyboard rules for movement and actions inside the properties toolbar",
		"default": {
			"Enter": [{ "action": "select-property" }],
			"ArrowUp": [{ "action": "property-group-previous" }],
			"ArrowDown": [{ "action": "property-group-next" }],
			"ArrowLeft": [{ "action": "property-previous" }],
			"ArrowRight": [{ "action": "property-next" }]
		}
	}
}
