i havent really worked with key structures but the basic answer is that you will need a way to tell your script that string X means Key X. the engine doesn’t have everything built in so this is where we as the users need to come up with a way to make it work.
off the top of my head theres a few things to try but its not super elegant. basically you can do some comparisons like does string W equal the display name of key W if yes then set that key to the struct (or whatever your doing with it). or you could save the W as a string to the struct and then check it against the key when the key is pressed somewhat like what i did in the video.
those are just a few quick ideas off the top of my head.