Difference between revisions of "love.keyreleased"

(Add an example)
m (Add more see alsos.)
Line 20: Line 20:
 
== See Also ==
 
== See Also ==
 
* [[parent::love]]
 
* [[parent::love]]
 +
* [[love.keypressed]]
 +
* [[love.keyboard.isDown]]
 
[[Category:Callbacks]]
 
[[Category:Callbacks]]
 
{{#set:Description=Callback function triggered when a key is released.}}
 
{{#set:Description=Callback function triggered when a key is released.}}

Revision as of 16:06, 27 September 2011

Callback function triggered when a key is released.

Function

Synopsis

love.keyreleased( key )

Arguments

KeyConstant key
Character of the key released.

Returns

Nothing.

Examples

Exit the game when the player releases the Escape key, using love.event.push.

function love.keyreleased(key)
   if key == "escape" then
      love.event.push("q")   -- actually causes the app to quit
   end
end

See Also


Other Languages