- Home /
How to check if key is pressed
So I need to check if a the left control key is pressed, here is how I am going about it..
Code - http://pastebin.com/cJCFHrju
I would really lvoe to know how to do this.. Any suggestions?
Comment
Answer by lvictorino · Sep 03, 2012 at 07:48 AM
if ( Input.GetKeyDown(KeyCode.LeftControl) == true )
Look at the documentation for Input class methods.
Glad to help. Never hesitate to look at documentation for this kind of question :)
As an FYI, Get$$anonymous$$eyDown()
returns a bool so you only need to put if ( Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.LeftControl))