How to determine if a keyboard key or a mouse key was pressed?

Input.anyKey return true if a keyboard or mouse button was pressed.
How can I tell if only a keyboard button was pressed?

The example in the documentation

 function OnGUI() {
     var e : Event = Event.current;
     if (e.isKey) {
         Debug.Log("Detected key code: " + e.keyCode);

Will detect keyboard but not mouse. I just tried it.

Jus use && in your if sentence:

if (Input.anyKey && Input.GetKeyUp(Your_Key_Code)) {

if (Input.anyKey && Input.GetKey(KeyCode.Mouse0)) {