mouseButton: Mouse button identification

Description Usage Arguments Details Value

View source: R/interactive.R

Description

Mouse button identification

Usage

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


SWotherspoon/BAStag documentation built on March 29, 2021, 2:47 a.m.