How to Keep a Cat Off Your Keyboard and Laptop (Working From Home With a Cat)
We may earn a commission when you buy through links on this page, at no extra cost to you. Learn more
You sit down to work, and within minutes your cat is on the keyboard or lying across the trackpad. Here is how to keep a cat off your keyboard and laptop without punishment: why cats do it, how to give them a better spot right beside you, and what to do when you step away from the desk.
How we wrote this: the advice here follows PDSA’s How to stop cats jumping (which covers cats on desks and laptops), Battersea’s cat training and playing with your cat advice, and the Ohio State University Indoor Pet Initiative’s pages on resting areas, perches and grooming and temperature. For older cats we use PDSA’s vet-written pages on arthritis in cats and hyperthyroidism in cats. We put their advice in our own words; our own tips are marked “in our view”. All sources were checked on 9 November 2026. Rewards here are play, stroking and praise. We are not vets. We did not test any of the products named here ourselves, and we do not show prices or ratings.
Why cats love your keyboard and laptop
Battersea’s advice for any habit you want to change is to work out why your cat does it, then give them an alternative.
Warmth
The Ohio State Indoor Pet Initiative says cats cannot sweat well, so they seek shade when it is warm and warmth when it is cold, and indoor cats use bedding and blankets to manage their temperature. In our view, a laptop is a warm, flat surface that many cats cannot resist, especially in winter.
Attention
PDSA says cats may climb onto a surface because they want to be near you or to watch you while you are busy. When you work, your eyes and hands are on the keyboard all day. In our view, a cat soon learns that walking across it is the quickest way to get you to look at them.
Your scent and your space
In our view, a keyboard you touch all day smells of you. A desk is also higher than the floor, and PDSA notes that cats like being up high because it can help them feel safer.
Never punish, and skip the scare tactics
PDSA says never to punish a cat by shouting at or hitting them for being where they should not be, because it can make them stressed and afraid of you, and they will probably still go there when you are not around. It also warns against anything that frightens a cat as they leap up, since a panicking cat can injure itself. Battersea says cats should not be punished at all: they are unlikely to connect the punishment with what they did, and are more likely to become anxious and connect that feeling with you, so the problem can get worse.
In our view, that rules out spray bottles, shouting, pushing your cat off the desk, noise makers and deterrent mats as a plan. A frightened cat leaping off a desk can land badly or pull a laptop down with them.
Step 1: give your cat a better spot beside the desk
PDSA uses this very case as an example: for a cat that roams across your laptop or lies on your papers, it suggests a cat bed on a side table, so your cat stays close to you during the working day but out of your way.
- A bed at desk height. A small bed on a side table, a shelf or a spare chair right next to your work area, within reach of your hand. In our view, closer is better at first. Our guide to cat beds and window perches covers the choices, and how to get a cat to use a new cat bed helps if your cat ignores it.
- A window perch near the desk. The Indoor Pet Initiative says a perch gives cats a safe and private place to watch from above, and that every cat needs one. We list the K&H EZ Mount Window Bed.
- A heated bed for warmth seekers. If your cat goes for the warm laptop base, give them warmth somewhere else. A heated bed such as the K&H Thermo-Kitty is one option; our best heated pet bed guide explains the types. The Indoor Pet Initiative notes that snug blankets and towels appeal to many cats as much as a bought bed, so a folded fleece on the side table also works.
- A cat tree next to the desk. PDSA says cat trees give cats lots of levels to explore, and that you can put beds on them. We list the Feandrea multi-level cat tree; our best cat trees for indoor cats guide covers placement, and how to get a cat to use a cat tree helps if yours ignores it.
Step 2: make the new spot the best place near you
- Add your scent. In our view, a sweater or blanket you have worn, folded into the new bed, brings the smell your cat was looking for on the keyboard.
- Put toys there. PDSA suggests putting toys on the cat tree or shelves and rewarding your cat when they use them, with whatever they like best, such as playtime or stroking.
- Let the cat choose. The Indoor Pet Initiative says that if you cannot find a good spot for a perch, watch your cat, since they will show you where they feel comfortable, usually by curling up there.
Step 3: play before you start work
PDSA recommends plenty of play: it lets cats act on their instincts, can tire them out, and a cat who plays a lot with you is less likely to get bored and wander into places you would rather they stayed out of.
In our view, a short play session before you sit down, and again at lunch, is one of the simplest fixes for a keyboard cat. Battersea says a wand or “fishing rod” toy is ideal, moved in short bursts with pauses, like prey. Our guide on how to play with a cat using a wand toy covers how to run a session, and the GoCat Da Bird wand is the one we list.
For the hours when you are busy or out, see how to keep an indoor cat entertained while you are at work.
Step 4: move your cat calmly, then praise the right spot
PDSA says that if your cat is happy to be picked up, you can lift them onto the alternative spot when they are somewhere you do not want them, without making a fuss: move them quickly and gently, then ignore them afterwards. It also says to reward your cat when they use the spot you have given them.
- When your cat chooses the new spot by themselves, praise them softly and give them a stroke if they enjoy it. Battersea says some cats find stroking or a toy rewarding.
- Battersea’s advice for a cat who pesters for attention is to ignore the pestering as much as you can so you are not rewarding it. In our view, that means no chatting, laughing or long cuddles as you move your cat off the keyboard; save those for when they are in their own spot.
Be patient. PDSA says cats can be trained, but it takes time and plenty of encouragement.
Step 5: make the keyboard boring when you are away
PDSA says that when a cat simply walks over a surface or sleeps on it, blocking access can help, as long as the barrier stays in place all the time; if it only works while you are there, your cat will just go up when you are out.
- Close the laptop. In our view, the simplest habit: close the lid whenever you get up.
- Cover the keyboard. In our view, slide a desktop keyboard under the monitor stand or lay a closed folder over it when you step away.
- Clear the desk. PDSA says that an empty shelf with nothing on it is less fun for a cat.
- Close the door when you cannot supervise. If your desk is in a spare room, closing it while you are out is the simplest fix; see how to keep a cat out of a room.
Keep cables and the desk safe
In our view, tuck cables behind the desk and unplug spare chargers. Our guide on how to stop a cat chewing cords covers more.
Older cats: when a change needs a vet
In our view, if an older cat suddenly becomes much clingier, seeks heat far more than before, or will not settle anywhere, it is worth a vet check rather than more training.
- PDSA says arthritis is common in cats, and more so with age, and that cats are very good at hiding pain. Signs it lists include stiffness, difficulty jumping up to high places, sleeping and resting more, and being more irritable. It advises calling your vet if your cat is slowing down or you suspect arthritis.
- PDSA lists hyperthyroidism, a common condition in older cats, as causing weight loss, restlessness, and noisy and demanding behavior among its signs, and says it can be serious if left untreated.
If you notice any of these signs, or anything else that seems unusual for your cat, see your vet. If an older cat struggles to jump up to your desk, a lower bed or a step is kinder than a high perch; see how to set up your home for a senior cat.
Troubleshooting
- My cat walks across the keyboard to get somewhere else. PDSA notes cats may climb because a surface is a path to somewhere. In our view, check whether your desk is the route to a window or shelf, and give your cat another way up, such as a cat tree.
- My cat knocks things off the desk. See how to stop a cat knocking things off tables.
- My cat is on the counters too. The same ideas apply; see how to keep a cat off kitchen counters and how to keep a cat off the couch or bed.
FAQ
Why does my cat sit on my laptop?
Usually for warmth, attention, or to be close to you. A laptop is warm, smells of you and is exactly where your attention is.
How do I stop my cat walking on my keyboard?
Give your cat a bed or perch right beside the desk, play with them before you start work, move them calmly to their spot when they step on the keys, and praise them when they choose it themselves. Close the laptop or cover the keyboard whenever you leave the desk.
Is it bad for a cat to sleep on a laptop?
In our view, it is not a good habit: a cat can block the vents, and paws can type or delete things. A heated bed or blanket beside the desk is a safer warm spot.
Should I use a spray bottle or deterrent mat to keep my cat off the desk?
No. PDSA advises against anything that frightens a cat as they jump up, and Battersea says cats should not be punished, since they are more likely to become anxious and connect that with you. A better spot nearby works without the fear.