Its not impossible, but theres no ideal way to do it, especially not for cross-platform applications that should run on both win32 and linux for example.
If you want to do Hotkeys, there are other ways, check out RegisterGlobalHotkey. For keyloggers, GetAsyncKeyState. To simulate input, SendKeys. Whatever you need/use is up to what you want to do.