|To stop your cat from walking across your computer keyboard, you may be able to use the same methods that can be successful at keeping cats off of the counter.
If you see the cat starting to jump up on the desk with the keyboard, you can throw a pop can filled with a few coins and taped shut, toward the cat. We do not want to hit the cat, but want to startle him so he stops what he is doing. This works fine if we are waiting for him, but not when we are not in the room.
There are several devices available commercially which may be helpful. Large plastic devices which look like mousetraps can be placed on the desk near the keyboard, and when the cat jumps on them, the paddle will slap making a loud, scary noise. There may be other items your particular cat does not like because of the sound they make, e.g., cans of air used to clean computer keyboards. Some cats may even come to associate the hissing sound of the air with the sight of the can, and avoid going near the can (which can be conveniently placed next to the keyboard).
Hard plastic keyboard covers are also available. The cover simply goes over your keyboard when it is not in use.
Remember, though, by keeping your cat off the keyboard, you will never know if she has some hidden literary talent!