Repository: microsoft/PowerToys
File: src/modules/videoconference/VideoConferenceModule/VideoConferenceModule.cpp (C++)

Code before:
                    {
                        reverseMicrophoneMute();
                        reverseVirtualCameraMuteState();
                    }
                    else if (cameraIsMuted)
                    {
                        reverseMicrophoneMute();
                    }
                    else if (microphoneIsMuted)
                    {
                        reverseVirtualCameraMuteState();
                    }
                }
                else
                {
                    // if the camera is not in use, we just mute/unmute the mic
                    reverseMicrophoneMute();
                }
                return 1;
            }
            else if (isHotkeyPressed(kbd->vkCode, settings.microphoneMuteHotkey))
            {
                reverseMicrophoneMute();
                return 1;
            }
            else if (isHotkeyPressed(kbd->vkCode, settings.microphonePushToTalkHotkey) && !pushToTalkPressed)
            {
                reverseMicrophoneMute();
                pushToTalkPressed = true;
                return 1;
            }
            else if (isHotkeyPressed(kbd->vkCode, settings.cameraMuteHotkey))
            {
                reverseVirtualCameraMuteState();
                return 1;
            }
            break;
        case WM_KEYUP:
            if (isHotkeyPressed(kbd->vkCode, settings.microphonePushToTalkHotkey))
            {
                reverseMicrophoneMute();
                pushToTalkPressed = false;
                return 1;
            }
        }
    }

    return CallNextHookEx(hook_handle, nCode, wParam, lParam);
}

void VideoConferenceModule::onGeneralSettingsChanged()

Review comment (suggestion):
We need to check that we were in the muted state, o/w the feature is not push to talk, but push to reverse 🙂 
```suggestion
            else if (isHotkeyPressed(kbd->vkCode, settings.microphonePushToTalkHotkey) && !pushToTalkPressed && getMicrophoneMuteState())
```

Code after:
                    {
                        reverseMicrophoneMute();
                        reverseVirtualCameraMuteState();
                    }
                    else if (cameraIsMuted)
                    {
                        reverseMicrophoneMute();
                    }
                    else if (microphoneIsMuted)
                    {
                        reverseVirtualCameraMuteState();
                    }
                }
                else
                {
                    // if the camera is not in use, we just mute/unmute the mic
                    reverseMicrophoneMute();
                }
                return 1;
            }
            else if (isHotkeyPressed(kbd->vkCode, settings.microphoneMuteHotkey))
            {
                reverseMicrophoneMute();
                return 1;
            }
            else if (isHotkeyPressed(kbd->vkCode, settings.microphonePushToTalkHotkey))
            {
                if (!pushToTalkPressed)
                {
                    if (settings.pushToReverseEnabled || getMicrophoneMuteState())
                    {
                        reverseMicrophoneMute();
                    }
                    pushToTalkPressed = true;
                }
                return 1;
            }
            else if (isHotkeyPressed(kbd->vkCode, settings.cameraMuteHotkey))
            {
                reverseVirtualCameraMuteState();
                return 1;
            }
            break;
        case WM_KEYUP:
            if (pushToTalkPressed && (kbd->vkCode == settings.microphonePushToTalkHotkey.get_code()))
            {
                reverseMicrophoneMute();
                pushToTalkPressed = false;
                return 1;
            }
        }