Corrected entry: The ending relies on Tony knowing where the key is on the stairs and Margot not knowing. Unfortunately there are any number of reasons for him knowing about a backup key that do not mean he is a murderer, and she could be smart enough to know she is certainly under police surveillance (and custody) and not touch the key on the stairs. Tony could easily make the argument that he had one made as a backup and put it there. Swann could have followed him one day and saw it and used it. His knowing the location of the key certainly does not necessarily mean he hired a hitman.
Corrected entry: Near the end of the movie, when Tony leaves to go to the police station and retrieve his wife's belongings, he rushes out of his apartment, pulling hard on the door so it shuts itself and keeps on moving, leaving the apartment building. He never stopped to lock it. This is an important mistake because the whole point of the key business at the end is to determine if the police inspector can get in with the key he has in his possession. The door isn't locked, yet the inspector uses the key he has in the door, goes inside the apartment, phones the police station to tell them he got in and to "start the ball rolling," meaning now it's confirmed the key he used unlocked the door...the door Tony hadn't locked.
Corrected entry: After the trial, Chief Inspector Hubbard visits Tony to execute a complicated ruse that he had prearranged with Sergeant O'Brian (at the station) and Detective Williams (stationed upstairs). The ruse relies on the inspector mentioning Margot's handbag and switching raincoats with Tony. The inspector would have left the apartment without doing either of those things had it not been for Mark being present and calling out to the inspector, but the inspector would not have expected Mark to be in the apartment.