Function
love.keyboard.isDown( key )
Checks whether a certain key is down. For list of accepted keys, see Constants.
Synopsis
var = love.keyboard.isDown( key )
Arguments
key The key in question.
Returns
boolean Whether the passed key is pressed down.
See Also
Constants, keypressed, keyrelreased
Examples
Example 10: Checking if a key is down
  1. -- Example: Checking if a key is down 
  2.  
  3. function draw() 
  4.     -- Checks whether the return key is down or not. 
  5.     if love.keyboard.isDown(love.key_return) then 
  6.         love.graphics.draw("The key is down."5050
  7.     else 
  8.         love.graphics.draw("The key isn't down."5050
  9.     end 
  10. end 
Copyright © 2006-2008 LÖVE Development Team.