Difference between revisions of "love.keyreleased"
m ("q" --> "quit" for 0.8.0) |
(Being less lazy than bartbes.) |
||
Line 1: | Line 1: | ||
Callback function triggered when a key is released. | 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 == | == Function == | ||
=== Synopsis === | === Synopsis === |
Revision as of 18:46, 17 March 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
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info