Does anyone know how to capture the keystrokes of an active window other than the main window (the calling window itself) ?

Thanks.