In message , Peter Balcombe writes
Could be the idle control valve which needs cleaning (easy job) but more likely to be the Throttle Position Sensor which is playing up. The TPS itself is easy to change but on pre 2000 models the connector and its loom needs to be changed.
My wife's Ka does the same occasionally, especially in warm weather. I've cleaned the idle control valve a couple of times but it hasn't improved things.