keyIsDown

v0.1.6
keyIsDown(k);

Check if a keyboard key is pressed, returns true if key is down and returns false if it's not

Arguments

kThe keyboard key to check as a key global, or a string

Returns

booleanWhether or not the key is down

-- Use a string 
if (keyIsDown('a')) then
  -- key 'a' is down
end

-- use a global
if (keyIsDown(LEFT_ARROW)) then
  -- left arrow is down
end
See keyIsDown in keyboard.h