1

I want to log the keys in a table that i have designed in java. To get the keys user is pressing (on windows) i am advised to use the function SetWindowsHookEx. But i don't know how to use this function. Basically i want SetWindowsHookEx to call my java function with the key strokes it has received.Then i will log those keys into the table for the user to see it later. I don't understand the arguments of the mentioned function. Basically how do i use this function to implement the task.

saplingPro
  • 20,769
  • 53
  • 137
  • 195
  • Please don't ask the same question more than once: http://stackoverflow.com/questions/10684594/writing-a-key-listener-in-c – technomage May 21 '12 at 15:09
  • possible duplicate of [JNA Keyboard Hook in Windows](http://stackoverflow.com/questions/3078646/jna-keyboard-hook-in-windows) – markus Jun 03 '12 at 14:38

1 Answers1

1

Take a look at jnativehook. It's a library for using system-wide keyboard / mouse hooks from Java.

npe
  • 15,395
  • 1
  • 56
  • 55