Difference between revisions of "KeyCode"
From GiderosMobile
Line 18: | Line 18: | ||
=== Events === | === Events === | ||
=== Constants === | === Constants === | ||
− | [[KeyCode.A]]<br/> | + | [[Special:MyLanguage/KeyCode.A|KeyCode.A]]<br/> |
− | [[KeyCode.ALT]]<br/> | + | [[Special:MyLanguage/KeyCode.ALT|KeyCode.ALT]]<br/> |
− | [[KeyCode.B]]<br/> | + | [[Special:MyLanguage/KeyCode.B|KeyCode.B]]<br/> |
− | [[KeyCode.BACK]]<br/> | + | [[Special:MyLanguage/KeyCode.BACK|KeyCode.BACK]]<br/> |
− | [[KeyCode.BACKSPACE]]<br/> | + | [[Special:MyLanguage/KeyCode.BACKSPACE|KeyCode.BACKSPACE]]<br/> |
− | [[KeyCode.C]]<br/> | + | [[Special:MyLanguage/KeyCode.C|KeyCode.C]]<br/> |
− | [[KeyCode.CENTER]]<br/> | + | [[Special:MyLanguage/KeyCode.CENTER|KeyCode.CENTER]]<br/> |
− | [[KeyCode.CTRL]]<br/> | + | [[Special:MyLanguage/KeyCode.CTRL|KeyCode.CTRL]]<br/> |
− | [[KeyCode.D]]<br/> | + | [[Special:MyLanguage/KeyCode.D|KeyCode.D]]<br/> |
− | [[KeyCode.DELETE]]<br/> | + | [[Special:MyLanguage/KeyCode.DELETE|KeyCode.DELETE]]<br/> |
− | [[KeyCode.DOWN]]<br/> | + | [[Special:MyLanguage/KeyCode.DOWN|KeyCode.DOWN]]<br/> |
− | [[KeyCode.E]]<br/> | + | [[Special:MyLanguage/KeyCode.E|KeyCode.E]]<br/> |
− | [[KeyCode.END]]<br/> | + | [[Special:MyLanguage/KeyCode.END|KeyCode.END]]<br/> |
− | [[KeyCode.ENTER]]<br/> | + | [[Special:MyLanguage/KeyCode.ENTER|KeyCode.ENTER]]<br/> |
− | [[KeyCode.ESC]]<br/> | + | [[Special:MyLanguage/KeyCode.ESC|KeyCode.ESC]]<br/> |
− | [[KeyCode.F]]<br/> | + | [[Special:MyLanguage/KeyCode.F|KeyCode.F]]<br/> |
− | [[KeyCode.G]]<br/> | + | [[Special:MyLanguage/KeyCode.G|KeyCode.G]]<br/> |
− | [[KeyCode.H]]<br/> | + | [[Special:MyLanguage/KeyCode.H|KeyCode.H]]<br/> |
− | [[KeyCode.HOME]]<br/> | + | [[Special:MyLanguage/KeyCode.HOME|KeyCode.HOME]]<br/> |
− | [[KeyCode.I]]<br/> | + | [[Special:MyLanguage/KeyCode.I|KeyCode.I]]<br/> |
− | [[KeyCode.INSERT]]<br/> | + | [[Special:MyLanguage/KeyCode.INSERT|KeyCode.INSERT]]<br/> |
− | [[KeyCode.J]]<br/> | + | [[Special:MyLanguage/KeyCode.J|KeyCode.J]]<br/> |
− | [[KeyCode.K]]<br/> | + | [[Special:MyLanguage/KeyCode.K|KeyCode.K]]<br/> |
− | [[KeyCode.L]]<br/> | + | [[Special:MyLanguage/KeyCode.L|KeyCode.L]]<br/> |
− | [[KeyCode.L1]]<br/> | + | [[Special:MyLanguage/KeyCode.L1|KeyCode.L1]]<br/> |
− | [[KeyCode.LEFT]]<br/> | + | [[Special:MyLanguage/KeyCode.LEFT|KeyCode.LEFT]]<br/> |
− | [[KeyCode.M]]<br/> | + | [[Special:MyLanguage/KeyCode.M|KeyCode.M]]<br/> |
− | [[KeyCode.MENU]]<br/> | + | [[Special:MyLanguage/KeyCode.MENU|KeyCode.MENU]]<br/> |
− | [[KeyCode.MODIFIER_ALT]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]]<br/> |
− | [[KeyCode.MODIFIER_CTRL]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]]<br/> |
− | [[KeyCode.MODIFIER_META]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]<br/> |
− | [[KeyCode.MODIFIER_NONE]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]]<br/> |
− | [[KeyCode.MODIFIER_SHIFT]]<br/> | + | [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]]<br/> |
− | [[KeyCode.MOUSE_LEFT]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]]<br/> |
− | [[KeyCode.MOUSE_MIDDLE]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]]<br/> |
− | [[KeyCode.MOUSE_NONE]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]]<br/> |
− | [[KeyCode.MOUSE_RIGHT]]<br/> | + | [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]]<br/> |
− | [[KeyCode.N]]<br/> | + | [[Special:MyLanguage/KeyCode.N|KeyCode.N]]<br/> |
− | [[KeyCode.NUM_0]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_0|KeyCode.NUM_0]]<br/> |
− | [[KeyCode.NUM_1]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_1|KeyCode.NUM_1]]<br/> |
− | [[KeyCode.NUM_2]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_2|KeyCode.NUM_2]]<br/> |
− | [[KeyCode.NUM_3]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_3|KeyCode.NUM_3]]<br/> |
− | [[KeyCode.NUM_4]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_4|KeyCode.NUM_4]]<br/> |
− | [[KeyCode.NUM_5]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_5|KeyCode.NUM_5]]<br/> |
− | [[KeyCode.NUM_6]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_6|KeyCode.NUM_6]]<br/> |
− | [[KeyCode.NUM_7]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_7|KeyCode.NUM_7]]<br/> |
− | [[KeyCode.NUM_8]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_8|KeyCode.NUM_8]]<br/> |
− | [[KeyCode.NUM_9]]<br/> | + | [[Special:MyLanguage/KeyCode.NUM_9|KeyCode.NUM_9]]<br/> |
− | [[KeyCode.O]]<br/> | + | [[Special:MyLanguage/KeyCode.O|KeyCode.O]]<br/> |
− | [[KeyCode.P]]<br/> | + | [[Special:MyLanguage/KeyCode.P|KeyCode.P]]<br/> |
− | [[KeyCode.PAGEDOWN]]<br/> | + | [[Special:MyLanguage/KeyCode.PAGEDOWN|KeyCode.PAGEDOWN]]<br/> |
− | [[KeyCode.PAGEUP]]<br/> | + | [[Special:MyLanguage/KeyCode.PAGEUP|KeyCode.PAGEUP]]<br/> |
− | [[KeyCode.Q]]<br/> | + | [[Special:MyLanguage/KeyCode.Q|KeyCode.Q]]<br/> |
− | [[KeyCode.R]]<br/> | + | [[Special:MyLanguage/KeyCode.R|KeyCode.R]]<br/> |
− | [[KeyCode.R1]]<br/> | + | [[Special:MyLanguage/KeyCode.R1|KeyCode.R1]]<br/> |
− | [[KeyCode.RIGHT]]<br/> | + | [[Special:MyLanguage/KeyCode.RIGHT|KeyCode.RIGHT]]<br/> |
− | [[KeyCode.S]]<br/> | + | [[Special:MyLanguage/KeyCode.S|KeyCode.S]]<br/> |
− | [[KeyCode.SEARCH]]<br/> | + | [[Special:MyLanguage/KeyCode.SEARCH|KeyCode.SEARCH]]<br/> |
− | [[KeyCode.SELECT]]<br/> | + | [[Special:MyLanguage/KeyCode.SELECT|KeyCode.SELECT]]<br/> |
− | [[KeyCode.SHIFT]]<br/> | + | [[Special:MyLanguage/KeyCode.SHIFT|KeyCode.SHIFT]]<br/> |
− | [[KeyCode.SPACE]]<br/> | + | [[Special:MyLanguage/KeyCode.SPACE|KeyCode.SPACE]]<br/> |
− | [[KeyCode.START]]<br/> | + | [[Special:MyLanguage/KeyCode.START|KeyCode.START]]<br/> |
− | [[KeyCode.T]]<br/> | + | [[Special:MyLanguage/KeyCode.T|KeyCode.T]]<br/> |
− | [[KeyCode.TAB]]<br/> | + | [[Special:MyLanguage/KeyCode.TAB|KeyCode.TAB]]<br/> |
− | [[KeyCode.U]]<br/> | + | [[Special:MyLanguage/KeyCode.U|KeyCode.U]]<br/> |
− | [[KeyCode.UP]]<br/> | + | [[Special:MyLanguage/KeyCode.UP|KeyCode.UP]]<br/> |
− | [[KeyCode.V]]<br/> | + | [[Special:MyLanguage/KeyCode.V|KeyCode.V]]<br/> |
− | [[KeyCode.W]]<br/> | + | [[Special:MyLanguage/KeyCode.W|KeyCode.W]]<br/> |
− | [[KeyCode.X]]<br/> | + | [[Special:MyLanguage/KeyCode.X|KeyCode.X]]<br/> |
− | [[KeyCode.Y]]<br/> | + | [[Special:MyLanguage/KeyCode.Y|KeyCode.Y]]<br/> |
− | [[KeyCode.Z]]<br/> | + | [[Special:MyLanguage/KeyCode.Z|KeyCode.Z]]<br/> |
|} | |} |
Revision as of 16:33, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6
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)