Yesterday I posted the question below (see How to change the keyboard repeat rate in C#) but it was marked as duplicate and closed. However, I believe the question isn't a duplicate (I'm not asking how to change the keyboard repeat rate in general, I'm specifically asking for a way to handle it in C#), nor was it answered (the answers in the linked question, How can I increase the key repeat rate beyond the OS's limit?, are useless, and the code provided in a comment is neither C# nor readable enough to convert into C#). Hence, I was forced to asked my question again.
In short, the question was closed, but alas I have not received an answer.
My original question was: In Windows it is possible to change the keyboard repeat rate by going to the control panel, keyboard settings, and adjusting the slider for the keyboard repeat rate.
Because I need (very) different keyboard repeat rates in various self-written programs I'm using at the same time, I need to be able to quickly change the repeat rate.
Is there a way to do this programmatically in C#? This way, I could add a button in each of the programs to quickly set the ideal repeat rate for said software, without having to keep the control panel open.