I have a problem with my keyboard, sometimes it sends “mm” when I press “m”. I’ve tried to change the switch, but it did not help. Can I fix it in software somehow? I’ve already tried to assign a macro with keypress and delay to this button, did not help…
set debounceDelay <time in ms, at most 250>
prevents key state from changing for some time after every state change. This is needed because contacts of mechanical switches can bounce after contact and therefore change state multiple times in span of a few milliseconds. Official firmware debounce time is 50 ms for both press and release. Recommended value is 10-50, default is 50.
But I’d have a look at the hot swap socket in question if I were you. I had the same problem and it was caused by the loosening of metal plates that hold the pin of a switch. I used a needle to carefully bring them closer together and the problem was gone. But you have to disassemble the half as these metal plates are only accessible from behind the PCB.
With switch problems, it often helps to just pull out the switch, bend its pins a little and put back again. (It tensions the pins against the hotswap socket, thus improving the contact.)