0

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.

Deekay
  • 101
  • C# (ish) version - https://gist.github.com/t-mat/8771347 – stuartd Apr 13 '22 at 01:19
  • Thanks for the link stuartd, but I'm looking for pure C# code, not a Powershell script, or a way to call an external .dll to handle this. – Deekay Apr 13 '22 at 16:40
  • That actually _is_ pure C#, it just shows it being called from Powershell – stuartd Apr 13 '22 at 16:59
  • @stuartd It might be C#, but it's not pure C# because it relies on an external .dll file. Perhaps we have an other definition of pure, but your suggestion doesn't work for me. – Deekay Apr 13 '22 at 23:05
  • Oh, I see. I didn’t consider user32.dll as an ‘external’ file as it’s part of Windows. But I’m confused as to how you think you can accomplish this without using PInovoke on Windows, as there’s no way in C# to change the repeat rate? – stuartd Apr 14 '22 at 01:29

0 Answers0