When there are 2 short actions, usually we put the first in front of the sentence first. For example: Taking the key out of his pocket, she opened the door.
however, I also noticed that some natives saying:
She went out saying she would be back in a few minutes.
Should I change it to:
Before going out, she said she would be back in a few minutes.
Or just leave it. Does it seem Ok to you?
I'm not a teacher.
I know the following rules:
1. Participle I Indefinite expresses an action simultaneous with the action expressed by the finite verb.
Approaching Malta Street, Soho, Soams thought with wonder of those years in Brighton. (Galsworthy)
Having closed the drawing-room door on him, Isabel awaited a little, absorbed in her own thoughts. (Collins)
Having reached the classroom, she became the object of many questions.
2. Participle I Perfect Active and Passive denotes an action prior to the action expressed by the finite verb.
Mr. Bumble, having spread a handkerchief over the knees…began to eat and drink. (Dickens)
Having already been informed that he always slept with a light in the room, I placed one of the two lighten candles on a little table at the head of his bed. (Collins)
3. It should be noted that a prior action is not always expressed by Participle I Perfect: with some verbs of sense, perception and motion, such as to see, to hear, to come, to arrive, to seize, to look, to turn and some others, Participle I Indefinite is used even when priority is meant.
Turning down an obscure street and entering an obscure lane, he went up to a smith’s shop. (Hardy)
Hearing a footstep below he rose and went to the top of the stairs. (Hardy)
In my humble opinion, your sentence “Taking the key out of his pocket, she opened the door.” is like the written above. So it is perfectly acceptable.