Event.KeyCode not detecting mouse click
Hello,
I have a GUI button system which I intend to use to set a player's hot key preferences. The function(s) for detecting what the KeyCode is of a player's input are as follows;
public void WhichKeyDown()
{
e = Event.current;
if ((e.isKey | e.isMouse) & Input.GetKeyDown(KeyCode.None) != true)
CurrentKeyDown = e.keyCode;
Debug.Log(CurrentKeyDown);
}
Unfortunately, while keyboard values are always observed (ex. Output "S" is caused by pressing the S key), mouse KeyCodes only output as "None".
The unity documentation clearly states there are KeyCodes for all mouse events (Mouse0, Mouse1, etc). Could someone tell me why this is occurring?
Your answer
Follow this Question
Related Questions
(4.6 UI) How to detect mouse over on button? 3 Answers
My script for my buttons doesn't seem work? HELP! 0 Answers
How to unable player to move on GUI buttons 0 Answers
Efficient way to use UGui.Overlap for a GUI Mouse 0 Answers
Can't disable Mouse wheel's navigation actions,Can't disable Mouse wheel's navigation 0 Answers