Garry's Mod Wiki

input.WasKeyPressed

Description

Returns whether a key was initially pressed in the same frame this function was called.

This function only works in Move hooks, and will detect key presses even in main menu or when a typing in a text field.

Arguments

1 number key
The key, see Enums/KEY.

Returns

1 boolean
True if the key was initially pressed the same frame that this function was called, false otherwise.

Page Links


Special Pages


Wikis

?

Render Time: 41ms

DB GetPage 5
Generate Html 3
SaveChanges (1) 17
Render Body 0
Render Sidebar 12