Garry's Mod Wiki

input.IsKeyDown

input.IsKeyDown

  boolean input.IsKeyDown( number key )

Description

Gets whether a key is down.

Arguments

1 number key
The key, see Enums/KEY.

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 )

Special Pages


Wikis

?

Render Time: 45ms

DB GetPage 26
Generate Html 4
SaveChanges (1) 5
Render Body 0
Render Sidebar 7