While it "probably strikes most of us differently depending on how much time you've had as a police officer," he told ABC News today, "this is part of the whole role of police officers. They're going to lose fellow officers as they go forward in their careers, not unlike the military.
"But you have to continue to do your job. And I think that's what we see and what we'll continue to see," Kelly added.
Here is Kelly's take on targeted attacks and the daily dangers of being a cop.
The Targeted Attacks
In Baton Rouge, three law enforcement officers were killed July 17 by a gunman who "intentionally targeted and assassinated" cops, according to police. The attack came in the wake of the death of Alton Sterling, a black man who was shot and killed during an altercation with Baton Rouge police officers on July 5. Protesters took to the streets nationwide after video surfaced of the encounter, which was followed the next day by a video of the fatal police shooting of Philando Castile, another black man, in Minnesota.
The Baton Rouge attack was also 10 days after the killing of five officers in Dallas by a gunman who said he was angry at police.
Kelly says cops in Baton Rouge and Dallas have since been "performing admirably."
Kelly also praised the Dallas and Baton Rouge police chiefs.
"They have, I think, supported their officers and raised the comfort level of the citizens," he said.
Police departments around the country are on high alert in the wake of the targeted attacks.
In New York, the NYPD released new measures Sunday -- the day of the Baton Rouge attack -- announcing dual patrols. Kelly says the advantage of doubling up is that single officers are easier to attack.
However, dual patrols "put a strain" on small- or medium-sized departments, he said, because it reduces resources.
The NYPD also said this week its Critical Response Command is staffing security posts “visible with helmets and long guns” at stations throughout the city.
"It's put in place to act as a deterrent to anyone who may want to attack police officers," Kelly explained.
"I think that there's no specific threat," he said, but the precautions are in place as an "additional effort to secure our police facilities" and "to raise the comfort level of police officers working in that facility."
Daily Dangers of Being a Cop
Targeted shootings aren't the only dangers.
In Brooklyn, New York, Tuesday night, shots were fired from a passing car at two NYPD officers who were walking. The shots narrowly missed the officers, The Associated Press said.
And in Kansas City, Kansas, Tuesday, a police captain died after he was shot while responding to help officers at a call. This was not a planned ambush, officials said, adding that it appeared the suspect had committed a crime and fired to try to avoid being apprehended.
"Our officers do have some stress and increased anxiety," Kansas City Police Chief Terry Zeigler said at a new conference today. "There's no way they couldn't." But Zeigler added that the "officers will continue to fight for the safety of our community."
Kelly says the everyday dangers of being an officer can differ depending on the setting -- urban or rural -- but there is "always potential for the unexpected."
Or when weapons are involved -- which "have potential for the officer to get injured," he said.
Traffic stops are also dangerous, Kelly said, because "you don't know who is in the car" you're approaching. Officers can also be injured by passing cars.
And in large cities, guns and assaults in progress are big factors.
"Disputes can turn against the officer pretty quickly," Kelly said. "Anything where action is ongoing ... the danger is there."
For police, the unknown is dangerous, Kelly said.
Ray Kelly's Takeaway: Cops Won't Be Deterred
"There is an element of danger," Kelly said. "That goes along with police work ... I think people in the business realize that."
But he stressed that he's never seen that impact officers' performance "in any way."
"They go where the problems are, while the rest of the world is going in the other direction," he said.
In terms of the psychological impact, he said he thinks it's "not as great as people outside of policing may think."
"I think police officers handle it pretty well. They have to have a fairly resilient demeanor to see what they see on a regular basis," he said.
"This is what they do. This is their livelihood. So you get used to it to a certain extent," he said. "And this is a self-selecting business. If the impact on you psychologically [is in] a negative way consistently, perhaps you should find another business."
So while officers throughout the country have a "heightened awareness," Kelly says recent events are "not going to deter them."