diff --git a/publish/changeLog.md b/publish/changeLog.md index b320a539..d55247ca 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -14,6 +14,10 @@ - 为区分静音状态,静音时音量条会变淡,调整音量条时将会取消静音 - 优化随机播放机制,现在通过`下一曲`切换歌曲时,直到播放完整个列表之前将不会再随机到之前播放过的歌曲,并且通过`上一曲`可以正确播放上一首歌曲 +### 移除 + +- 移除默认的全局声音媒体快捷键接管 + ### 其他 - 个性electron到 9.2.1 diff --git a/src/common/defaultHotKey.js b/src/common/defaultHotKey.js index 3d018533..33419562 100644 --- a/src/common/defaultHotKey.js +++ b/src/common/defaultHotKey.js @@ -44,21 +44,6 @@ module.exports = { name: null, action: hotKeyPlayer.next.action, }, - VolumeUp: { - type: hotKeyPlayer.volume_up.type, - name: null, - action: hotKeyPlayer.volume_up.action, - }, - VolumeDown: { - type: hotKeyPlayer.volume_down.type, - name: null, - action: hotKeyPlayer.volume_down.action, - }, - VolumeMute: { - type: hotKeyPlayer.volume_mute.type, - name: null, - action: hotKeyPlayer.volume_mute.action, - }, 'mod+alt+f5': { type: hotKeyPlayer.toggle_play.type, name: hotKeyPlayer.toggle_play.name, diff --git a/src/common/utils.js b/src/common/utils.js index 5852c147..94cf70b5 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -206,6 +206,15 @@ exports.initHotKey = () => { } let globalConfig = electronStore_hotKey.get('global') + + // 移除v1.0.1及之前设置的全局声音媒体快捷键接管 + if (globalConfig && globalConfig.keys.VolumeUp) { + delete globalConfig.keys.VolumeUp + delete globalConfig.keys.VolumeDown + delete globalConfig.keys.VolumeMute + electronStore_hotKey.set('global', globalConfig) + } + if (!globalConfig) { globalConfig = defaultHotKey.global electronStore_hotKey.set('global', globalConfig)