Checks whether a certain key is down. Not to be confused with [[love.keypressed]] or [[love.keyreleased]].
== Function ==
=== Synopsis ===
<source lang="lua">
down = love.keyboard.isDown( key )
</source>
=== Arguments ===
{{param|KeyConstant|key|The key to check.}}
=== Returns ===
{{param|boolean|down|True if the key is down, false if not.}}
== Function ==
{{newin|[[0.7.2]]|072|type=variant}}
=== Synopsis ===
<source lang="lua">
anyDown = love.keyboard.isDown( key, ... )
</source>
=== Arguments ===
{{param|KeyConstant|key|A key to check.}}
{{param|KeyConstant|...|Additional keys to check.}}
=== Returns ===
{{param|boolean|anyDown|True if any supplied key is down, false if not.}}
== Examples ==
=== Increase a value while a key is held down ===
<source lang="lua">
local val = 0;
function love.update(dt)
    -- We will increase the variable by 1 for every second the key is held down.
    if love.keyboard.isDown("up") then
        val = val + dt
        print(val)
    end

    -- We will decrease the variable by 1/s if any of the wasd keys is pressed. 
    if love.keyboard.isDown('w', 'a', 's', 'd') then
        val = val - dt
        print(val)
    end
end
</source>
== See Also ==
* [[parent::love.keyboard]]
* [[love.keypressed]] 
* [[love.keyreleased]]
* [[love.keyboard.isScancodeDown]]
[[Category:Functions]]
{{#set:Description=Checks whether a certain key is down.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.keyboard.isDown}}