input.IsKeyDown

From Garry's Mod
Jump to: navigation, search
 input.IsKeyDown( )

Contents

Description

Gets whether a key is down

Arguments

number key

The key, see KEY_ Enums.

Returns

boolean

Is the key down

Examples

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


Personal tools
Navigation