Reference for get_buttons_pressed
Information about the mouse buttons currently pressed. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
get_buttons_pressed
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Get information about mouse buttons currently pressed.
Snippet
Get a button currently pressed.
buttons = sketch.get_mouse().get_buttons_pressed() if len(buttons) > 0: print(buttons[0].get_name())
Examples
Availability
Available for Sketch2DApp and Sketch2DWeb. Note that, on web, right click may be intercepted by the operating system and may not be available to the sketch or may be delayed.