Garry's Mod Wiki

input.LookupBinding

input.LookupBinding

  string input.LookupBinding( string binding, boolean exact = false )

Description

Returns the client's bound key for the specified console command. If the player has multiple keys bound to a single command, there is no defined behavior of which key will be returned.

Arguments

1 string binding
The binding name
2 boolean exact = false
True if the binding should match exactly

Returns

1 string
The first key found with that binding or no value if no key with given binding was found.

See also input.GetKeyCode.

Example

Demonstrates usage of this function and its arguments.

print( input.LookupBinding( "+use" ) ) print( input.LookupBinding( "use" ) ) print( input.LookupBinding( "+use", true ) ) print( input.LookupBinding( "use", true ) )
Output:
e e e no value

Special Pages


Wikis

?

Render Time: 24ms

DB GetPage 3
Generate Html 4
SaveChanges (1) 8
Render Body 0
Render Sidebar 7