//====== protected methods

        protected bool SetExitFlagIfCancelKeyPressed(IInputDevice inputDevice)
        {
            Verify.NotNull(inputDevice, nameof(inputDevice));

            if (inputDevice.TryReadKey(KeyType.Cancel))
            {
                exit = true;
                inputDevice.Clear();
            }

            return(exit);
        }