Mute shortcut

This commit is contained in:
2021-10-04 19:20:41 +02:00
parent 7b2a7bae21
commit 6e4ed82211
6 changed files with 41 additions and 2 deletions

View File

@ -28,6 +28,7 @@ namespace unison
private const uint VK_MEDIA_PLAY_PAUSE = 0xB3;
private const uint VK_VOLUME_UP = 0xAF;
private const uint VK_VOLUME_DOWN = 0xAE;
private const uint VK_VOLUME_MUTE = 0xAD;
private const uint VK_ENTER = 0x0D;
private MainWindow _appWindow;
@ -54,6 +55,7 @@ namespace unison
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_MEDIA_PLAY_PAUSE);
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_UP);
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_DOWN);
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL, VK_VOLUME_MUTE);
RegisterHotKey(_windowHandle, HOTKEY_ID, MOD_CONTROL | MOD_ALT, VK_ENTER);
}
}
@ -79,6 +81,9 @@ namespace unison
case VK_VOLUME_UP:
_mpd.VolumeUp();
break;
case VK_VOLUME_MUTE:
_mpd.VolumeMute();
break;
case VK_MEDIA_PLAY_PAUSE:
_mpd.PlayPause();
break;