Skip to content

Commit 7ca5f45

Browse files
author
Antoine Aflalo
committed
Add cycling for Recording HotKeys. See #19
1 parent c50bf63 commit 7ca5f45

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

SoundSwitch/Model/AppModel.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,22 @@ private void HandleHotkeyPress(object sender, WindowsAPIAdapter.KeyPressedEventA
302302
{
303303
using (AppLogger.Log.DebugCall())
304304
{
305-
if (e.HotKeys != AppConfigs.Configuration.PlaybackHotKeys)
305+
if (e.HotKeys != AppConfigs.Configuration.PlaybackHotKeys && e.HotKeys != AppConfigs.Configuration.RecordingHotKeys)
306306
{
307307
AppLogger.Log.Debug("Not the registered Hotkeys", e.HotKeys);
308308
return;
309309
}
310310

311311
try
312312
{
313-
CycleActiveDevice();
313+
if (e.HotKeys == AppConfigs.Configuration.PlaybackHotKeys)
314+
{
315+
CycleActiveDevice(AudioDeviceType.Playback);
316+
}
317+
else if (e.HotKeys == AppConfigs.Configuration.RecordingHotKeys)
318+
{
319+
CycleActiveDevice(AudioDeviceType.Recording);
320+
}
314321
}
315322
catch (Exception ex)
316323
{

0 commit comments

Comments
 (0)