If your wireless keyboard is laggy, as with all wireless accessories, change the batteries first.

Make sure you put the batteries is correctly.

After you change the batteries, you may have to resync your keyboard. First, just try to put some new batteries in and use it. If it doesn't work, flip the keyboard over. If you see a green or red 'sync' button, find the receiver for that device, which you would normally find on your desk, behind a monitor or tied up under the desk. Press both the sync button on your keyboard and the receiver at the same time, and the mouse should be good to use again. 

If you replace the battery for the keyboard and it is still malfunctioning, it may be due for replacement..