Sorry, but is it a keylogger software ? Perhaps you have to use native operating system calls to achieve that.