Check if there is a keyboard input (not a specified key input)

Since Input.anyKey indicates mouse input as well, and Input.inputString only contains visiable characters, I can’t find out the way to check whether there is a keyboard input correctly except for checking KeyCode one by one.
So what’s the correct way to do so?

This isn’t what was asked for and this is exactly what I am looking out for too. Any key pressed on the keyboard should be detected. Input.anyKey includes mouse click unfortunately.

LeeroyLin just specifies the keycode here

// Press A
if(Input.GetKeyDown(KeyCode.A)){
}

// Press A always
if(Input.GetKey(KeyCode.A)){
}

// Don't press A anymore
if(Input.GetKeyUp(KeyCode.A)){
}