ghosttyTerminalMatchesClearSelectionShortcut function

bool ghosttyTerminalMatchesClearSelectionShortcut(
  1. LogicalKeyboardKey key, {
  2. required GhosttyTerminalModifierState modifiers,
})

Whether the current key press should clear terminal selection state.

Implementation

bool ghosttyTerminalMatchesClearSelectionShortcut(
  LogicalKeyboardKey key, {
  required GhosttyTerminalModifierState modifiers,
}) {
  return !modifiers.controlPressed &&
      !modifiers.metaPressed &&
      !modifiers.altPressed &&
      !modifiers.shiftPressed &&
      key == LogicalKeyboardKey.escape;
}