Added an "IsError" property to the ShellCommandResponse to denote if the
response should be handled a certain way (if it is a response to a
ShellCommand error, then print it differently).
Also correctly queues up two different threads on shell initialization.
These ManualResetEvents now will signal the Shell's redirected output to
handle either the output, or the error output. Not at the same time
(will cause deadlocking).
We now append the text instead of concatenating. Not sure how much more
efficient this is, but it is certainly more readable.
Bear in mind this does not fix the Alt Gr keypresses. Pressing this key will still produce the same symbols/behaviors when the keylogger is not enabled.
What this fix does: we are receiving the character value for a KeyPress and we are handling it by ignoring it if any modifier keys are set. In this case "Ctrl + Alt" which I will be trying to accomplish in a later fix (if I can figure out how to do this).
For example, a user with a german keyboard layout presses (Ctrl + alt + 2), which is the same as AltGr + 2, the call to our PressedKeys list will do the following
-check if key modifiers are set
-check if the list contains a key with a character value that is comparable to a key
If the key is a normal character, for example user presses (Ctrl + Alt + k) on a german keyboard layout, the result would be true and the method would return, ignoring appending the character 'k' to the log
If the key is not a normal character that is comparable to the value of a Key, our call will fall through to the next call, and add the character that is returned. For example, user presses (Ctrl + Alt + 2) to produce the special character, the Keys enum values won't contain a key with that symbol and our list won't either so it will fall through and print the special character
-Fixed spaces showing up in weird orders.
-Fixed issue where pressing some modifier keys would append the KeyPress
events text prior to the Appended highlighted text from the KeyDown
event. Example: User presses Windows Key + R. it would log "r[Win +
[R]"