KeyboardListener
class presented here allows capturing keyboard events even when another application is running in the foreground. Several threads inside your application might be listening for events in parallel, each handling the events in its own way.
The
KeyboardListener
class can only be used on Windows XP because its implementation depends on the Win32 methods RegisterRawInputDevices
and GetRawInputData
which are currently only available on XP.