Reference for Button (Keyboard)
Information about key in the keyboard. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Button (Keyboard)
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Information about a keyboard key like a standardized name if available.
Snippet
Get a key currently pressed.
buttons = sketch.get_keyboard().get_keys_pressed() if len(buttons) > 0: print(buttons[0].get_name())
Examples
Availability
Available for Sketch2DApp and Sketch2DWeb. Note that, on web, some keys may be intercepted by the operating system like the ctrl key and may not be available to the sketch.