If the user is using their mouse left-handed, are .leftMouseDown and .rightMouseDown swapped?

48 views Asked by At

I want to know that the system handles this for me. I really hope it does.

If the user is left-handed, and so the left and right mouse buttons' meanings are swapped, then do all NSEvent things related to these two buttons also swap?

For an in-code example, I want to know if this is left-handed-user-friendly:

override func mouseDown(with event: NSEvent) {
    super.mouseDown(with: event)
    performPrimaryEvent()
}


override func rightMouseDown(with event: NSEvent) {
    super.rightMouseDown(with: event)
    performSecondaryEvent()
}

The official documentation says nothing and Google searches are futile...

1

There are 1 answers

0
Ky - On

I plugged in a mouse just to test this. It turns out the answer is yes! All these values and callbacks are automatically flipped.