I am creating a program that records all of the keyboard actions, and stores these details right into a log file (Keylogger). I simply can't appear to locate a great way of carrying this out.

Things I have to date: A LowLevelKeyboardProc, The Virtual Key Code + the Scan Code from the Key being pressed.

What I'd like: With such codes, I'll process and write details about the laptop keyboard action being carried out. For invisible secrets I'd like the format: "[Change], [ENTER], [ESC], etc. As well as for visible secrets I'd simply similar to their Ascii value (both Upper Situation, minimizing Situation), including when they enter: !@#$%,etc..

I've got a couple of ideas, but I'm not sure the way i could capture everything. I've the data, I simply don't understand how to process it effectively.

Make reference to my publish came from here: Other Post

I have got example code based on how to set up a minimal-level keyboard hook and just how to process the key strokes.

Since you have the hook working, you just need a mapping from key codes to names for special secrets. Just pre-populate a range of strings listed in the important thing code:

const char *map[256];

map[VK_SHIFT] = "[SHIFT]";
map[VK_ENTER] = "[ENTER]";
...

Then inside your hook function, see if the bottom line is a computer character, if that's the case, print it directly, otherwise research the title from the key and print that:

if (isprint(vkCode))
  yourFile << char(vkCode);
else
  yourFile << map[vkCode];