Answers for "unity how to check keyboard input"

C#
1

c# unity detect any keyboard input

// Detect any keyboard input but not mouse input
private void Update()
{
	if (Input.anyKeyDown && !(Input.GetMouseButtonDown(0) 
    	|| !Input.GetMouseButtonDown(1) || !Input.GetMouseButtonDown(2)))
	{
    	Debug.Log("No mouse pressed!");
	}
}
Posted by: Guest on December-06-2021
0

how to get keyboard input in unity

//https://docs.unity3d.com/ScriptReference/KeyCode.html - ALL KEYCODES
Posted by: Guest on February-11-2021

Code answers related to "unity how to check keyboard input"

C# Answers by Framework

Browse Popular Code Answers by Language