Why am I trying to kill people with a defibrilator?

Solution 1:

There is this feature that if you press the use key on a revivable body, you will switch to defib, to a basic revive, and switch back to your weapon again.

Maybe its that? I'm looking for a better source on this, so maybe it can be deactivated.

Reddit source

Edit:

From the Battlelog forum:

If you press the use button, which is also reload button, over a downed teammate it will defib them and then switch back to weapon