mouseButton: Mouse button identification

View source: R/interactive.R

mouseButtonR Documentation

Mouse button identification

Description

Mouse button identification

Usage

mouseButton(buttons)

Arguments

buttons

vector passed to callbacks used by getGraphicsEvent.

Details

Identify left and right mouse button clicks from the buttons vector passed to the callbacks used by getGraphicsEvent. This is non-trivial because the windows and MacOS behaviours are subtly different.

Value

Returns 1 for left click, 2 for right click and 0 otherwise.


slisovski/TwGeos documentation built on Jan. 27, 2024, 10:43 a.m.