Input.GetKeyUp ignores alternative buttons...

I want to make a script to move around in 4 directions and use something like:

if (Input.GetKeyUp ("up")) {
	Debug.Log ("Key: W - forward");
}

In my projects input settings are for each direction (up down left right) alternative buttons defined ( w s a d), but they are simply ignored. Only cursor input works. Why?

What do I have to do to make my script catch w a s d input as well as cursor keys?

1 Answer

1

Read the descriptions of GetButton and GetKey.

(You need to use GetButton)

Right GetKey works directly with key names, not with virtual axes.