You can use this to get the string value that closest represents the key you have assigned to an action.
Example:
public string interactkey = Input.GetButtonOrigin("use");
//In my case, "use" is assigned to the E key in my game settings. So this sets interactkey to "E".