Garry's Mod Wiki

Revision Difference

input.LookupBinding#529009

<function name="LookupBinding" parent="input" type="libraryfunc"> <description>Gets the match uppercase key for the specified binding.</description> <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.</description> <realm>Client and Menu</realm> <args> <arg name="binding" type="string">The binding name</arg> <arg name="exact" type="boolean" default="false">True if the binding should match exactly</arg> </args> <rets> <ret name="" type="string">The first key found with that binding or no value if no key with given binding was found. See also <page>input.GetKeyCode</page>.</ret> </rets> </function> <example> <description>Demonstrates usage of this function and its arguments.</description> <code> print( input.LookupBinding( "+use" ) ) print( input.LookupBinding( "use" ) ) print( input.LookupBinding( "+use", true ) ) print( input.LookupBinding( "use", true ) ) </code> <output> ``` e e e no value ``` </output> </example>