The way I would do it is to have two variables, one for checking if the character is doing anything, let's call the variable 'idleCheck' and the other for a countdown, 'idleCount'.
So you set up so that whenever the player does 'anything' you change idleCheck to 1 (or true or yes, whatever works for you) and when the player doesn't do anything it reverts back to 0.
Now, when idleCheck equals 0 you start adding to idleCount, effectively counting upwards, and when the number goes beyond whatever amount suits the time you want you start your zooming event. If idleCheck turns to 1 (player does something) you set idleCount back to 0 and reset your zoom.