Add touch info to keyboard shortcuts screen

This commit is contained in:
Quincy Morgan
2020-07-13 12:21:08 -04:00
parent 31740f1ebb
commit 27faeae96a
2 changed files with 9 additions and 3 deletions

View File

@@ -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"
},
{

View File

@@ -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')