Convert keycode to string

Hi there,

I am wondering about how to convert KeyCode to string. I need to save certain keys in KeyCode as their string representative in a string array that I will later save as System.IO.File.WriteAllLines(@“whatever”);

Just basicly saving some configuration as a controll system and just don’t want to copy some random work on internet.

Thx

Nevermind, I found a sollution.

for those who are still wondering like I was:

KeyCode kcode;
string keyCode;

void Convert() {
     keyCode = kcode.toString(); //or_.ToString,_not_sure_now...
}

I innitially used .toString(kcode);, which is obviiously wrong. Sorry for spamming you.

This does not work