Hello, 
So the problem is, I am creating a simple game in Excel&VBA with two players, each player needs to control four keys. For the first player, I used the four direction keys and Application.OnKey function, like this:
Sub DeclareKeys()
Application.OnKey "{UP}", "Move_up"
Application.OnKey "{DOWN}", "Move_down"
Application.OnKey "{LEFT}", "Move_left"
Application.OnKey "{RIGHT}", "Move_right"
End Sub
But for the second player, I have to use those letter keys like "w, s, a, d" to trigger macros, but I cannot use Application.OnKey for those keys. I can also assign shortcut using "Ctrl + w", "Ctrl + d" ..., but that is not user-friendly for the player, and also the input from the direction keys combining the "Ctrl" will have some other negative effects.
So basically, how to trigger a macro with only a letter key, without "Ctrl" or anything else?
Thank you so much!

So the problem is, I am creating a simple game in Excel&VBA with two players, each player needs to control four keys. For the first player, I used the four direction keys and Application.OnKey function, like this:
Sub DeclareKeys()
Application.OnKey "{UP}", "Move_up"
Application.OnKey "{DOWN}", "Move_down"
Application.OnKey "{LEFT}", "Move_left"
Application.OnKey "{RIGHT}", "Move_right"
End Sub
But for the second player, I have to use those letter keys like "w, s, a, d" to trigger macros, but I cannot use Application.OnKey for those keys. I can also assign shortcut using "Ctrl + w", "Ctrl + d" ..., but that is not user-friendly for the player, and also the input from the direction keys combining the "Ctrl" will have some other negative effects.
So basically, how to trigger a macro with only a letter key, without "Ctrl" or anything else?
Thank you so much!