Knock-based commands for your Linux laptop

In 2003, IBM began releasing ThinkPad laptop computers with integrated accelerometers and associated software to protect the hard disks when the unit is dropped. Enterprising hackers from IBM and elsewhere have worked to develop modules for the Linux kernel to take advantage of these sensors. On-screen display orientation, desktop switching, even game control and real-time 3D models of the tilt of the laptop are now available. This article presents a new twist — knock codes — and a simple program to run commands when specific knock codes are detected.

For the first time, you can hit your computer and get a meaningful response! Using Linux® and the Hard Drive Active Protection System (HDAPS) kernel drivers, you can access the embedded accelerometers on Lenovo (formerly IBM®) ThinkPads, then process the accelerometer data to read specific sequences of “knocking” events — literally rapping on the laptop case with your knuckles — and run commands based on those knocks. Double tap to lock the screen, and knock in your secret code to unlock. Tap the display lid once to move your mp3 player to the next track. The possibilities are endless.

[youtube]sbh_JGbPoJU[/youtube]

More here on how to accomplish this on your Thinkpad.

Leave a Reply