MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / toggleFocus

Function toggleFocus

apps/cli/src/ui/hooks/useFocusManagement.ts:62–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 * Toggle focus between scroll and input areas
61 */
62 const toggleFocus = () => {
63 if (!canToggleFocus) {
64 return
65 }
66
67 const prev = manualFocus
68 if (prev === "scroll") {
69 setManualFocus("input")
70 } else if (prev === "input") {
71 setManualFocus("scroll")
72 } else {
73 setManualFocus(isScrollAreaActive ? "input" : "scroll")
74 }
75 }
76
77 return {
78 canToggleFocus,

Callers 1

useGlobalInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected