keyHeld(key, keyCode);
EventCalled whenever a key is held down.
Arguments
key
The held key as a string, is nil if glfw cannot find a name for the keykeyCode
The held key as a key codefunction setup()
createWindow(200, 200);
background('purple');
text('Hold any key', 10, 40);
end
-- no draw
function draw() return end
function keyHeld(key, keyCode)
print(key, keyCode);
background('purple');
if key ~= nil then
text('Held key: ' .. key, 10, 40);
end
end
Output