pub fn is_cancel(key: &KeyEvent) -> bool
Whether the key event represents a cancel gesture (Esc or Ctrl+C).