keyPressed

v0.0.6
keyPressed(key, keyCode);Event

Called whenever a key is pressed.

Arguments

keyThe pressed key as a string, is nil if glfw cannot find a name for the key
keyCodeThe pressed key as a key code

function setup()
   createWindow(600, 600);
end

function draw()
   background(51);
end

function keyPressed(key, keyCode)
   print(key, keyCode)
end
See keyPressed in keyboard.h