use SendInput instead of obsolete keybd_event, increase warning level, and eliminate most warnings