Added undo listener to input manager.

Added undo listener to input manager.