Garry's Mod Wiki

input.IsButtonDown

  boolean input.IsButtonDown( number button )

Description

Gets whether the specified button code is down.

Unlike input.IsKeyDown this can also detect joystick presses from Enums/JOYSTICK

Arguments

1 number button
The button, valid values are in the range of Enums/BUTTON_CODE.

Returns

1 boolean
Is the button down