You probably wouldn't have seen much (if anything) directly relating to the mouse or keyboard in the registry entries- what Puckdropper was alluding to is that there might be some other program/process automatically starting when Windows starts which is contributing to or causing the problems. The "Run" entries in the registry are what control the auto-loading of such programs.
"i've also gone into safe mode and there doesn't seem to be any hardware conflicts..."
Meaning that there are no yellow "exclamation point" symbols or red "X"s next to any of the devices, yes? If the mouse and keyboard work in safe mode and Device Manager indicates no hardware problems, you almost certainly have a software conflict.
"To solve this problem I uninstalled Windows XP and because the previous version (Windows 98) was there I was able to use the computer as usual as it was back to its previous state."
The upgrade/downgrade process might not have gone as flawlessly as it might have appeared. I hate to suggest this, but do you have the option of backing up your data and reinstaling Win 98 from scratch? Considering that none of us can sit down in front of your computer and get a first-hand look at what's going on, that might be the less time-consuming way to go.