RightControl - LeftControl

Hi, I’m developing an input manager, and for some reason, when I want to detect the control key, it detects always the same key, eitherway if it is the right one or the left one.

here’s what i have On the Update function…

} else if(Input.GetKeyDown(KeyCode.LeftShift)){
lookingForKey = false;
return KeyCode.LeftShift;
} else if(Input.GetKeyDown(KeyCode.RightControl)){
lookingForKey = false;
return KeyCode.RightControl;
} else if(Input.GetKeyDown(KeyCode.LeftControl)){
lookingForKey = false;
return KeyCode.LeftControl;
}

for some reason when i press left control, it says me that i pressed right Control, and if i press right Control, it says the same…

any ideas? :slight_smile:

thanks!

Hmm that does sound odd…

As I don’t have a right control on my keyboard to test, I can only ask are you 100% sure you’re getting LeftControl when pressing RightControl? Have you tried logging each keypress result?

Are you trying this in the editor? I believe it works in a build… give that a shot. I think they know about it, but might want to file a bug just in case.

Cheers,
-Jon

No, I havent tryed this in a build, but I’ll try it, good suggestion, thanks !

Note that some keyboards simply do not support differentiating between left and right versions of some keys.

Just wanted to add that before you go completely bonkers over your code not working.