Fixed key codes for windows, removed "reactivation", fixed some warnings