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 (shell.status == TaskStatus.running && onKillShell != null) {
        onKillShell!();
      }
      break;
  }
}