Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an application for Ubuntu, that would behave like KidKeyLock for Windows?

That is, upon activation, it prevents any keypress from working, until a specific sequence ("password") is typed, but without locking the screen or mouse.

The point of this is to allow a kid (baby/toddler) to pound away on the keyboard, but leaving the the screen open and mouse activity unlocked, allowing the parent to browse Faceb AskUb Very Important Parenting information sites at the same time.

Related: If there are no such applications, any idea how difficult would it be to code one with Python? (If this is the case, I will of course ask further from StackOverflow...)

share|improve this question
up vote 8 down vote accepted

Lock Keyboard For Baby (lk4b)

You need to have libgtk2-perl installed to run this.

To run the script, download the file on the linked page to a suitable location then run the command:

perl FILE

replacing FILE with the location of the downloaded file.

For information on available options run:

perl FILE --help
share|improve this answer
While not the most eloquent, this one indeed does the job! My daughter thanks you! ;) – Ilari Kajaste Jun 12 '11 at 20:26
It should be noted that this does not prevent modifier keys from affecting mouse events. E.g. even when keyboard is locked, if ctrl is held down mouse wheel will zoom the browser window, instead of scrolling down. (Though the refernce software I used (KidKeyLock) behaves the same.) – Ilari Kajaste Jun 24 '11 at 11:40
In Ubuntu 14.04 I also added a lk4b-launcher to Unity dashboard:… – DmitrySandalov Jan 24 '15 at 12:07

A non-software solution I'm currently using is a Logitech wireless keyboard (K320 I think) that has an unobtrusive power switch (ostensibly to save batteries).

A surreptitious flick of the switch and the kid has no idea it's your mouse clicks that are causing the changes on the screen and not their banging on the keyboard.

Same goes for the matching mouse.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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