Hi,
how to check if the user is pressing two or more buttons at same times ?!
like Ctrl+1 ,i’v tried :
if (Input.GetKey(“left ctrl”) Input.GetKey(“1”))
but it doesn’t work even if both conditions works perfect individually .
thanks.
Hi,
how to check if the user is pressing two or more buttons at same times ?!
like Ctrl+1 ,i’v tried :
if (Input.GetKey(“left ctrl”) Input.GetKey(“1”))
but it doesn’t work even if both conditions works perfect individually .
thanks.
have you tried this:
if (Input.GetKey(“left ctrl”)){
if(Input.GetKey(“1”)){
}
}
not working as well !
Hmm, how about GetButton, would it work with it? You’ll have to define new buttons in the Input though.
I know with some plugins (Flash/Silverlight) on some browsers (#*$ Internet Explorer), browser shortcuts will be captured by the browser before being sent to the plugin. Perhaps CTRL+1 is one of them? Try a simpler one that wouldn’t be a shortcut (A + D)
EDIT: Also, I’m not sure if “left ctrl” is the right text as I’ve never used the string representations. Try using the KeyCode enumeration “KeyCode.LeftControl”, per Unity - Scripting API: KeyCode
if (Input.GetKey(KeyCode.LeftControl)){
u were right FizixMan, i’v tried two simple keys and it works …but Ctrl+“something” still needed since that combo is familiar for evrybody .
thanks gys …