P.OnKeyCodePressed

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameOnKeyCodePressed
SyntaxPANEL:OnKeyCodePressed( Integer keycode )
DescriptionThis is called whenever the keyboard is pressed while the panel is visible. The keycode is an integer that corresponds to a keycode enumeration.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=P.OnKeyCodePressed]P.OnKeyCodePressed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


SHARED | 0000000000000000 | 00000000000000000 | KEY_FIRST
SHARED | 0000000000000000 | 00000000000000000 | KEY_NONE
SHARED | 0000000000000001 | 00000000000000001 | KEY_0
SHARED | 0000000000000002 | 00000000000000010 | KEY_1
SHARED | 0000000000000003 | 00000000000000011 | KEY_2
SHARED | 0000000000000004 | 00000000000000100 | KEY_3
SHARED | 0000000000000005 | 00000000000000101 | KEY_4
SHARED | 0000000000000006 | 00000000000000110 | KEY_5
SHARED | 0000000000000007 | 00000000000000111 | KEY_6
SHARED | 0000000000000008 | 00000000000001000 | KEY_7
SHARED | 0000000000000009 | 00000000000001001 | KEY_8
SHARED | 0000000000000010 | 00000000000001010 | KEY_9
SHARED | 0000000000000011 | 00000000000001011 | KEY_A
SHARED | 0000000000000012 | 00000000000001100 | KEY_B
SHARED | 0000000000000013 | 00000000000001101 | KEY_C
SHARED | 0000000000000014 | 00000000000001110 | KEY_D
SHARED | 0000000000000015 | 00000000000001111 | KEY_E
SHARED | 0000000000000016 | 00000000000010000 | KEY_F
SHARED | 0000000000000017 | 00000000000010001 | KEY_G
SHARED | 0000000000000018 | 00000000000010010 | KEY_H
SHARED | 0000000000000019 | 00000000000010011 | KEY_I
SHARED | 0000000000000020 | 00000000000010100 | KEY_J
SHARED | 0000000000000021 | 00000000000010101 | KEY_K
SHARED | 0000000000000022 | 00000000000010110 | KEY_L
SHARED | 0000000000000023 | 00000000000010111 | KEY_M
SHARED | 0000000000000024 | 00000000000011000 | KEY_N
SHARED | 0000000000000025 | 00000000000011001 | KEY_O
SHARED | 0000000000000026 | 00000000000011010 | KEY_P
SHARED | 0000000000000027 | 00000000000011011 | KEY_Q
SHARED | 0000000000000028 | 00000000000011100 | KEY_R
SHARED | 0000000000000029 | 00000000000011101 | KEY_S
SHARED | 0000000000000030 | 00000000000011110 | KEY_T
SHARED | 0000000000000031 | 00000000000011111 | KEY_U
SHARED | 0000000000000032 | 00000000000100000 | KEY_V
SHARED | 0000000000000033 | 00000000000100001 | KEY_W
SHARED | 0000000000000034 | 00000000000100010 | KEY_X
SHARED | 0000000000000035 | 00000000000100011 | KEY_Y
SHARED | 0000000000000036 | 00000000000100100 | KEY_Z
SHARED | 0000000000000037 | 00000000000100101 | KEY_PAD_0
SHARED | 0000000000000038 | 00000000000100110 | KEY_PAD_1
SHARED | 0000000000000039 | 00000000000100111 | KEY_PAD_2
SHARED | 0000000000000040 | 00000000000101000 | KEY_PAD_3
SHARED | 0000000000000041 | 00000000000101001 | KEY_PAD_4
SHARED | 0000000000000042 | 00000000000101010 | KEY_PAD_5
SHARED | 0000000000000043 | 00000000000101011 | KEY_PAD_6
SHARED | 0000000000000044 | 00000000000101100 | KEY_PAD_7
SHARED | 0000000000000045 | 00000000000101101 | KEY_PAD_8
SHARED | 0000000000000046 | 00000000000101110 | KEY_PAD_9
SHARED | 0000000000000047 | 00000000000101111 | KEY_PAD_DIVIDE
SHARED | 0000000000000048 | 00000000000110000 | KEY_PAD_MULTIPLY
SHARED | 0000000000000049 | 00000000000110001 | KEY_PAD_MINUS
SHARED | 0000000000000050 | 00000000000110010 | KEY_PAD_PLUS
SHARED | 0000000000000051 | 00000000000110011 | KEY_PAD_ENTER
SHARED | 0000000000000052 | 00000000000110100 | KEY_PAD_DECIMAL
SHARED | 0000000000000053 | 00000000000110101 | KEY_LBRACKET
SHARED | 0000000000000054 | 00000000000110110 | KEY_RBRACKET
SHARED | 0000000000000055 | 00000000000110111 | KEY_SEMICOLON
SHARED | 0000000000000056 | 00000000000111000 | KEY_APOSTROPHE
SHARED | 0000000000000057 | 00000000000111001 | KEY_BACKQUOTE
SHARED | 0000000000000058 | 00000000000111010 | KEY_COMMA
SHARED | 0000000000000059 | 00000000000111011 | KEY_PERIOD
SHARED | 0000000000000060 | 00000000000111100 | KEY_SLASH
SHARED | 0000000000000061 | 00000000000111101 | KEY_BACKSLASH
SHARED | 0000000000000062 | 00000000000111110 | KEY_MINUS
SHARED | 0000000000000063 | 00000000000111111 | KEY_EQUAL
SHARED | 0000000000000064 | 00000000001000000 | KEY_ENTER
SHARED | 0000000000000065 | 00000000001000001 | KEY_SPACE
SHARED | 0000000000000066 | 00000000001000010 | KEY_BACKSPACE
SHARED | 0000000000000067 | 00000000001000011 | KEY_TAB
SHARED | 0000000000000068 | 00000000001000100 | KEY_CAPSLOCK
SHARED | 0000000000000069 | 00000000001000101 | KEY_NUMLOCK
SHARED | 0000000000000070 | 00000000001000110 | KEY_ESCAPE
SHARED | 0000000000000071 | 00000000001000111 | KEY_SCROLLLOCK
SHARED | 0000000000000072 | 00000000001001000 | KEY_INSERT
SHARED | 0000000000000073 | 00000000001001001 | KEY_DELETE
SHARED | 0000000000000074 | 00000000001001010 | KEY_HOME
SHARED | 0000000000000075 | 00000000001001011 | KEY_END
SHARED | 0000000000000076 | 00000000001001100 | KEY_PAGEUP
SHARED | 0000000000000077 | 00000000001001101 | KEY_PAGEDOWN
SHARED | 0000000000000078 | 00000000001001110 | KEY_BREAK
SHARED | 0000000000000079 | 00000000001001111 | KEY_LSHIFT
SHARED | 0000000000000080 | 00000000001010000 | KEY_RSHIFT
SHARED | 0000000000000081 | 00000000001010001 | KEY_LALT
SHARED | 0000000000000082 | 00000000001010010 | KEY_RALT
SHARED | 0000000000000083 | 00000000001010011 | KEY_LCONTROL
SHARED | 0000000000000084 | 00000000001010100 | KEY_RCONTROL
SHARED | 0000000000000085 | 00000000001010101 | KEY_LWIN
SHARED | 0000000000000086 | 00000000001010110 | KEY_RWIN
SHARED | 0000000000000087 | 00000000001010111 | KEY_APP
SHARED | 0000000000000088 | 00000000001011000 | KEY_UP
SHARED | 0000000000000089 | 00000000001011001 | KEY_LEFT
SHARED | 0000000000000090 | 00000000001011010 | KEY_DOWN
SHARED | 0000000000000091 | 00000000001011011 | KEY_RIGHT
SHARED | 0000000000000092 | 00000000001011100 | KEY_F1
SHARED | 0000000000000093 | 00000000001011101 | KEY_F2
SHARED | 0000000000000094 | 00000000001011110 | KEY_F3
SHARED | 0000000000000095 | 00000000001011111 | KEY_F4
SHARED | 0000000000000096 | 00000000001100000 | KEY_F5
SHARED | 0000000000000097 | 00000000001100001 | KEY_F6
SHARED | 0000000000000098 | 00000000001100010 | KEY_F7
SHARED | 0000000000000099 | 00000000001100011 | KEY_F8
SHARED | 0000000000000100 | 00000000001100100 | KEY_F9
SHARED | 0000000000000101 | 00000000001100101 | KEY_F10
SHARED | 0000000000000102 | 00000000001100110 | KEY_F11
SHARED | 0000000000000103 | 00000000001100111 | KEY_F12
SHARED | 0000000000000104 | 00000000001101000 | KEY_CAPSLOCKTOGGLE
SHARED | 0000000000000105 | 00000000001101001 | KEY_NUMLOCKTOGGLE
SHARED | 0000000000000106 | 00000000001101010 | KEY_SCROLLLOCKTOGGLE
SHARED | 0000000000000106 | 00000000001101010 | KEY_LAST
SHARED | 0000000000000107 | 00000000001101011 | KEY_COUNT
SHARED | 0000000000000114 | 00000000001110010 | KEY_XBUTTON_A
SHARED | 0000000000000115 | 00000000001110011 | KEY_XBUTTON_B
SHARED | 0000000000000116 | 00000000001110100 | KEY_XBUTTON_X
SHARED | 0000000000000117 | 00000000001110101 | KEY_XBUTTON_Y
SHARED | 0000000000000118 | 00000000001110110 | KEY_XBUTTON_LEFT_SHOULDER
SHARED | 0000000000000119 | 00000000001110111 | KEY_XBUTTON_RIGHT_SHOULDER
SHARED | 0000000000000120 | 00000000001111000 | KEY_XBUTTON_BACK
SHARED | 0000000000000121 | 00000000001111001 | KEY_XBUTTON_START
SHARED | 0000000000000122 | 00000000001111010 | KEY_XBUTTON_STICK1
SHARED | 0000000000000123 | 00000000001111011 | KEY_XBUTTON_STICK2
SHARED | 0000000000000146 | 00000000010010010 | KEY_XBUTTON_UP
SHARED | 0000000000000147 | 00000000010010011 | KEY_XBUTTON_RIGHT
SHARED | 0000000000000148 | 00000000010010100 | KEY_XBUTTON_DOWN
SHARED | 0000000000000149 | 00000000010010101 | KEY_XBUTTON_LEFT
SHARED | 0000000000000150 | 00000000010010110 | KEY_XSTICK1_RIGHT
SHARED | 0000000000000151 | 00000000010010111 | KEY_XSTICK1_LEFT
SHARED | 0000000000000152 | 00000000010011000 | KEY_XSTICK1_DOWN
SHARED | 0000000000000153 | 00000000010011001 | KEY_XSTICK1_UP
SHARED | 0000000000000154 | 00000000010011010 | KEY_XBUTTON_LTRIGGER
SHARED | 0000000000000155 | 00000000010011011 | KEY_XBUTTON_RTRIGGER
SHARED | 0000000000000156 | 00000000010011100 | KEY_XSTICK2_RIGHT
SHARED | 0000000000000157 | 00000000010011101 | KEY_XSTICK2_LEFT
SHARED | 0000000000000158 | 00000000010011110 | KEY_XSTICK2_DOWN
SHARED | 0000000000000159 | 00000000010011111 | KEY_XSTICK2_UP


Examples

DescriptionN/A
Used onNewerMissing.png
Code
LuaIco3.pngThis page needs an example to demonstrate the item detailed on this page. See how to make one here.
See more articles that need examples here.
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox