Garry's Mod Wiki

Revision Difference

PANEL:OnKeyCodePressed#518824

<function name="OnKeyCodePressed" parent="PANEL" type="hook"> <ishook>yes</ishook> <description> Called whenever a keyboard key was pressed while the panel is focused. <bug issue="2886">This is not run for ESC/"cancelselect" binding.</bug> </description> <realm>Client</realm> <predicted>No</predicted> <args> <arg name="keyCode" type="number">The key code of the pressed key, see <page>KEY</page>.</arg> <arg name="keyCode" type="number">The key code of the pressed key, see <page>Enums/KEY</page>.</arg> </args> <rets> <ret name="" type="boolean">Return true to suppress default action.</ret> </rets> </function>