We are talking about a
global hook for the
Keyboard ... not about some hooks
And that is exactly the kind of hook that does
not need an external
DLL, as well as global mouse hooks. But only if you use the low level hooks (WH_KEYBOARD_LL / WH_MOUSE_LL).
The kind of hook which is used here has to be inside an external
DLL.