x


control key question

how do you write to the control key I couldnt find it in the manual

more ▼

asked Mar 02 '10 at 04:30 AM

user-1431 (google) gravatar image

user-1431 (google)
49 8 9 10

(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

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

more ▼

answered Mar 02 '10 at 04:49 AM

Motionreactor gravatar image

Motionreactor
395 1 5 16

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

Mar 02 '10 at 05:02 PM user-1431 (google)
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x954
x195

asked: Mar 02 '10 at 04:30 AM

Seen: 2443 times

Last Updated: Mar 02 '10 at 10:04 AM