Can't trigger KeyCode.Plus

        void Update()
        {
            if (Input.GetKey(KeyCode.Plus))
            {
                if (currZoomLevel == 5) return;
                Log($"Plus Zoom, Now Zoom Level: {currZoomLevel}");
            }
            else if (Input.GetKey(KeyCode.Minus))
            {
                if (currZoomLevel == 0) return;
                Log($"Minus Zoom, Now Zoom Level: {currZoomLevel}");
            }
        }

Minus Zoom is triggered, but not Plus Zoom. I pressed Keypad + as well as Shift and + on the main part of the keyboard. What am I doing wrong?

Here’s the keypad plus: +
Here’s the normal plus: +
I think they’re same, and should react the same.

What we see isn’t what the hardware sees. The hardware sees them as completely different keys. Additionally the reason it’s not working is because it’s not “Plus” but rather “Equals” (because the secondary function isn’t the identifier for the key) therefore you need to use KeyCode.Equals to have it register. For the keypad you need to use KeyCode.KeypadPlus.

1 Like

That does raise the question as to why there’s a KeyCode.Plus.