Skip to content

Commit

Permalink
Add cycling for Recording HotKeys. See #19
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Aflalo committed Sep 2, 2015
1 parent c50bf63 commit 7ca5f45
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SoundSwitch/Model/AppModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,22 @@ private void HandleHotkeyPress(object sender, WindowsAPIAdapter.KeyPressedEventA
{
using (AppLogger.Log.DebugCall())
{
if (e.HotKeys != AppConfigs.Configuration.PlaybackHotKeys)
if (e.HotKeys != AppConfigs.Configuration.PlaybackHotKeys && e.HotKeys != AppConfigs.Configuration.RecordingHotKeys)
{
AppLogger.Log.Debug("Not the registered Hotkeys", e.HotKeys);
return;
}

try
{
CycleActiveDevice();
if (e.HotKeys == AppConfigs.Configuration.PlaybackHotKeys)
{
CycleActiveDevice(AudioDeviceType.Playback);
}
else if (e.HotKeys == AppConfigs.Configuration.RecordingHotKeys)
{
CycleActiveDevice(AudioDeviceType.Recording);
}
}
catch (Exception ex)
{
Expand Down

0 comments on commit 7ca5f45

Please sign in to comment.