- Home /
keycode values for greater than and less than
I'm trying to use the greater than > and less than < as inputs but keycode.greater and keycode.less don't appear to do anything.
I also tried to following code to capture shift and period but that didn't fire either.
if (Input.GetKeyDown(KeyCode.Period) && (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift))) SendCommand(COMMAND.DESCENDSTAIRS);
Answer by Owen-Reynolds · Dec 17, 2012 at 11:07 PM
GetKeyDOWN checks for a key that went from up to down that frame. GetKey checks for "being held down." So, removing the DOWN from the shift checks should take care of it.
Plus, to test, `Debug.Log` some of the values, to see what isn't firing when you thought it should.
Your answer
![](https://koobas.hobune.stream/wayback/20220613085556im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
gui.button to enable keypress 2 Answers
Stimulate key press via a GUITexture 0 Answers
How do I open a GUI on key press? 1 Answer
How to make a key stored, without using OnGUI 1 Answer
Multiple button name in a row? 1 Answer