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.

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

Page Links


Special Pages


Wikis

?

Render Time: 30ms

Session 0
DB GetPage 3
Generate Html 6
SaveChanges 8
Render Body 0
Render Sidebar 11