I read this in Wikipedia: "The program becomes modal, switching between interpreting commands from the keyboard or passing keystrokes on as data to be processed."
The word interpreting makes me confused. If it is an adjective, then it has an active form. But then there is a mismatch - the commands are interpreted. But it sounds like they are interpreting something.
It can also be a gerund with its own object. For example: Smoking cigarettes is bad for you. How can we distinguish between these two cases?