Tapping Keystrokes & Keyboard layout using PHP

The first and foremost script have been working on is taking control of the system from its input (here the keyboard & mouse) for web development. This is now part of my library script for reuse in most of the projects… now working towards automated scripts…
Any Inputs and ideas, thoughts?