User Tools

Site Tools


swapping_20the_20mouse_20buttons

Swapping the mouse buttons

by Richard Russell, January 2011

You can swap the mouse buttons, that is reverse the normal actions of the left and right buttons, as follows:

        SYS "SwapMouseButton", 1

To restore the conventional functions for the buttons use:

        SYS "SwapMouseButton", 0

Note that the mouse is a shared resource, so any change you make will affect all applications and utilities, not just your program.

You can discover whether the mouse buttons have been swapped as follows:

        SM_SWAPBUTTON = 23
        SYS "GetSystemMetrics", SM_SWAPBUTTON TO yes%

This will set yes% to zero if the mouse buttons are not swapped, and non-zero if they are swapped.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
swapping_20the_20mouse_20buttons.txt · Last modified: 2024/01/05 00:21 by 127.0.0.1