{
            if (e.character == '\r' || e.character == '\n')
            {
              apply();
              text.dispose();
            }
            else if (e.character == '\033')
            {
              cancel();
              text.dispose();
            }
          }