Lock Keyboard For Baby

Lock-keyboard-for-Baby (lk4b) is a small program which locks your keyboard but leaves your mouse free. I wrote it because my niece likes to bash away at my keyboard whenever she sees me sit down at it. Keys typed on a keyboard can have disastrous consequences and I didn't want to lock my screen all the time with a screensaver.

When started, lock-keyboard-for-baby opens a small window which grabs the keyboard and echos keys which are typed. By default, it tells you what to type to quit ("Quit Now"). Unlike a screensaver, your screen is not blocked and the mouse still partially works, so you can still see what is on your screen - keep watching tv / video and/or read a document using the mouse to scroll. Have a look at the screenshots to get a better idea of what it does.

There are a few options to make it more versatile and possibly suitable for other uses, such as changing whether the passphrase is shown or not.


You will need to have GTK version 2.xxx installed, as well as the perl GTK2 bindings (perl-gtk2 or gtk2-perl depending on your system). You don't need any GNOME rubbish installed.


GPL version 2

Recent changes

The latest version has had mouse locking support added thanks to a contributed patch.

Artwork Credits

My logo there is just the xfce4 keyboard logo with a hand scribbled on top. Thanks to whoever drew that keyboard.


Software downloads are released under the GNU GPL. All downloads and related files are released "as is" and their use is entirely at your own risk. You can download the most current version of lock-keyboard-for-baby at the sourceforge page. Alternatively, you can get it here but I may forget to keep this up to date. These downloads are named without a '.pl' extension because my stupid ISP denies access to anyting with a '.pl' extension.

Donations :)

Hey if you want to donate that would be cool.
I'm happy to say that after two years Lock Keyboard For Baby has now actually received it's first donation!
Preferably if you have a paypal account you could donate a buck or two directly to my paypal account which is under the email address

Alternatively if you have a sourceforge account you can use their donation button (but note that they take a minimum of $1 in fees from each donation).
Support This Project


20080706: First donation!
20080703: lk4b has been downloaded approximately 480 times from sourceforge (and who-knows how many times from this page). That's probably at least 500 happy babies!.
2006: I just looked at my sourceforge page (because I am about to start one for one of my other programs blahps and I noticed there have actually been some downloads of lk4b! 3 downloads in in the last week!


before screenshot
What it looks like when it starts. It starts at the top left unless you tell it otherwise.
after screenshot
What it looks like after I have mashed the keyboard.
full screenshot
A full screen capture so you can see what it looks like on the screen. As you can see, while it is running you can still watch TV or edit images or whatever (toolbar buttons generally still work but menus generally do not).