Garry's Mod Wiki

Garry's Mod Wiki

  boolean Player:KeyReleased( number key )

Description

Gets whether a key was just released this tick.

Arguments

1 number key
The key, see IN enum

Returns

1 boolean
Was released or not

Example

Prints whenever the first player first stops pressing +forward key (w on QWERTY keyboards).

hook.Add( "Tick", "CheckPlayer1Forward", function() if Entity( 1 ):KeyReleased( IN_FORWARD ) then print( "Player1 just stopped moving forward!" ) end end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...