KeyCode.Comma and KeyCode.Less are seen as the same?

Running into a problem. I need to use , (Comma) for a function in my roguelike, and I need to use < (Less) to go down stairs.

For some reason Unity can only see the comma? If I do Keycode.Less it still only registers it as Keycode.Comma.

If I simply try GetKey(“<”) that doesn’t work, either.

What am I missing? I need to use all the shiftable characters in my game.

Maybe use Event modifiers to detect if user is holding shift?

Thanks.

This code seems to work, which is… kind of sad. But it works. # is Shift so #, is shift ,

void OnGUI(){
//
// Check stairs to exit
//
if (Event.current.Equals(Event.KeyboardEvent(“#,”)){
Application.LoadLevel (“Level 2”);
}
}

Not sure why Input.GetKey(KeyCode.Less) and Input.GetKey(“<”) doesn’t work. Is this a new bug? Surely it hasn’t been broken since Unity 1.0?

KeyCode.Less is the same key as KeyCode.Comma on most keyboards. Not a bug. “These map directly to a physical key on the keyboard” as the docs say. You can use Event.current.character if you want to see the character that’s entered rather than which key was pressed. I’d recommend that rather than checking for shift-comma since that’s not necessarily the < symbol, depending on the keyboard.

–Eric