Code:
#include <acknex.h>
#include <windows.h>

LRESULT CALLBACK origWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK hkWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	if(message == WM_CHAR)
	{
		printf("Keypress: %c", wParam);	
	}
	
	return origWndProc(hwnd, message, wParam, lParam);
}

void main()
{
	origWndProc = on_message;
	on_message = hkWndProc;
}



Works fine too have fun with it