input/WasKeyReleased

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Func |Name=WasKeyReleased |Parent=input |Description= |Realm=Client |IsClass=No }} ")
 
m (Also menu state)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|Name=WasKeyReleased
 
|Name=WasKeyReleased
 
|Parent=input
 
|Parent=input
|Description=
+
|Description=Returns whether a key was released in the same frame this function was called.
|Realm=Client
+
 
 +
This function only works in Move hooks, and will detect key releases even in main menu or when a typing in a text field.
 +
|Realm=Client and Menu
 
|IsClass=No
 
|IsClass=No
 +
}}
 +
{{Arg
 +
|type=number
 +
|name=key
 +
|desc=The key, see {{Enum|KEY}}.
 +
}}
 +
{{Ret
 +
|type=boolean
 +
|desc=True if the key was released the same frame that this function was called, false otherwise.
 
}}
 
}}

Latest revision as of 03:18, 24 July 2016

 input.WasKeyReleased( )

Description

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

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

Arguments

number key

The key, see KEY_ Enums.

Returns

boolean

True if the key was released the same frame that this function was called, false otherwise.
Personal tools
Navigation