Garry's Mod Wiki

input.WasKeyTyped

  boolean input.WasKeyTyped( number key )

Description

Returns whether the key is being held down or not.

This function only works in Move hooks, and will detect key events even in main menu or when a typing in a text field.

Arguments

1 number key
The key to test, see KEY enum

Returns

1 boolean
Whether the key is being held down or not.