Files
PulsarK-main/Pulsar.Client/FunStuff/SwapMouseButtons.cs
T
i2p 773d05f8f1
Pulsar .NET 9.0 Windows Release / build (push) Waiting to run
Mirror to Codeberg and Gitea / mirror (push) Waiting to run
initial commit
2026-08-27 10:57:58 -06:00

27 lines
649 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Pulsar.Client.FunStuff
{
public class SwapMouseButtons
{
[DllImport("user32.dll")]
public static extern bool SwapMouseButton(bool swap);
[DllImport("user32.dll")]
public static extern int GetSystemMetrics(int nIndex);
private const int SM_SWAPBUTTON = 23;
public static void SwapMouse()
{
bool isSwapped = (GetSystemMetrics(SM_SWAPBUTTON) != 0);
SwapMouseButton(!isSwapped);
}
}
}