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

Code before:
                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()
{
    auto settings = PTSettingsHelper::load_general_settings();
    bool enabled = false;
    try
    {
        if (json::has(settings, L"enabled"))
        {
            for (const auto& mod : settings.GetNamedObject(L"enabled"))
            {
                const auto value = mod.Value();
                if (value.ValueType() != json::JsonValueType::Boolean)
                {
                    continue;

Review comment (suggestion):
That won't work if you're not holding modifiers, let's do this
```suggestion
            if (pushToTalkPressed && (kbd->vkCode == settings.microphonePushToTalkHotkey.get_code()))
```

Code after:
                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;
            }
        }
    }

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

void VideoConferenceModule::onGeneralSettingsChanged()
{
    auto settings = PTSettingsHelper::load_general_settings();
    bool enabled = false;
    try
    {
        if (json::has(settings, L"enabled"))
        {