If you have a computer, your cat probably likes to walk across it or even lay across it, usually when you’re trying to use the computer for an important project with an impending deadline.
Generally, cats don’t walk or lay across keyboards because they want to annoy you (although that’s often a side benefit). Instead, cats see you constantly touching the keyboard so they figure if they lay across it, they’ll get your attention so you’ll play with them instead of doing something important that pays the bills and allows you to keep buying cat food.
To solve the problem of your cat walking across your keyboard, try putting a bed next to your keyboard so your cat can be near you and not get in the way. Either that or get two computer keyboards and let the cat lay on one while you use the other one.