Hi,
Maybe this could help: Handling keys in application (more specifically the GrabKey() related part)
Cheers, Bertrand.