MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / handle_sandboxes_key

Method handle_sandboxes_key

crates/openshell-tui/src/app.rs:1353–1382  ·  view source on GitHub ↗
(&mut self, key: KeyEvent)

Source from the content-addressed store, hash-verified

1351 }
1352
1353 fn handle_sandboxes_key(&mut self, key: KeyEvent) {
1354 match key.code {
1355 KeyCode::Char('q') => self.running = false,
1356 KeyCode::Tab => self.focus = Focus::Gateways,
1357 KeyCode::BackTab => self.focus = Focus::Providers,
1358 KeyCode::Char(':') => {
1359 self.input_mode = InputMode::Command;
1360 self.command_input.clear();
1361 }
1362 KeyCode::Char('j') | KeyCode::Down if self.sandbox_count > 0 => {
1363 self.sandbox_selected = (self.sandbox_selected + 1).min(self.sandbox_count - 1);
1364 }
1365 KeyCode::Char('k') | KeyCode::Up => {
1366 self.sandbox_selected = self.sandbox_selected.saturating_sub(1);
1367 }
1368 KeyCode::Char('c') => {
1369 self.open_create_form();
1370 }
1371 KeyCode::Enter if self.sandbox_count > 0 => {
1372 self.screen = Screen::Sandbox;
1373 self.focus = Focus::SandboxPolicy;
1374 self.confirm_delete = false;
1375 self.pending_sandbox_detail = true;
1376 }
1377 KeyCode::Esc => {
1378 self.focus = Focus::Providers;
1379 }
1380 _ => {}
1381 }
1382 }
1383
1384 fn handle_policy_key(&mut self, key: KeyEvent) {
1385 if self.confirm_delete {

Callers 1

handle_normal_keyMethod · 0.80

Calls 2

open_create_formMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected