Listen for cmd events from an application.