Работа над хоткеями

This commit is contained in:
Book Pauk
2020-03-18 20:20:06 +07:00
parent 00a8e4c2c5
commit 22e2c34da8
3 changed files with 17 additions and 14 deletions

View File

@@ -58,8 +58,11 @@ class SetPositionPage extends Vue {
}
keyHook(event) {
if (event.type == 'keydown' && (event.code == 'Escape' || event.code == 'KeyP')) {
this.close();
if (event.type == 'keydown') {
const action = this.$root.readerActionByKeyEvent(event);
if (event.code == 'Escape' || action == 'setPosition') {
this.close();
}
}
return true;
}