Garry's Mod Wiki

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 )

Page Links


Special Pages


Wikis

?

Render Time: 87ms

DB GetPage 14
Generate Html 3
SaveChanges (1) 55
Render Body 0
Render Sidebar 12