Difference between revisions of "love.keyreleased"

(Being less lazy than bartbes.)
m
Line 26: Line 26:
 
[[Category:Callbacks]]
 
[[Category:Callbacks]]
 
{{#set:Description=Callback function triggered when a key is released.}}
 
{{#set:Description=Callback function triggered when a key is released.}}
 +
{{#set:Subcategory=General}}
 
{{#set:Since=000}}
 
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.keyreleased}}
 
{{i18n|love.keyreleased}}

Revision as of 07:00, 31 October 2013

Callback function triggered when a key is released.

Unlike love.keypressed, love.keyreleased does not have an unicode argument because those characters are only generated when keys are pressed.

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("quit")   -- actually causes the app to quit
   end
end

See Also


Other Languages