changed events to keystates