If you have a cat and a computer,, especially a laptop, you’ll find that your cat inevitably seems drawn to sprawl across your keyboard. One reason for this is that the keyboard is often warm, especially on laptop computers. Another reason is that cats see you staring at the computer so they want your attention too.
To keep your cat off your keyboard, try playing with your cat before you sit down to work. That way your cat gets your attention and (hopefully) will leave you alone (don’t count on it). Then again, you could always get two laptops, one for your cat and one for you, then switch off between the two of them depending on which one your cat lays on.