Difference between revisions of "KeyCode Constants"
From GiderosMobile
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === Description === | ||
− | '''GitHub https://github.com/gideros/gideros/blob/master/libgid/include/ginput.h | + | '''GitHub''': |
+ | * https://github.com/gideros/gideros/blob/master/libgid/include/ginput.h | ||
+ | * https://github.com/gideros/gideros/blob/master/luabinding/luaapplication.cpp#L664 | ||
+ | ==== Numbers (above the letters) ==== | ||
+ | *KeyCode.NUM_0 : '''48''' | ||
+ | *KeyCode.NUM_1 : '''49''' | ||
+ | *KeyCode.NUM_2 : '''50''' | ||
+ | *KeyCode.NUM_3 : '''51''' | ||
+ | *KeyCode.NUM_4 : '''52''' | ||
+ | *KeyCode.NUM_5 : '''53''' | ||
+ | *KeyCode.NUM_6 : '''54''' | ||
+ | *KeyCode.NUM_7 : '''55''' | ||
+ | *KeyCode.NUM_8 : '''56''' | ||
+ | *KeyCode.NUM_9 : '''57''' | ||
+ | |||
+ | ==== Letters ==== | ||
*KeyCode.A : '''65''' | *KeyCode.A : '''65''' | ||
*KeyCode.B : '''66''' | *KeyCode.B : '''66''' | ||
Line 33: | Line 48: | ||
*KeyCode.Z : '''90''' | *KeyCode.Z : '''90''' | ||
+ | ==== Cursor ==== | ||
+ | *KeyCode.LEFT : '''37''', ''Left cursor is pressed'' | ||
+ | *KeyCode.UP : '''38''', ''Up cursor is pressed'' | ||
+ | *KeyCode.RIGHT : '''39''', ''Right cursor is pressed'' | ||
+ | *KeyCode.DOWN : '''40''', ''Down cursor is pressed'' | ||
− | *KeyCode. | + | ==== Phone/Tablet ==== |
− | *KeyCode. | + | *KeyCode.BACK : '''301''' |
+ | *KeyCode.SEARCH : '''302''' | ||
+ | *KeyCode.MENU : '''303''' | ||
+ | *KeyCode.CENTER : '''304''' | ||
+ | *KeyCode.SELECT : '''305''' | ||
+ | *KeyCode.START : '''306''' | ||
+ | *KeyCode.L1 : '''307''' | ||
+ | *KeyCode.R1 : '''308''' | ||
+ | |||
+ | ==== Functions ==== | ||
*KeyCode.BACKSPACE : '''8''' | *KeyCode.BACKSPACE : '''8''' | ||
− | *KeyCode. | + | *KeyCode.TAB : '''9''' |
+ | *KeyCode.ENTER : '''13''' | ||
+ | *KeyCode.ESC : '''27''' | ||
+ | *KeyCode.SPACE : '''32''' | ||
+ | |||
+ | ==== Modifiers ==== | ||
+ | *KeyCode.SHIFT : '''16''' | ||
*KeyCode.CTRL : '''17''' | *KeyCode.CTRL : '''17''' | ||
+ | *KeyCode.ALT : '''18''' | ||
+ | |||
+ | ==== Navigation ==== | ||
+ | *KeyCode.HOME : '''400''' | ||
+ | *KeyCode.END : '''401''' | ||
+ | *KeyCode.INSERT : '''402''' | ||
*KeyCode.DELETE : '''403''' | *KeyCode.DELETE : '''403''' | ||
− | *KeyCode. | + | *KeyCode.PAGE_UP : '''404''' |
− | *KeyCode. | + | *KeyCode.PAGE_DOWN : '''405''' |
− | *KeyCode. | + | |
− | *KeyCode. | + | ==== Numpad ==== |
+ | *KeyCode.NUM0 : '''410''' | ||
+ | *KeyCode.NUM1 : '''411''' | ||
+ | *KeyCode.NUM2 : '''412''' | ||
+ | *KeyCode.NUM3 : '''413''' | ||
+ | *KeyCode.NUM4 : '''414''' | ||
+ | *KeyCode.NUM5 : '''415''' | ||
+ | *KeyCode.NUM6 : '''416''' | ||
+ | *KeyCode.NUM7 : '''417''' | ||
+ | *KeyCode.NUM8 : '''418''' | ||
+ | *KeyCode.NUM9 : '''419''' | ||
+ | *KeyCode.NUM_DIV : '''420''' | ||
+ | *KeyCode.NUM_MUL : '''421''' | ||
+ | *KeyCode.NUM_SUB : '''422''' | ||
+ | *KeyCode.NUM_ADD : '''423''' | ||
+ | *KeyCode.NUM_DOT : '''424''' | ||
+ | *KeyCode.NUM_ENTER : '''425''' | ||
+ | |||
+ | ==== F keys ==== | ||
*KeyCode.F1 : '''501''' | *KeyCode.F1 : '''501''' | ||
*KeyCode.F2 : '''502''' | *KeyCode.F2 : '''502''' | ||
Line 56: | Line 115: | ||
*KeyCode.F11 : '''511''' | *KeyCode.F11 : '''511''' | ||
*KeyCode.F12 : '''512''' | *KeyCode.F12 : '''512''' | ||
− | + | ||
− | + | ==== keyCode modifiers ==== | |
− | *KeyCode. | + | *KeyCode.MODIFIER_NONE : '''0''' |
− | + | *KeyCode.MODIFIER_SHIFT : '''1''' | |
− | *KeyCode. | ||
*KeyCode.MODIFIER_ALT : '''2''' | *KeyCode.MODIFIER_ALT : '''2''' | ||
*KeyCode.MODIFIER_CTRL : '''4''' | *KeyCode.MODIFIER_CTRL : '''4''' | ||
*KeyCode.MODIFIER_META : '''8''' | *KeyCode.MODIFIER_META : '''8''' | ||
− | *KeyCode. | + | |
− | + | ==== Mouse ==== | |
+ | *KeyCode.MOUSE_NONE : '''0''', ''Mouse button is not pressed'' | ||
*KeyCode.MOUSE_LEFT : '''1''', ''Left mouse button is pressed'' | *KeyCode.MOUSE_LEFT : '''1''', ''Left mouse button is pressed'' | ||
+ | *KeyCode.MOUSE_RIGHT : '''2''', ''Right mouse button is pressed'' | ||
*KeyCode.MOUSE_MIDDLE : '''4''', ''Middle mouse button or wheel is pressed'' | *KeyCode.MOUSE_MIDDLE : '''4''', ''Middle mouse button or wheel is pressed'' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{KeyCode}} | {{KeyCode}} |
Latest revision as of 13:50, 26 September 2023
Available since: Gideros 2011.6
Defined by: KeyCode
Description
GitHub:
- https://github.com/gideros/gideros/blob/master/libgid/include/ginput.h
- https://github.com/gideros/gideros/blob/master/luabinding/luaapplication.cpp#L664
Numbers (above the letters)
- KeyCode.NUM_0 : 48
- KeyCode.NUM_1 : 49
- KeyCode.NUM_2 : 50
- KeyCode.NUM_3 : 51
- KeyCode.NUM_4 : 52
- KeyCode.NUM_5 : 53
- KeyCode.NUM_6 : 54
- KeyCode.NUM_7 : 55
- KeyCode.NUM_8 : 56
- KeyCode.NUM_9 : 57
Letters
- KeyCode.A : 65
- KeyCode.B : 66
- KeyCode.C : 67
- KeyCode.D : 68
- KeyCode.E : 69
- KeyCode.F : 70
- KeyCode.G : 71
- KeyCode.H : 72
- KeyCode.I : 73
- KeyCode.J : 74
- KeyCode.K : 75
- KeyCode.L : 76
- KeyCode.M : 77
- KeyCode.N : 78
- KeyCode.O : 79
- KeyCode.P : 80
- KeyCode.Q : 81
- KeyCode.R : 82
- KeyCode.S : 83
- KeyCode.T : 84
- KeyCode.U : 85
- KeyCode.V : 86
- KeyCode.W : 87
- KeyCode.X : 88
- KeyCode.Y : 89
- KeyCode.Z : 90
Cursor
- KeyCode.LEFT : 37, Left cursor is pressed
- KeyCode.UP : 38, Up cursor is pressed
- KeyCode.RIGHT : 39, Right cursor is pressed
- KeyCode.DOWN : 40, Down cursor is pressed
Phone/Tablet
- KeyCode.BACK : 301
- KeyCode.SEARCH : 302
- KeyCode.MENU : 303
- KeyCode.CENTER : 304
- KeyCode.SELECT : 305
- KeyCode.START : 306
- KeyCode.L1 : 307
- KeyCode.R1 : 308
Functions
- KeyCode.BACKSPACE : 8
- KeyCode.TAB : 9
- KeyCode.ENTER : 13
- KeyCode.ESC : 27
- KeyCode.SPACE : 32
Modifiers
- KeyCode.SHIFT : 16
- KeyCode.CTRL : 17
- KeyCode.ALT : 18
- KeyCode.HOME : 400
- KeyCode.END : 401
- KeyCode.INSERT : 402
- KeyCode.DELETE : 403
- KeyCode.PAGE_UP : 404
- KeyCode.PAGE_DOWN : 405
Numpad
- KeyCode.NUM0 : 410
- KeyCode.NUM1 : 411
- KeyCode.NUM2 : 412
- KeyCode.NUM3 : 413
- KeyCode.NUM4 : 414
- KeyCode.NUM5 : 415
- KeyCode.NUM6 : 416
- KeyCode.NUM7 : 417
- KeyCode.NUM8 : 418
- KeyCode.NUM9 : 419
- KeyCode.NUM_DIV : 420
- KeyCode.NUM_MUL : 421
- KeyCode.NUM_SUB : 422
- KeyCode.NUM_ADD : 423
- KeyCode.NUM_DOT : 424
- KeyCode.NUM_ENTER : 425
F keys
- KeyCode.F1 : 501
- KeyCode.F2 : 502
- KeyCode.F3 : 503
- KeyCode.F4 : 504
- KeyCode.F5 : 505
- KeyCode.F6 : 506
- KeyCode.F7 : 507
- KeyCode.F8 : 508
- KeyCode.F9 : 509
- KeyCode.F10 : 510
- KeyCode.F11 : 511
- KeyCode.F12 : 512
keyCode modifiers
- KeyCode.MODIFIER_NONE : 0
- KeyCode.MODIFIER_SHIFT : 1
- KeyCode.MODIFIER_ALT : 2
- KeyCode.MODIFIER_CTRL : 4
- KeyCode.MODIFIER_META : 8
Mouse
- KeyCode.MOUSE_NONE : 0, Mouse button is not pressed
- KeyCode.MOUSE_LEFT : 1, Left mouse button is pressed
- KeyCode.MOUSE_RIGHT : 2, Right mouse button is pressed
- KeyCode.MOUSE_MIDDLE : 4, Middle mouse button or wheel is pressed