Input.GetKeyDown("backspace")

Hi there,

I’ve sent this bug through the bug tracker and also posted in the scripting forum but I haven’t heard anything from the Unity team about this issue and it has been weeks. Usually they are quite responsive. I thought I’d post again here in case I had the wrong forum.

In any case, I’m trying to use GetKeyDown to recognize when backspace has been pressed. So, I use Input.GetKeyDown(“backspace”) and it works but only if you are running the game inside the editor. If I build a target, any target, and try it, it doesn’t recognize that key. I’m assuming there is a problem with all system keys although I haven’t tried other keys.

Does anyone know if/when this issue will be fixed or even a work around to this problem? It is kind of a show stopper for me.

Thanks,

-Rob.

It’s not a problem for all system keys, just backspace (that I know of). But yeah, it happens here too. Here’s a workaround:

function Update () {
	if (Input.inputString == "\b") {
		print ("Backspace!");
	}
}

Of course, that happens every frame, so it’s like GetKey…you have to code your own KeyDown behavior if you want that instead.

–Eric

That work-around is good enough for me. Thank you for your help!

Cheers,

-Rob.

Sneaky sneaky. Nice one, Eric. :slight_smile: