mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-31 23:39:39 +08:00
🚧 WIP: finished shortKey page
This commit is contained in:
@@ -11,7 +11,17 @@ const shortKeyHandler = (name) => {
|
||||
}
|
||||
}
|
||||
|
||||
const shortKeyUpdater = (globalShortcut, item) => {
|
||||
/**
|
||||
* 用于更新快捷键绑定
|
||||
* @param {globalShortcut} globalShortcut
|
||||
* @param {keyObject} item
|
||||
* @param {string} oldKey
|
||||
*/
|
||||
const shortKeyUpdater = (globalShortcut, item, oldKey) => {
|
||||
// 如果提供了旧key,则解绑
|
||||
if (oldKey) {
|
||||
globalShortcut.unregister(oldKey)
|
||||
}
|
||||
if (item.enable === false) {
|
||||
globalShortcut.unregister(item.key)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user