How to make a program which would be record keyboard

769 views Asked by At

I have an idea. I want to make a program that should be able to record every key that has been pressed during it program has been running. I want to ask, is it possible to manage this using java or i need something else. What is more can you recomend me some ways how to manage this easier and what exactly i need to use. Thank you very much. Im waiting for your answer soon.

1

There are 1 answers

7
user3437460 On BEST ANSWER

It is not possible to listen for keystroke outside the focus of your java program if you are using packages from Java itself. You may have to use external packages which is able to communicate with the operating system.

I tried something similar years ago, but not by using Java. What you wanted to do can be easily achieved using AHK (Auto Hotkey) - A free open source scripting language.

If you still want to write a Java application, you may write the application in Java and let it execute .ahk script to handle the key logging for you.