It’s still unclear why the alleged shooter, a 66-year-old former home inspector from Illinois, was in Alexandria, Va., apparently living out of his vehicle for the past three months, or what prompted the shooting at a congressional baseball practice that left five people injured.

But KHOU 11 Investigates found James Thomas Hodgkinson, the only casualty in Wednesday’s shooting, left a trail of clues behind.

Related: Suspect killed after Steve Scalise, 4 others shot at baseball practice

His criminal record and writings on both social media and in his hometown newspaper paint the picture of a sometimes-angry man, devastated by Bernie Sanders’ loss in the Democratic primaries and consumed with hatred of Republicans and their policies.

Criminal history includes crimes involving guns

Hodgkinson’s criminal history stretches back to 1988. It’s mostly traffic tickets, but also several criminal filings, including two battery charges, arrests for criminal damage charge and resisting arrest.

Those two battery charges are from 2006 when a neighbor told investigators Hodgkinson punched his girlfriend in the face, then pulled a shotgun on him and hit him with the gun. That case was dismissed.

A decade later, he was investigated in another gun-related crime. In March, a neighbor reported someone firing shots near houses. Deputies found Hodgkinson taking target practice behind his home with a high-powered rifle, according to the St. Clair County Sheriff’s Office.

Hodgkinson owned the firearm legally and showed deputies a valid gun owner’s identification card, St. Clair County Sheriff Rick Watson said Wednesday.

“(The investigating deputy) said he was very cordial. Very nice, very understanding. He had no reason to think that he was doing anything that was illegal, immoral or anything,” Watson said.

Watson didn’t know if that rifle was the same one used in today’s attack, and he said there was no sign Hodgkinson was planning an attack.

Anti-republican social media presence

Although Hodgkinson’s motive is unknown, he appears to have maintained two Facebook pages and a Twitter account, where he frequently made political posts.

The only mention he makes about wounded House Whip Steve Scalise, R-Louisiana, came in 2015 when he shared a political cartoon featuring the majority whip and wrote, “Here’s a Republican that should Lose His Job, but they Gave Him a Raise.”

More recently, on Monday, he was busy on Facebook, sharing four separate memes and news stories about President Donald Trump. He added his own comments, writing:

  • “I Want to Say Mr. President, for being an a** hole you are Truly the Biggest A** Hole We Have Ever Had in the Oval Office.”
  • “Make America Great Again, Resign!”
  • “Trump is Guilty & Should Go to Prison for Treason”
  • “Trump is a Mean, Disgusting Person.”

His last post at 9 a.m. Tuesday gave no clues that he planned to open fire on congressmen Wednesday morning. He shared a meme – a photo from "Schoolhouse Rock!" with the words, “How Does A Bill Work? That’s an easy one, Billy. Corporations write the bill and then bribe Congress until it becomes a law.”

But Hodgkinson was also a member of several anti-conservative groups, including “The Road To Hell Is Paved With Republicans,” “Donald Trump is not my President,” “Tea Party is a Terrorist group” and “Terminate The Republican Party.”

He even RSVPed to attend a Facebook event Wednesday: “Stop #TrumpCare Senate Call-In Day.”

Bernie Sanders volunteer

Hodgkinson’s recent Facebook posts also included three praising Sanders’ in just the last week, but his admiration for the senator began long before that.

As early as 2014, Hodgkinson wrote about Sanders on social media. He volunteered for Sanders’ presidential bid and maintained memberships to several Facebook groups about the senator, including “America for Bernie Sanders 2020.”

He chose a Bernie Sanders’ cover photo and a profile picture reading, “Democratic Socialism explained in 3 words: ‘We The People’” for one Facebook page, and a profile photo of Bernie Sanders’ face edited into an Uncle Sam costume on the other.

Sanders acknowledged that Hodgkinson volunteered on his presidential campaign in a statement, and called the shooting a “despicable act” that “sickened” him.

“Let me be as clear as I can be. Violence of any kind is unacceptable in our society and I condemn this action in the strongest possible terms,” Sanders said in a statement. “Real change can only come about through nonviolent action, and anything else runs against our most deeply held American values.”

Resentment toward Republicans is nothing new

It’s unclear how long Hodgkinson has expressed strong anti-conservative views, but Hodgkinson’s political activist began before last year’s heated election.

In 2011 and 2012, in the midst of the Great Recession and living in Illinois, Hodgkinson wrote a series of letters to the editor in the Belleville News-Democrat where he mostly criticized Republican tax plans and proposed his own ways to fix the economy.

“If the rich paid their fair share of taxes today, we wouldn’t be in this predicament. We need to vote all Republicans out of Congress,” he wrote in one letter to the editor.

In another, he wrote, “I have never said, ‘Life sucks,’ only the policies of the Republicans.”

Photos: Multiple people shot at Congressional baseball practice