"Maybe research can prevent further tragedies of this type," the shooter had written.