diff --git a/src/common/defaultHotKey.js b/src/common/defaultHotKey.js index aa4f8f1b..ae220153 100644 --- a/src/common/defaultHotKey.js +++ b/src/common/defaultHotKey.js @@ -9,12 +9,12 @@ module.exports = { name: hotKeyPlayer.toggle_play.name, action: hotKeyPlayer.toggle_play.action, }, - 'mod+left': { + 'mod+arrowleft': { type: hotKeyPlayer.prev.type, name: hotKeyPlayer.prev.name, action: hotKeyPlayer.prev.action, }, - 'mod+right': { + 'mod+arrowright': { type: hotKeyPlayer.next.type, name: hotKeyPlayer.next.name, action: hotKeyPlayer.next.action, @@ -69,22 +69,22 @@ module.exports = { name: hotKeyPlayer.toggle_play.name, action: hotKeyPlayer.toggle_play.action, }, - 'mod+alt+left': { + 'mod+alt+arrowleft': { type: hotKeyPlayer.prev.type, name: hotKeyPlayer.prev.name, action: hotKeyPlayer.prev.action, }, - 'mod+alt+right': { + 'mod+alt+arrowright': { type: hotKeyPlayer.next.type, name: hotKeyPlayer.next.name, action: hotKeyPlayer.next.action, }, - 'mod+alt+up': { + 'mod+alt+arrowup': { type: hotKeyPlayer.volume_up.type, name: hotKeyPlayer.volume_up.name, action: hotKeyPlayer.volume_up.action, }, - 'mod+alt+down': { + 'mod+alt+arrowdown': { type: hotKeyPlayer.volume_down.type, name: hotKeyPlayer.volume_down.name, action: hotKeyPlayer.volume_down.action, diff --git a/src/main/modules/hotKey/utils.js b/src/main/modules/hotKey/utils.js index 6c981c1a..74a24f4f 100644 --- a/src/main/modules/hotKey/utils.js +++ b/src/main/modules/hotKey/utils.js @@ -56,6 +56,10 @@ exports.init = (isForce = false) => { global.appHotKey.state = {} // console.log(global.appHotKey.config.global.keys) for (const key of Object.keys(global.appHotKey.config.global.keys)) { - handleRegisterHotkey({ key, info: global.appHotKey.config.global.keys[key] }) + try { + handleRegisterHotkey({ key, info: global.appHotKey.config.global.keys[key] }) + } catch (err) { + log.info(err) + } } }