<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://oxeyegames.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=KeyPress</id>
		<title>KeyPress - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=KeyPress"/>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=KeyPress&amp;action=history"/>
		<updated>2026-04-04T14:42:54Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://oxeyegames.com/wiki/index.php?title=KeyPress&amp;diff=372&amp;oldid=prev</id>
		<title>Jeb: Created page with '{{EngineHook| keyPress(key) | This hook is called when-ever the user presses a key. You can also get current key states using daisy.isKeyPressed(). | {{MethodPar...'</title>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=KeyPress&amp;diff=372&amp;oldid=prev"/>
				<updated>2010-01-29T14:34:04Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;{{EngineHook| keyPress(key) | This hook is called when-ever the user presses a key. You can also get current key states using &lt;a href=&quot;/wiki/index.php/IsKeyPressed&quot; title=&quot;IsKeyPressed&quot;&gt;daisy.isKeyPressed()&lt;/a&gt;. | {{MethodPar...&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{EngineHook|&lt;br /&gt;
keyPress(key)&lt;br /&gt;
|&lt;br /&gt;
This hook is called when-ever the user presses a key. You can also get current key states using [[isKeyPressed|daisy.isKeyPressed()]].&lt;br /&gt;
|&lt;br /&gt;
{{MethodParam|key|An integer|The key that was pressed. See [[KeyCodes]] for a list of keys.}}&lt;br /&gt;
}}&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  local function onKeyPress(key)&lt;br /&gt;
&lt;br /&gt;
    if key == 37 then&lt;br /&gt;
       -- LEFT&lt;br /&gt;
    elseif key == 38 then&lt;br /&gt;
       -- UP&lt;br /&gt;
    elseif key == 39 then&lt;br /&gt;
       -- RIGHT&lt;br /&gt;
    elseif key == 40 then&lt;br /&gt;
       -- DOWN&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  hook.add(&amp;quot;keyPress&amp;quot;, onKeyPress)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jeb</name></author>	</entry>

	</feed>