You would only need to replace the battery if the computer is unable to keep its configuration settings. You would know this if after you set the time and then unplug the computer. When you turn it back on the time is incorrect. Or the configuration has gone back to the defaults.
Id suggest that you change the keyboard.