Determine if mouse buttons are swapped

Would it be possible to add a function that determines if the left and
right mouse buttons are swapped? The main purpose for this function
would be to adapt help text and icons accordingly (e.g. show an icon
with the left button pressed when they aren’t swapped, or the right
button pressed if they are).

On Windows you can do this with GetSystemMetrics(SM_SWAPBUTTON)
apparently (returns zero if normal and non-zero if swapped). Don’t
know how it is in other systems.