I think that's not the way it works. First you store the desired keypress in a variable.
- Code:
-
key_1 = ord('W');
key_2 = vk_down;
then you just check the variable whenever you want
- Code:
-
if keyboard_check(key_1)
{
//execute code
}
Arguments such as "vk_down", "vk_left" and such aren't strings you can display: they are constants. For example: true = 1. If you use "true" in a string, it will automatically display 1, and not "true".
So if you were to display "down" when the player presses W, execute for example:
(key_1 has been mapped to ord('W'))
- Code:
-
if keyboard_check(key_1)
draw_text(20,20,"down");
Study how the system works and it'll work just fine.