Unless you're a traitor and you shoot another traitor, you do not lose karma.
Innocent kill traitor = gain
Detective kills traitor = gain
Innocent kill innocent = massive loss (varies with karma)
Innocent kill detective = worst loss
Traitor kills traitor = high loss
Traitor kills inno\detective = no gain/loss
Any damage done to teammates not resulting in death also causes a loss in karma. It is also considered a traitorous act.