Difference between revisions of "KeyCode"

From GiderosMobile
Line 5: Line 5:
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate><br />
+
KeyCode table holds the key code constants. These map directly to a physical key on the keyboard.
KeyCode table holds the key code constants. These map directly to a physical key on the keyboard.<br /></translate>
+
 
 
=== <translate>Examples</translate> ===
 
=== <translate>Examples</translate> ===
'''Listening for back button'''<br/>
+
'''Listening for back button'''
<source lang="lua">stage:addEventListener(Event.KEY_DOWN, function(event)
+
<source lang="lua">
 +
stage:addEventListener(Event.KEY_DOWN, function(event)
 
     if event.keyCode == KeyCode.BACK then
 
     if event.keyCode == KeyCode.BACK then
 
         application:exit()
 
         application:exit()
 
     end
 
     end
end)</source>
+
end)
 +
</source>
 +
 
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
 +
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
Line 93: Line 98:
 
[[Special:MyLanguage/KeyCode.Z|KeyCode.Z]]<br/><!-- GIDEROSCST:KeyCode.Z 90-->
 
[[Special:MyLanguage/KeyCode.Z|KeyCode.Z]]<br/><!-- GIDEROSCST:KeyCode.Z 90-->
 
|}
 
|}
 
{{KeyCode}}
 

Revision as of 00:33, 10 December 2019