[Video Conference Mute] Push to Reverse (#24892)

* Add push to talk

* Fix multiple callback WM_KEYDOWN while holding shortcut

* Code review suggestions

* Rename feature

* Revert "Rename feature"

This reverts commit 82d64bf57c.

* Add switch and settings

* Change type of bool property. Handle settings.

* Description

* Update src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.cpp

Always consume hotkey press

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>

---------

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
This commit is contained in:
pajawojciech
2023-03-30 10:55:09 +02:00
committed by GitHub
parent 158876059e
commit 9876695cdb
8 changed files with 130 additions and 1 deletions

View File

@@ -96,6 +96,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
_cameraAndMicrophoneMuteHotkey = Settings.Properties.MuteCameraAndMicrophoneHotkey.Value;
_microphoneMuteHotkey = Settings.Properties.MuteMicrophoneHotkey.Value;
_microphonePushToTalkHotkey = Settings.Properties.PushToTalkMicrophoneHotkey.Value;
_pushToReverseEnabled = Settings.Properties.PushToReverseEnabled.Value;
_cameraMuteHotkey = Settings.Properties.MuteCameraHotkey.Value;
CameraImageOverlayPath = Settings.Properties.CameraOverlayImagePath.Value;
SelectOverlayImage = new ButtonClickCommand(SelectOverlayImageAction);
@@ -176,7 +178,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private int _toolbarHideIndex;
private HotkeySettings _cameraAndMicrophoneMuteHotkey;
private HotkeySettings _microphoneMuteHotkey;
private HotkeySettings _microphonePushToTalkHotkey;
private HotkeySettings _cameraMuteHotkey;
private bool _pushToReverseEnabled;
private int _selectedCameraIndex = -1;
private int _selectedMicrophoneIndex;
@@ -340,6 +344,42 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
public HotkeySettings MicrophonePushToTalkHotkey
{
get
{
return _microphonePushToTalkHotkey;
}
set
{
if (value != _microphonePushToTalkHotkey)
{
_microphonePushToTalkHotkey = value;
Settings.Properties.PushToTalkMicrophoneHotkey.Value = value;
RaisePropertyChanged(nameof(MicrophonePushToTalkHotkey));
}
}
}
public bool PushToReverseEnabled
{
get
{
return _pushToReverseEnabled;
}
set
{
if (value != _pushToReverseEnabled)
{
_pushToReverseEnabled = value;
Settings.Properties.PushToReverseEnabled.Value = value;
RaisePropertyChanged(nameof(PushToReverseEnabled));
}
}
}
public HotkeySettings CameraMuteHotkey
{
get