From 6463d717cf6b37cf9801f37302e4b54e55b43fc5 Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 12 Jan 2016 13:26:12 +0100 Subject: [PATCH] Fixed interfering shortcut keys: changed quick keys to select multiple fields from `Shift+Arrow Up/Down` to `Ctrl+Shift+Arrow Up/Down`. --- HISTORY.md | 7 ++++--- docs/shortcut_keys.md | 2 +- src/js/Node.js | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 392b72e..44e36f1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,11 +5,12 @@ https://github.com/josdejong/jsoneditor ## not yet released, version 5.1.0 -- Implemented support for JSON schema validation, powered by `ajv`. - A JSON schema can be configured via the option `schema` or the method - `setSchema`. +- Implemented support for JSON schema validation, powered by `ajv`. A JSON + schema can be configured via the option `schema` or the method `setSchema`. - Added a minimalist bundle to the `dist` folder, excluding `ace` and `ajv`. - Fixed an error throw when switching to mode "code" via the menu. +- Fixed interfering shortcut keys: changed quick keys to select multiple fields + from `Shift+Arrow Up/Down` to `Ctrl+Shift+Arrow Up/Down`. ## 2015-12-31, version 5.0.1 diff --git a/docs/shortcut_keys.md b/docs/shortcut_keys.md index 197de65..2c51543 100644 --- a/docs/shortcut_keys.md +++ b/docs/shortcut_keys.md @@ -5,7 +5,7 @@ Key | Description ----------------------- | ------------------------------------------------ Alt+Arrows | Move the caret up/down/left/right between fields -Shift+Arrow Up/Down | Select multiple fields +Ctrl+Shift+Arrow Up/Down| Select multiple fields Shift+Alt+Arrows | Move current field or selected fields up/down/left/right Ctrl+D | Duplicate field Ctrl+Del | Remove field diff --git a/src/js/Node.js b/src/js/Node.js index 9d4035f..41f4421 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -2263,7 +2263,7 @@ Node.prototype.onKeyDown = function (event) { } handled = true; } - else if (!altKey && shiftKey && editable) { // Shift + Arrow Up + else if (!altKey && ctrlKey && shiftKey && editable) { // Ctrl + Shift + Arrow Up // select multiple nodes prevNode = this._previousNode(); if (prevNode) { @@ -2346,7 +2346,7 @@ Node.prototype.onKeyDown = function (event) { } handled = true; } - else if (!altKey && shiftKey && editable) { // Shift + Arrow Down + else if (!altKey && ctrlKey && shiftKey && editable) { // Ctrl + Shift + Arrow Down // select multiple nodes nextNode = this._nextNode(); if (nextNode) {