Hello,
I’m using this code to get the pressed key’s keycode for a keyboard rebind system:
private void OnGUI()
{
Event e = Event.current;
if (e.isKey && IsChangingKey && IsKeyUsable(e.keyCode))
{
IsChangingKey = false;
newKey = e.keyCode;
}
}
And while testing my game I found that this way isn’t returning the “Physical Key” value of the pressed key.
I was just wondering how can we get, if we can, the “Physical Key” value of a KeyCode.
In my Unity editor I’ve checked on the “Use Physical Key” checkbox.