Ky -
Ky -

Reputation: 32143

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

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...

Upvotes: 1

Views: 26

Answers (1)

Ky -
Ky -

Reputation: 32143

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

Upvotes: 1

Related Questions