Difference between revisions of "love.keyboard.isDown"
m |
|||
Line 22: | Line 22: | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Checks whether a certain key is down.}} | {{#set:Description=Checks whether a certain key is down.}} | ||
+ | == Other Languages == | ||
+ | {{i18n|love.keyboard.isDown}} |
Revision as of 20:30, 18 November 2010
Checks whether a certain key is down.
Contents
Function
Synopsis
down = love.keyboard.isDown( key )
Arguments
KeyConstant key
- The key to check.
Returns
boolean down
- True if the key is down, false if not.
Examples
Quit on hitting escape
function love.keypressed(k)
if k == 'escape' then
love.event.push('q') -- quit the game
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