handleKeyAction method

void handleKeyAction(
  1. String key
)

Implementation

void handleKeyAction(String key) {
  switch (key) {
    case 'space':
      onDone();
      break;
    case 'left':
      if (onBack != null) onBack!();
      break;
    case 'x':
      if (agent.status == TaskStatus.running && onKillAgent != null) {
        onKillAgent!();
      }
      break;
  }
}