How does detecting Murder/Crime work?
The crime system in every ES game is a little....meh. In Oblivion, it was the Psychic Guards that could hear you rummaging in a house from 100 meters, and was patched away in mods (but nothing by Bethesda). In Skyrim, it's not so bad, but it's more complicated. The following is from observation and research.
Any time the eye is even a little open, doing something criminal immediately gains that person's full attention and gets their response.
There is a threshold by which guards determine if they will immediately arrest you, attack you, or just leave you alone unless you talk to them. This is tied to the bounty (also known as crimegold or fine) on your head.
Once a witness sees a crime, unless they are a participant in combat they will usually flee and locate one of the guards or soldiers nearby. This guard will ignore the threshold for bounty and immediately attempt arrest.
Killing all witnesses before they can report the crime resets your crimegold value to what it was before the crime was committed.
One of the most irritating bugs in Skyrim, or at least vanilla Skyrim, is that goats, cows, horses, foxes, and other animals can report crimes. I think the Unofficial Patch for Skyrim and Skyrim SE resolve this; I haven't had this happen since I started using it.
Peeking in someone's pockets is legal. Pickpocketing is not.
Accidentally opening the "pick lock" screen is not a crime. Actually trying to pick the lock is.