keyboardHandler.ignoreInjected: don't deadlock if this context is used reentrantly. E.g. The keyhook calls keybd_event or sendInput which internally calls the keyHook.
The lock is now a RLock (reentrant lock) and the global variable is only toggled on and then off if it was not already on.