Add pause to key listening method