Keyboard shortcut to restart tour

This commit is contained in:
Joel Collins 2020-04-06 13:07:18 +01:00
parent 72c30f7186
commit 1d5e97bce7

View file

@ -29,7 +29,8 @@ const keyCodes = {
down: 40, down: 40,
enter: 13, enter: 13,
esc: 27, esc: 27,
shift: 16 shift: 16,
t: 84
}; };
// Export main app // Export main app
@ -230,6 +231,7 @@ export default {
) { ) {
this.navigateKeyHandler(keyCodes); this.navigateKeyHandler(keyCodes);
this.captureKeyHandler(keyCodes); this.captureKeyHandler(keyCodes);
this.letterKeyHandler(keyCodes);
} }
}, },
@ -283,6 +285,12 @@ export default {
console.log("Capturing"); console.log("Capturing");
this.$root.$emit("globalCaptureEvent"); this.$root.$emit("globalCaptureEvent");
} }
},
letterKeyHandler: function(keyCodes) {
if (keyCodes.shift in this.keysDown && keyCodes.t in this.keysDown) {
this.$tours["guidedTour"].start();
}
} }
} }
}; };