移除对 Mousetrap 的依赖,改为使用自定义的 KeyboardManager 进行快捷键绑定和管理,同时更新相关类型定义,调整菜单项的快捷键配置逻辑。

This commit is contained in:
2024-12-12 23:35:39 +08:00
parent 90ccd8d6d0
commit 8f1964c374
5 changed files with 131 additions and 54 deletions

16
pnpm-lock.yaml generated
View File

@@ -8,9 +8,6 @@ importers:
.:
dependencies:
mousetrap:
specifier: ^1.6.5
version: 1.6.5
vue:
specifier: ^3.5.13
version: 3.5.13(typescript@5.7.2)
@@ -18,9 +15,6 @@ importers:
specifier: ^4.5.0
version: 4.5.0(vue@3.5.13(typescript@5.7.2))
devDependencies:
'@types/mousetrap':
specifier: ^1.6.15
version: 1.6.15
'@types/node':
specifier: ^22.10.1
version: 22.10.1
@@ -304,9 +298,6 @@ packages:
'@types/estree@1.0.6':
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
'@types/mousetrap@1.6.15':
resolution: {integrity: sha512-qL0hyIMNPow317QWW/63RvL1x5MVMV+Ru3NaY9f/CuEpCqrmb7WeuK2071ZY5hczOnm38qExWM2i2WtkXLSqFw==}
'@types/node@22.10.1':
resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==}
@@ -385,9 +376,6 @@ packages:
magic-string@0.30.15:
resolution: {integrity: sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw==}
mousetrap@1.6.5:
resolution: {integrity: sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==}
nanoid@3.3.8:
resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -766,8 +754,6 @@ snapshots:
'@types/estree@1.0.6': {}
'@types/mousetrap@1.6.15': {}
'@types/node@22.10.1':
dependencies:
undici-types: 6.20.0
@@ -881,8 +867,6 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
mousetrap@1.6.5: {}
nanoid@3.3.8: {}
picocolors@1.1.1: {}