18

My feral kitty (isn't feral anymore), Shorty, loves to sit in front of my gigantic old beast of a laptop for the heat and to keep an eye on my cursor. But when I'm not looking or want to hear music he'll stealthily cross my keyboard to slap down that little arrow or cursor. A decoy keyboard doesn't work even with a heating pad on low under the decoy. Is there a way to just turn off my keyboard without shutting down my computer? If not, why? It seems like it would be such a asset to all laptop users.

12 Answers 12

26

Most operating systems (Windows, Mac, Linux) have some means of manually locking the screen. This will engage the screen saver (if you have one set) and require password entry before the system will respond to other inputs.

I don't know a way to make the screen saver ignore keyboard input, but I can't swear there isn't a setting for that -- try looking in the screen saver settings.

An alternative for laptops is that you could set your power management to "do nothing" when the lid is closed, and just close the lid when you walk away. Shorty will still have his warm spot, but the keyboard will be protected.

  • There's probably not a software method of getting it to ignore all keyboard input, simply because that would mean there would be no way of getting out of that mode with keyboard inputs. – Acccumulation Jun 21 '18 at 22:15
  • 3
    This might be problematic if the OS locks the account after 3 failed logins, and your cat hits enter/return often enough. – iHaveacomputer Jun 22 '18 at 3:01
  • 2
    I've never seen this for the console keyboard in 30+ years running DOS, Windows, and Linux. It's common for remote access, but this question isn't about remote access. – Zeiss Ikon Jun 22 '18 at 11:08
  • 1
    Closing lid without sleeping is generally bad from a heat dissipation standpoint. – R.. Jun 23 '18 at 16:37
  • 1
    @R.. but what about putting cat on keyboard without sleeping, isn't that also bad for heat dissipation. – GoFundMonica - codidact.org Jun 24 '18 at 11:01
22

BabySmash was created to allow a baby to smash away at a keyboard without doing any harm to the computer. It also draws nice patterns to keep baby amused. It may not amuse your cat but it should protect your computer. Have a look at BabySmash.com. Note: this is a Windows solution.

  • 4
    You might want to edit your answer to say that this is a Windows solution. – Ben Crowell Jun 23 '18 at 16:17
  • 4
    @Ben The FAQ even says "It's a copy/homage of the very fine and free AlphaBaby for the Macintosh", so I'd say we got two out of 3 covered here. And Linux obviously has the always popular text console that has confounded more than one person who unintentionally ended up there ;) – Voo Jun 23 '18 at 17:41
  • An alternative is also bitboost.com/pawsense (for pets). I don't know how well this works and the only feline I have doesn't get into the bedroom. And no children to try this with too. (And a mac alternative method: mackungfu.org/cat-proofing-a-macbook-keyboard) – Ismael Miguel Jun 24 '18 at 11:31
11

On Linux, Ctrl+Alt+F2 to switch to a text console is pretty bulletproof. Only way back to the VC where you're logged in is Ctrl+Alt+F1 or F7, or alt+/.

Or if your cat knows your password and can log in and run sudo chvt :P

But beware that Ctrl+Alt+Del will trigger a (safe) reboot with no prompt for confirmation, like shutdown -r now. Alt+SysRQ+B will hard-reboot instantly, but this still works when X is running. You can disable the magic sysrq key with /proc settings. https://en.wikipedia.org/wiki/Magic_SysRq_key. (Many distros configure things so only S, U, and B work (for rebooting when the kernel locks up), disabling the info-dump or kill-all-processes keys.)


You might want to retitle the question to be specific to laptops, because the keyboard I'm currently using is a logitech wireless which has an on/off slider switch. (Like most wireless mice).

  • vlock would be another good approach from the command line – Wayne Werner Jun 22 '18 at 20:34
  • 1
    @WayneWerner I guess if alt+left/right get pressed by your cat, then yeah vlock -a could help by locking out VC-switching until your password is typed. Otherwise simply don't log in on that VC in the first place. – Peter Cordes Jun 22 '18 at 20:46
  • Fwiw, you can use wireless keyboards with laptops. – lly Jun 23 '18 at 14:23
  • @lly: yes, but they aren't warm so won't attract cats. Unless you tape the wireless kbd over the internal kbd, but nobody does that. – Peter Cordes Jun 23 '18 at 14:25
  • 1
    But you can disable the routers etc. for the inbuilt keyboard so it doesn't matter what the cat presses on that one, which was the problem being discussed. Fwiw, a decent laptop shouldn't really get hot enough to attract cats anyway. Clean the fans or stop buying Dell... – lly Jun 23 '18 at 14:27
7

Simple workaround:

  • Open up a program like MS Paint.
  • Maximize that window to take up the whole screen.

Now those randomly pressed keys will just be ignored. If Shorty uses the track pad to move the cursor-pointer, there is VERY VERY VERY little chance of anything damaging getting clicked (though some abstract art might get drawn).

  • 11
    The disadvantage of this method is that the cat could trigger keyboard shortcuts and escape Paint. It's way more likely than it sounds; if the cat happens to sit on any modifier keys, then any additional keypress can trigger a keyboard shortcut. I've had this happen before: my cat closed most of my open programs simply by sitting on a large portion of the left side of the keyboard. – NobodyNada - Reinstate Monica Jun 22 '18 at 1:33
  • 1
    Similarly, the cat could open a large number of programs and hang the computer, with Win+E, or Win+1, 2, 3, etc. – mbomb007 Jun 22 '18 at 13:29
  • 1
    @NobodyNada That's amazing! You've got a talented cat. Good points from you too, mbomb007.) – BrettFromLA Jun 22 '18 at 13:34
  • 1
    Certain keyboard commands do things at an OS-level and won't be captured by paint. For example Win+D minimises to desktop and of course there's Ctrl+Alt+Del. Once my cat found a keyboard combination that changed my monitor's resolution and to this day I still haven't figured out what that combination was/is. – Pharap Jun 24 '18 at 8:57
6

This answer may be specific to Windows, but the keyboard will have a driver in the Device Manager, probably listed under 'Keyboards', if the device driver registered itself properly. Find the driver and disable it, and the keyboard will no longer work. Of course, the fun part is reenabling it--especially if your screen locks and you have to sign in again (the built-in Windows keyboard can help, unless you have to press CTRL-ALT-Delete to unlock your computer).

2

There are some programs that ignore keyboard input for people who have cats sleeping on laptops.

Not sure what kind of computer you have, but there is Catslook (Mac or Windows), or the rather old PawSense (looks like it was designed for Win95/98 back in the day; not sure if it still works).

  • Evidently the author never has to write inline code on a stackexchange site or they wouldn't have picked the grave key. – Pharap Jun 24 '18 at 9:05
  • With Windows 10 it wouldn't unless you have a MS-Dos emulator like DosBox. DosBox will pretty much run all the old programs from the '80-'90's no problem. – Old_Fossil Sep 1 '18 at 7:43
2

Use an external keyboard and disable the one on your laptop.

I haven't tried this solution myself but users on this tomsguide forum post their steps.

2

Option 1, shoot the cat. Then it won't mess with your keyboard anymore.

A slightly less violent option 2, shoot the keyboard. Then it won't matter as much if the cat plays with it.

A "fine I won't shoot anything" solution, using linux disable the device using xinput Something like xinput float 10 should do the trick. Of course you need to get the id number of your keyboard, which you can do with xinput list. And you will want a way to re-enable the keyboard.

See this question for better instructions. https://askubuntu.com/questions/160945/is-there-a-way-to-disable-a-laptops-internal-keyboard

Also, this is why Linux people like Linux. A little tinkering and anything is possible. (and there is less shooting of cats or keyboards)

p.s. Rather you choose to shoot the keyboard or the cat, when using the first two options, make sure to separate them first.

  • I had a similar issue, but with multiple keyboards, I decided to go for a different route: create a fullscreen/always on top program that completely catches user input. If you want to have a look: github.com/ha11owed/babyqtfun – Ha11owed Oct 7 '18 at 15:32
1

Use an external keyboard. It won't be warm, so the cat isn't as likely to sit on it. If you leave for a longer time, you can simply unplug it. Then cover laptop keyboard with something, as in @Alexandre Aubrey's answer.

An additional benefit - indeed, the reason I do it even though I don't currently have a cat - is that it's a lot easier to work with a full-sized keyboard than a laptop one. And then you can plug a 21" or so display into the laptop's external video port....

0

You can create an AutoHotKey script to ignore keypresses until you toggle Scroll Lock off for example, or turn on all 3 (Num Lock, Caps Lock, Scroll Lock) if you need extra procattion.

Or just run this script:

up::
down::
left::
right::

You can toggle it off and back on by clicking the H icon in tray, but if you want more convenience, you'll have to look up how to incorporate a check like #If GetKeyState("ScrollLock", "T") into that.

0

Cover your keyboard with a thin cutting board, like the one below (sold here among other places).

Enter image description here

or use some other form of thin, rigid sheet to cover the keys. Heat will still go through, keys will be protected from being pressed and from fur getting stuck in them.

  • 2
    A slightly better variation may be to build a small shelf which sits a few inches over the keyboard. That would not only guard the keyboard when it isn't being used, but allow use of the keyboard even in the presence of a cat. – supercat Jun 22 '18 at 16:31
  • @supercat A shelf elevated over the keyboard won't be as warm for the cat, especially if it's high enough for hands to type underneath. This defeats the purpose. Additionally, if your goal is to be able to type while the cat is there, a shelf a couple inches high with a cat on it would block your screen and make it useless. Also, not everyone is very comfortable at touch typing... – Alexandre Aubrey Jun 22 '18 at 17:25
  • The shelf could still be attractive to a cat if one periodically uses a hand to stroke the feline. As for being able to see the screen, that's a fair point; my screen is a bit higher than typical, so the cat doesn't block too much of it. – supercat Jun 22 '18 at 19:47
  • If it's stroking that the cat is after, it could very well just lay near the user on the desk; the very reason that the cat lays on the keyboard is because of the warm computer underneath it (remember this is a laptop). The cat is looking for a warm surface. If you raise your hand even just an inch above a warm computer you will notice that the warmth is much lesser than if you rest your hand on it. The shelf defeats the purpose. – Alexandre Aubrey Jun 22 '18 at 19:52
  • Ah, the shelf was my solution for a desktop machine but I can see laptops could be more of a problem. Closing the screen of my laptop works pretty well to guard the keyboard when I'm not wanting to use it, and is probably the best I can manage when I am using it but the cat demands attention. I hadn't thought of the cat wanting the heat from the keyboard so much as the attention. – supercat Jun 22 '18 at 20:20
0

With windows you have the ability to temporarily disable the keyboard using device manager. There is the option for a on screen keyboard using the accessibility settings that are used for people with disabilities. You type using the mouse. The cat can do back flips on the regular keyboard without messing anything up. When the cat is sleeping elsewhere you can reactivate the keyboard and continue as usual.

Not the answer you're looking for? Browse other questions tagged or ask your own question.