Difference between revisions of "KeyCode"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <!-- GIDEROSOBJ:KeyCode --> | ||
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
Line 19: | Line 20: | ||
=== <translate>Events</translate> === | === <translate>Events</translate> === | ||
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
− | [[Special:MyLanguage/KeyCode.A|KeyCode.A]]<br/> | + | [[Special:MyLanguage/KeyCode.A|KeyCode.A]]<br/><!-- GIDEROSCST:KeyCode.A --> |
− | [[Special:MyLanguage/KeyCode.ALT|KeyCode.ALT]]<br/> | + | [[Special:MyLanguage/KeyCode.ALT|KeyCode.ALT]]<br/><!-- GIDEROSCST:KeyCode.ALT --> |
− | [[Special:MyLanguage/KeyCode.B|KeyCode.B]]<br/> | + | [[Special:MyLanguage/KeyCode.B|KeyCode.B]]<br/><!-- GIDEROSCST:KeyCode.B --> |
− | [[Special:MyLanguage/KeyCode.BACK|KeyCode.BACK]]<br/> | + | [[Special:MyLanguage/KeyCode.BACK|KeyCode.BACK]]<br/><!-- GIDEROSCST:KeyCode.BACK --> |
− | [[Special:MyLanguage/KeyCode.BACKSPACE|KeyCode.BACKSPACE]]<br/> | + | [[Special:MyLanguage/KeyCode.BACKSPACE|KeyCode.BACKSPACE]]<br/><!-- GIDEROSCST:KeyCode.BACKSPACE --> |
− | + | [[Special:MyLanguage/KeyCode.C|KeyCode.C]]<br/><!-- GIDEROSCST:KeyCode.C --> | |
− | [[Special:MyLanguage/KeyCode.CENTER|KeyCode.CENTER]]<br/> | + | [[Special:MyLanguage/KeyCode.CENTER|KeyCode.CENTER]]<br/><!-- GIDEROSCST:KeyCode.CENTER --> |
− | [[Special:MyLanguage/KeyCode.CTRL|KeyCode.CTRL]]<br/> | + | [[Special:MyLanguage/KeyCode.CTRL|KeyCode.CTRL]]<br/><!-- GIDEROSCST:KeyCode.CTRL --> |
− | [[Special:MyLanguage/KeyCode.D|KeyCode.D]]<br/> | + | [[Special:MyLanguage/KeyCode.D|KeyCode.D]]<br/><!-- GIDEROSCST:KeyCode.D --> |
− | [[Special:MyLanguage/KeyCode.DELETE|KeyCode.DELETE]]<br/> | + | [[Special:MyLanguage/KeyCode.DELETE|KeyCode.DELETE]]<br/><!-- GIDEROSCST:KeyCode.DELETE --> |
− | [[Special:MyLanguage/KeyCode.DOWN|KeyCode.DOWN]]<br/> | + | [[Special:MyLanguage/KeyCode.DOWN|KeyCode.DOWN]]<br/><!-- GIDEROSCST:KeyCode.DOWN --> |
− | [[Special:MyLanguage/KeyCode.E|KeyCode.E]]<br/> | + | [[Special:MyLanguage/KeyCode.E|KeyCode.E]]<br/><!-- GIDEROSCST:KeyCode.E --> |
− | [[Special:MyLanguage/KeyCode.END|KeyCode.END]]<br/> | + | [[Special:MyLanguage/KeyCode.END|KeyCode.END]]<br/><!-- GIDEROSCST:KeyCode.END --> |
− | + | [[Special:MyLanguage/KeyCode.ENTER|KeyCode.ENTER]]<br/><!-- GIDEROSCST:KeyCode.ENTER --> | |
− | [[Special:MyLanguage/KeyCode.ESC|KeyCode.ESC]]<br/> | + | [[Special:MyLanguage/KeyCode.ESC|KeyCode.ESC]]<br/><!-- GIDEROSCST:KeyCode.ESC --> |
− | [[Special:MyLanguage/KeyCode.F|KeyCode.F]]<br/> | + | [[Special:MyLanguage/KeyCode.F|KeyCode.F]]<br/><!-- GIDEROSCST:KeyCode.F --> |
− | [[Special:MyLanguage/KeyCode.G|KeyCode.G]]<br/> | + | [[Special:MyLanguage/KeyCode.G|KeyCode.G]]<br/><!-- GIDEROSCST:KeyCode.G --> |
− | [[Special:MyLanguage/KeyCode.H|KeyCode.H]]<br/> | + | [[Special:MyLanguage/KeyCode.H|KeyCode.H]]<br/><!-- GIDEROSCST:KeyCode.H --> |
− | [[Special:MyLanguage/KeyCode.HOME|KeyCode.HOME]]<br/> | + | [[Special:MyLanguage/KeyCode.HOME|KeyCode.HOME]]<br/><!-- GIDEROSCST:KeyCode.HOME --> |
− | [[Special:MyLanguage/KeyCode.I|KeyCode.I]]<br/> | + | [[Special:MyLanguage/KeyCode.I|KeyCode.I]]<br/><!-- GIDEROSCST:KeyCode.I --> |
− | [[Special:MyLanguage/KeyCode.INSERT|KeyCode.INSERT]]<br/> | + | [[Special:MyLanguage/KeyCode.INSERT|KeyCode.INSERT]]<br/><!-- GIDEROSCST:KeyCode.INSERT --> |
− | + | [[Special:MyLanguage/KeyCode.J|KeyCode.J]]<br/><!-- GIDEROSCST:KeyCode.J --> | |
− | [[Special:MyLanguage/KeyCode.K|KeyCode.K]]<br/> | + | [[Special:MyLanguage/KeyCode.K|KeyCode.K]]<br/><!-- GIDEROSCST:KeyCode.K --> |
− | [[Special:MyLanguage/KeyCode.L|KeyCode.L]]<br/> | + | [[Special:MyLanguage/KeyCode.L|KeyCode.L]]<br/><!-- GIDEROSCST:KeyCode.L --> |
− | [[Special:MyLanguage/KeyCode.L1|KeyCode.L1]]<br/> | + | [[Special:MyLanguage/KeyCode.L1|KeyCode.L1]]<br/><!-- GIDEROSCST:KeyCode.L1 --> |
− | [[Special:MyLanguage/KeyCode.LEFT|KeyCode.LEFT]]<br/> | + | [[Special:MyLanguage/KeyCode.LEFT|KeyCode.LEFT]]<br/><!-- GIDEROSCST:KeyCode.LEFT --> |
− | [[Special:MyLanguage/KeyCode.M|KeyCode.M]]<br/> | + | [[Special:MyLanguage/KeyCode.M|KeyCode.M]]<br/><!-- GIDEROSCST:KeyCode.M --> |
− | [[Special:MyLanguage/KeyCode.MENU|KeyCode.MENU]]<br/> | + | [[Special:MyLanguage/KeyCode.MENU|KeyCode.MENU]]<br/><!-- GIDEROSCST:KeyCode.MENU --> |
− | [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_ALT --> |
− | + | [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_CTRL --> | |
− | [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_META --> |
− | [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_NONE --> |
− | [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_SHIFT --> |
− | [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_LEFT --> |
− | [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_MIDDLE --> |
− | [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_NONE --> |
− | [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_RIGHT --> |
− | + | [[Special:MyLanguage/KeyCode.N|KeyCode.N]]<br/><!-- GIDEROSCST:KeyCode.N --> | |
− | [[Special:MyLanguage/KeyCode.NUM_0|KeyCode.NUM_0]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_0|KeyCode.NUM_0]]<br/><!-- GIDEROSCST:KeyCode.NUM_0 --> |
− | [[Special:MyLanguage/KeyCode.NUM_1|KeyCode.NUM_1]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_1|KeyCode.NUM_1]]<br/><!-- GIDEROSCST:KeyCode.NUM_1 --> |
− | [[Special:MyLanguage/KeyCode.NUM_2|KeyCode.NUM_2]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_2|KeyCode.NUM_2]]<br/><!-- GIDEROSCST:KeyCode.NUM_2 --> |
− | [[Special:MyLanguage/KeyCode.NUM_3|KeyCode.NUM_3]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_3|KeyCode.NUM_3]]<br/><!-- GIDEROSCST:KeyCode.NUM_3 --> |
− | [[Special:MyLanguage/KeyCode.NUM_4|KeyCode.NUM_4]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_4|KeyCode.NUM_4]]<br/><!-- GIDEROSCST:KeyCode.NUM_4 --> |
− | [[Special:MyLanguage/KeyCode.NUM_5|KeyCode.NUM_5]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_5|KeyCode.NUM_5]]<br/><!-- GIDEROSCST:KeyCode.NUM_5 --> |
− | [[Special:MyLanguage/KeyCode.NUM_6|KeyCode.NUM_6]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_6|KeyCode.NUM_6]]<br/><!-- GIDEROSCST:KeyCode.NUM_6 --> |
− | + | [[Special:MyLanguage/KeyCode.NUM_7|KeyCode.NUM_7]]<br/><!-- GIDEROSCST:KeyCode.NUM_7 --> | |
− | [[Special:MyLanguage/KeyCode.NUM_8|KeyCode.NUM_8]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_8|KeyCode.NUM_8]]<br/><!-- GIDEROSCST:KeyCode.NUM_8 --> |
− | [[Special:MyLanguage/KeyCode.NUM_9|KeyCode.NUM_9]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_9|KeyCode.NUM_9]]<br/><!-- GIDEROSCST:KeyCode.NUM_9 --> |
− | [[Special:MyLanguage/KeyCode.O|KeyCode.O]]<br/> | + | [[Special:MyLanguage/KeyCode.O|KeyCode.O]]<br/><!-- GIDEROSCST:KeyCode.O --> |
− | [[Special:MyLanguage/KeyCode.P|KeyCode.P]]<br/> | + | [[Special:MyLanguage/KeyCode.P|KeyCode.P]]<br/><!-- GIDEROSCST:KeyCode.P --> |
− | [[Special:MyLanguage/KeyCode.PAGEDOWN|KeyCode.PAGEDOWN]]<br/> | + | [[Special:MyLanguage/KeyCode.PAGEDOWN|KeyCode.PAGEDOWN]]<br/><!-- GIDEROSCST:KeyCode.PAGEDOWN --> |
− | [[Special:MyLanguage/KeyCode.PAGEUP|KeyCode.PAGEUP]]<br/> | + | [[Special:MyLanguage/KeyCode.PAGEUP|KeyCode.PAGEUP]]<br/><!-- GIDEROSCST:KeyCode.PAGEUP --> |
− | [[Special:MyLanguage/KeyCode.Q|KeyCode.Q]]<br/> | + | [[Special:MyLanguage/KeyCode.Q|KeyCode.Q]]<br/><!-- GIDEROSCST:KeyCode.Q --> |
− | + | [[Special:MyLanguage/KeyCode.R|KeyCode.R]]<br/><!-- GIDEROSCST:KeyCode.R --> | |
− | [[Special:MyLanguage/KeyCode.R1|KeyCode.R1]]<br/> | + | [[Special:MyLanguage/KeyCode.R1|KeyCode.R1]]<br/><!-- GIDEROSCST:KeyCode.R1 --> |
− | [[Special:MyLanguage/KeyCode.RIGHT|KeyCode.RIGHT]]<br/> | + | [[Special:MyLanguage/KeyCode.RIGHT|KeyCode.RIGHT]]<br/><!-- GIDEROSCST:KeyCode.RIGHT --> |
− | [[Special:MyLanguage/KeyCode.S|KeyCode.S]]<br/> | + | [[Special:MyLanguage/KeyCode.S|KeyCode.S]]<br/><!-- GIDEROSCST:KeyCode.S --> |
− | [[Special:MyLanguage/KeyCode.SEARCH|KeyCode.SEARCH]]<br/> | + | [[Special:MyLanguage/KeyCode.SEARCH|KeyCode.SEARCH]]<br/><!-- GIDEROSCST:KeyCode.SEARCH --> |
− | [[Special:MyLanguage/KeyCode.SELECT|KeyCode.SELECT]]<br/> | + | [[Special:MyLanguage/KeyCode.SELECT|KeyCode.SELECT]]<br/><!-- GIDEROSCST:KeyCode.SELECT --> |
− | [[Special:MyLanguage/KeyCode.SHIFT|KeyCode.SHIFT]]<br/> | + | [[Special:MyLanguage/KeyCode.SHIFT|KeyCode.SHIFT]]<br/><!-- GIDEROSCST:KeyCode.SHIFT --> |
− | [[Special:MyLanguage/KeyCode.SPACE|KeyCode.SPACE]]<br/> | + | [[Special:MyLanguage/KeyCode.SPACE|KeyCode.SPACE]]<br/><!-- GIDEROSCST:KeyCode.SPACE --> |
− | + | [[Special:MyLanguage/KeyCode.START|KeyCode.START]]<br/><!-- GIDEROSCST:KeyCode.START --> | |
− | [[Special:MyLanguage/KeyCode.T|KeyCode.T]]<br/> | + | [[Special:MyLanguage/KeyCode.T|KeyCode.T]]<br/><!-- GIDEROSCST:KeyCode.T --> |
− | [[Special:MyLanguage/KeyCode.TAB|KeyCode.TAB]]<br/> | + | [[Special:MyLanguage/KeyCode.TAB|KeyCode.TAB]]<br/><!-- GIDEROSCST:KeyCode.TAB --> |
− | [[Special:MyLanguage/KeyCode.U|KeyCode.U]]<br/> | + | [[Special:MyLanguage/KeyCode.U|KeyCode.U]]<br/><!-- GIDEROSCST:KeyCode.U --> |
− | [[Special:MyLanguage/KeyCode.UP|KeyCode.UP]]<br/> | + | [[Special:MyLanguage/KeyCode.UP|KeyCode.UP]]<br/><!-- GIDEROSCST:KeyCode.UP --> |
− | [[Special:MyLanguage/KeyCode.V|KeyCode.V]]<br/> | + | [[Special:MyLanguage/KeyCode.V|KeyCode.V]]<br/><!-- GIDEROSCST:KeyCode.V --> |
− | [[Special:MyLanguage/KeyCode.W|KeyCode.W]]<br/> | + | [[Special:MyLanguage/KeyCode.W|KeyCode.W]]<br/><!-- GIDEROSCST:KeyCode.W --> |
− | [[Special:MyLanguage/KeyCode.X|KeyCode.X]]<br/> | + | [[Special:MyLanguage/KeyCode.X|KeyCode.X]]<br/><!-- GIDEROSCST:KeyCode.X --> |
− | [[Special:MyLanguage/KeyCode.Y|KeyCode.Y]]<br/> | + | [[Special:MyLanguage/KeyCode.Y|KeyCode.Y]]<br/><!-- GIDEROSCST:KeyCode.Y --> |
− | [[Special:MyLanguage/KeyCode.Z|KeyCode.Z]]<br/> | + | [[Special:MyLanguage/KeyCode.Z|KeyCode.Z]]<br/><!-- GIDEROSCST:KeyCode.Z --> |
|} | |} |
Revision as of 14:54, 31 August 2018
Supported platforms:
Available since: Gideros 2011.6
Inherits from: Object
Description
KeyCode table holds the key code constants. These map directly to a physical key on the keyboard.
Examples
Listening for back button
stage:addEventListener(Event.KEY_DOWN, function(event)
if event.keyCode == KeyCode.BACK then
application:exit()
end
end)