emitting key strokes from a virtual standalone keyboard

Hi all,
I need to write a virtual keyboard that will emit the keystrokes to any text box that the user clicks on and set focus. I am trying to use PhEmit function to emit the key strokes but it is not working. can anybody send me sample code or suggestion to do this.



Checkout the code in cvs, look at apps/input for an example.