MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / HandleKey

Method HandleKey

ui/fullscreen_backend.go:489–552  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

487}
488
489func (b *FullscreenRendererBackend) HandleKey(key string) bool {
490 if strings.HasPrefix(key, "mouse_scroll_") {
491 pane := b.activeScrollPane()
492 if _, suffix, ok := strings.Cut(key, ":"); ok && suffix != "" {
493 pane = suffix
494 }
495 direction := 1
496 if strings.HasPrefix(key, "mouse_scroll_up") {
497 direction = -1
498 }
499 b.ScrollPaneByName(pane, direction*b.MouseScrollDelta(pane))
500 b.refreshControls()
501 return true
502 }
503 switch key {
504 case "f6":
505 b.CycleFocus(1)
506 case "s-f6":
507 b.CycleFocus(-1)
508 case "up":
509 if len(b.CompletionItems) == 0 {
510 return false
511 }
512 b.CompletionSelected--
513 if b.CompletionSelected < 0 {
514 b.CompletionSelected = len(b.CompletionItems) - 1
515 }
516 case "down":
517 if len(b.CompletionItems) == 0 {
518 return false
519 }
520 b.CompletionSelected = (b.CompletionSelected + 1) % len(b.CompletionItems)
521 case "pageup":
522 b.ScrollActivePane(-b.PageScrollDelta())
523 case "pagedown":
524 b.ScrollActivePane(b.PageScrollDelta())
525 case "home":
526 b.ScrollActivePaneToEdge(false)
527 case "end":
528 b.ScrollActivePaneToEdge(true)
529 case "c-f":
530 b.EnterSearchMode()
531 case "f3":
532 b.StepTranscriptSearch(1)
533 case "s-f3":
534 b.StepTranscriptSearch(-1)
535 case "f4":
536 b.ToggleThinkingVisibility()
537 case "f5":
538 b.ToggleTaskActivityDetail()
539 case "escape":
540 if b.ActiveModalState != nil {
541 b.FocusedPane = "input"
542 } else if b.InputMode == "search_query" {
543 b.CancelSearchMode()
544 } else {
545 return false
546 }

Calls 13

activeScrollPaneMethod · 0.95
ScrollPaneByNameMethod · 0.95
MouseScrollDeltaMethod · 0.95
refreshControlsMethod · 0.95
CycleFocusMethod · 0.95
ScrollActivePaneMethod · 0.95
PageScrollDeltaMethod · 0.95
EnterSearchModeMethod · 0.95
StepTranscriptSearchMethod · 0.95