From 4ed2858cc53415aa388fed716b1835a130639fa6 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 7 Jan 2019 11:39:12 -0500 Subject: [PATCH] Explicitly include '?' as a fallback key for keyboard shortcuts (closes #5675) This allows for a localized version of the key, but iD will still respond to the '?' --- data/shortcuts.json | 2 +- modules/ui/shortcuts.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/shortcuts.json b/data/shortcuts.json index 5097a8965..7f6bbe700 100644 --- a/data/shortcuts.json +++ b/data/shortcuts.json @@ -41,7 +41,7 @@ "text": "shortcuts.browsing.help.help" }, { - "shortcuts": ["shortcuts.toggle.key"], + "shortcuts": ["shortcuts.toggle.key", "?"], "text": "shortcuts.browsing.help.keyboard" }, { diff --git a/modules/ui/shortcuts.js b/modules/ui/shortcuts.js index e9d95cb87..252375c4b 100644 --- a/modules/ui/shortcuts.js +++ b/modules/ui/shortcuts.js @@ -21,7 +21,7 @@ export function uiShortcuts(context) { context.keybinding() - .on(t('shortcuts.toggle.key'), function () { + .on([t('shortcuts.toggle.key'), '?'], function () { if (d3_selectAll('.modal-shortcuts').size()) { // already showing if (_modalSelection) { _modalSelection.close();