- Home /
Question by
Reclusiarch · Mar 02, 2014 at 12:59 AM ·
c#inputinputmanager
Input does not seem to recognize + and - keystrokes
if (Input.GetKeyDown(KeyCode.Plus))
{
Debug.Log("Released");
}
if (Input.GetKeyUp(KeyCode.Plus))
{
Debug.Log("Pressed & Released");
}
yah that is not happening.....KeyCode.Up works tho.... I want to use the + - keys.... in C# .Net its KeyCode.Oemplus - but that is not available here
Comment
http://answers.unity3d.com/questions/249339/problem-with-keycodeplus.html
$$anonymous$$eyCode.$$anonymous$$eypadPlus should work for the num pad.
Yes that does help! But my keyboard also has + and - near the number keys. These are described by .Net as Oemplus Oem$$anonymous$$us... I would love to have these used as well.
As I wrote, $$anonymous$$eyCode.$$anonymous$$eypadPlus works. So you can say:
if (Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.$$anonymous$$eypadPlus) || Input.Get$$anonymous$$eyDown($$anonymous$$eyCode.Equals)) {
Debug.Log("$$anonymous$$ey with plus hit");
}
Your answer
Follow this Question
Related Questions
key remaping menu 0 Answers
Virtual joystick in the new input system 0 Answers
New Unity Input System Touch Controls - Destroying GameObjects On Mobile 1 Answer
Finite State Machine 1 Answer