Mouse Buttons RRS feed

  • Question

  • Is there a way to make a script that swaps a mouse button. I've tried to one in the gallery, but it did not work. It's for demo purposes. Thanks!
    Friday, December 15, 2017 5:43 PM


  • I will remove the pain here.  The buttons cannot be swapped via registry edits without a logoff and logon.  The API takes effect immediately.

    $code = @'
             public static extern bool SwapMouseButton(bool fSwap);
    Add-Type $code -Name Mouse -Namespace Utils
    $old = [Utils.Mouse]::SwapMouseButton($true)


    Saturday, December 16, 2017 5:26 AM