Yeah I noticed that I was experimenting locally, it's because the other keyboard functions are registered by window messages for keyup keydown etc. I do not know why it is that the keyboard does its thing the way that it does, but usually pressing a key and holding it types the letter then waits a bit and starts spitting the letters out. One thing I tried was making a keyboard_status array to check against and setting either 0 for not pressed, 1 for pressed, 2 for intermediate, 3 for pressed, and 4 for released. That's easy enough to do and you could consider 1 and 3 for down, but it still don't function quite the same.
The other problem is that the input string is always uppercase, I don't know if you noticed that or not. So you would need to manually check vk_shift yourself to determine whether the keys are uppercase or lowercase. Perhaps ENIGMA could at least provide a helper function for this though. We don't have this problem with our built in keyboard_string because the API's just tell us what the last char was.https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWScallback.cpp#L175https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp#L88
The better solution would be to write a dll extension like you did for Window flags that hooks onto the system message loop.http://msdn.microsoft.com/en-us/library/ms644990%28v=VS.85%29.aspx
You could borrow some of ENIGMA's code and replicate the input system to behave the exact same way except work when not in focus. You could have functions like keyboard_check_pressed_direct and keyboard_check_released_direct to get around overloading.