did you play with the key, like open it up? do you have a spare, if so give it a go, same thing happend to my vr6 after i played with the key :)
Printable View
When my wife's Vento started doing that we did the usual of checking all the above. However it turned out to be the butterfly for the throttle. After around 200,000 k's it had gotten a thin coating of oil on it. It is easy to check. Just take the black plastic intake pipe that runs from the air cleaner to the intake/throttle off at the throttle end. You will be able to see the butterfly quite easily.
If it is slightly oiled up then as ours was the good book will tell you to take it all apart and carefully clean it etc. However we just gave it a liberal spray with injector/carburetor cleaner and quickly replaced the intake pipe and started the car.
Problem solved. The engine settled down to its usual idle and it has done another 100,000k's since then with no further problems. But as I said the good book says not to do it that way so do it advisedly.