Garry's Mod Wiki

CUserCmd:KeyDown

  boolean CUserCmd:KeyDown( number key )

Description

Returns true if the specified button(s) is pressed.

Arguments

1 number key
Bitflag representing which button to check, see IN enum.

Returns

1 boolean
Is key down or not