From 27faeae96a74a286008a22e3ef32cb53d8b257c6 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Mon, 13 Jul 2020 12:21:08 -0400 Subject: [PATCH] Add touch info to keyboard shortcuts screen --- data/shortcuts.json | 6 +++--- modules/ui/shortcuts.js | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/data/shortcuts.json b/data/shortcuts.json index 7620679d9..c235a1e18 100644 --- a/data/shortcuts.json +++ b/data/shortcuts.json @@ -107,7 +107,7 @@ "text": "shortcuts.browsing.selecting.title" }, { - "shortcuts": ["Left-click", "shortcuts.key.space"], + "shortcuts": ["Left-click", "Tap", "shortcuts.key.space"], "text": "shortcuts.browsing.selecting.select_one" }, { @@ -131,7 +131,7 @@ "text": "shortcuts.browsing.with_selected.title" }, { - "shortcuts": ["Right-click", "☰"], + "shortcuts": ["Right-click", "Long-press", "☰"], "text": "shortcuts.browsing.with_selected.edit_menu" }, { @@ -193,7 +193,7 @@ "text": "shortcuts.editing.drawing.add_note" }, { - "shortcuts": ["Left-click", "shortcuts.key.space"], + "shortcuts": ["Left-click", "Tap", "shortcuts.key.space"], "text": "shortcuts.editing.drawing.place_point" }, { diff --git a/modules/ui/shortcuts.js b/modules/ui/shortcuts.js index 60ed04496..461268280 100644 --- a/modules/ui/shortcuts.js +++ b/modules/ui/shortcuts.js @@ -199,6 +199,12 @@ export function uiShortcuts(context) { if (click && click[1]) { // replace "left_click", "right_click" with mouse icon selection .call(svgIcon('#iD-walkthrough-mouse-' + click[1], 'operation')); + } else if (d.shortcut.toLowerCase() === 'long-press') { + selection + .call(svgIcon('#iD-walkthrough-longpress', 'longpress operation')); + } else if (d.shortcut.toLowerCase() === 'tap') { + selection + .call(svgIcon('#iD-walkthrough-tap', 'tap operation')); } else { selection .append('kbd')