From 1d5e97bce7ad55c18541dde6a6039e6e0b9487cf Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 6 Apr 2020 13:07:18 +0100 Subject: [PATCH] Keyboard shortcut to restart tour --- src/App.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index bb6f9510..07839c59 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,7 +29,8 @@ const keyCodes = { down: 40, enter: 13, esc: 27, - shift: 16 + shift: 16, + t: 84 }; // Export main app @@ -230,6 +231,7 @@ export default { ) { this.navigateKeyHandler(keyCodes); this.captureKeyHandler(keyCodes); + this.letterKeyHandler(keyCodes); } }, @@ -283,6 +285,12 @@ export default { console.log("Capturing"); this.$root.$emit("globalCaptureEvent"); } + }, + + letterKeyHandler: function(keyCodes) { + if (keyCodes.shift in this.keysDown && keyCodes.t in this.keysDown) { + this.$tours["guidedTour"].start(); + } } } };