After adjusting the settings in the control panel, if it still works poorly, get a new one.

Keyboards are super cheap.