- Home /
control key question
how do you write to the control key I couldnt find it in the manual
Answer by Motionreactor · Mar 02, 2010 at 04:49 AM
You can't 'write' to the control keys... but you can read them:
function Update () {
if(Input.GetKeyDown(KeyCode.LeftControl))
{
// do something
}
}
You can get the names of these keys from:
http://unity3d.com/support/documentation/ScriptReference/KeyCode.html
Scripting reference is:
http://unity3d.com/support/documentation/ScriptReference/Input.GetKeyDown.html
Im use to just writing to the control key where it doesnt matter which one you press. when I saw left control. I thought it meant. the left arrow key and control. that had me all confused
Your answer
Follow this Question
Related Questions
Keyboard Input Question 1 Answer
Keyboard Input Problem 1 Answer
Input.GetKeyDown doesn't work with several keys 1 Answer
checking for keyboard input with exceptions 0 Answers
What just happened to my Unity!? 3 Answers