Garry's Mod Wiki

Garry's Mod Wiki

  boolean input.IsKeyDown( number key )

Description

Gets whether a key is down.

Arguments

1 number key
The key, see KEY enum.

Returns

1 boolean
Is the key down

Example

Show cursor if you press alt.

-- Note this may prevent the cursor from naturally appearing without alt hook.Add( "Think", "BM_Clients_Key", function() gui.EnableScreenClicker( input.IsKeyDown( KEY_LALT ) ) end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...