Windows ASCII to vk_names

S

Steve Gal

Guest
Hello there, I am trying to finish my key rebinding menu for my next game.

Now my problem is I am trying to show the player the current keybindings, and obviously what it was changed to once they are finished.

I have finished all the rebinding functionality but I cannot find any way to display the values of the key variables in their vk_shift, vk_tab etc format. I do know about the chr(76) function but that obviously only shows ASCII values that are single characters, shift, space, function keys all don't translate.

So my question, is there any way to show the build in values like vk_shift, vk_tab etc, or do i have to code my own ASCII to something humanly readable?

thank you in advance.
 

jo-thijs

Member
Hi and welcome to the GMC!

Unfortunately, there's no built-in functionality to do this in GameMaker.

However, this is a thing so many people have needed already, so there are a lot of scripts out there you can copy paste.

Here's an example:
http://pastebin.com/2KT0nj5r
 
S

Steve Gal

Guest
That is great, exactly what I was looking for.

Thank you very much.
 
Top