Fixed: Shift keys are not sent to clients

I have a working fix for Issue #4055.  I've been running it for a few days now and it has been working reliably.  I did notice on a couple of occasions keystrokes intended for the server screen being dropped, but I have not been able to replicate this since I last experienced it.

I have not tested it this on a server platform other than Windows 8.1 with all updates installed.

     
Left and right shift key are special cases, so are ctrl and menu keys. I think it is better to extract it into a new function.