Identifies if the pressed key is auto repeating, as faciliated by the computer’s operating system.
1def setup(): 2 py5.size(200, 200, py5.P2D) 3 py5.rect_mode(py5.CENTER) 4 5 6def draw(): 7 py5.square(py5.random(py5.width), py5.random(py5.height), 10) 8 9 10def key_pressed(e): 11 if e.is_auto_repeat(): 12 py5.println('key press is auto repeating') 13 else: 14 py5.println('key press is not auto repeating')
Identifies if the pressed key is auto repeating, as faciliated by the computer’s operating system. This method might work differently (or not at all) depending on the renderer used by the Sketch and the operating system the Sketch is run on.
Underlying Processing method: isAutoRepeat
is_auto_repeat() -> bool
Updated on April 27, 2022 10:44:51am UTC