It's hard to say on the information here, but questions you might ask are:

Is there anything running in the background that might be blocking it? Third-party tools or drivers?

Are you up-to-date with all your patches and is your anti-virus stuff working?

If your KB and mouse are USB devices then normally, just disconnecting them and plugging back in should do the trick.