feat(nc-gui): prevent shift / cntOrCtrl key is pressing for altKey cases

This commit is contained in:
Wing-Kam Wong
2022-11-28 18:58:13 +08:00
parent 2af5e7d224
commit 04687e02ae
5 changed files with 13 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useRoute, useUIPermission } from '#imports'
import { isMac, useRoute, useUIPermission } from '#imports'
const route = useRoute()
@@ -17,7 +17,8 @@ const isShareBaseAllowed = computed(
)
useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
if (e.altKey) {
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
if (e.altKey && !e.shiftKey && !cmdOrCtrl) {
switch (e.keyCode) {
case 73: {
// ALT + I