added windows shortcut for spotlight

This commit is contained in:
Milos Holba
2022-02-01 14:21:12 +01:00
parent 2ca42f530b
commit 45a46bbc65
5 changed files with 34 additions and 8 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ export default {
},
methods: {
spotlightListener(e) {
if (e.key === 'k' && e.metaKey) {
if (e.key === 'k' && e.metaKey || e.key === 'k' && e.ctrlKey) {
e.preventDefault()
events.$emit('spotlight:show');
}
},
@@ -24,7 +24,7 @@
},
computed: {
metaKeyIcon() {
return this.$isApple() ? '⌘' : ''
return this.$isApple() ? '⌘' : 'Ctrl'
},
},
}
@@ -31,6 +31,7 @@
@keydown.delete="undoFilter"
@keydown.enter="showSelected"
@keydown.meta="showByShortcut"
@keydown.ctrl="showByShortcut"
@keyup.down="onPageDown"
@keyup.up="onPageUp"
type="text"
@@ -480,7 +481,7 @@ export default {
return this.user.data.attributes.role === 'admin'
},
metaKeyIcon() {
return this.$isApple() ? '⌘' : 'alt'
return this.$isApple() ? '⌘' : 'Ctrl'
},
isNotEmptyQuery() {
return this.query !== ''
+2 -1
View File
@@ -109,7 +109,8 @@
},
methods: {
spotlightListener(e) {
if (e.key === 'k' && e.metaKey) {
if (e.key === 'k' && e.metaKey || e.key === 'k' && e.ctrlKey) {
e.preventDefault()
events.$emit('spotlight:show');
}
},