MCPcopy Create free account
hub / github.com/TanStack/hotkeys / addToHistory

Function addToHistory

examples/solid/createHotkeySequence/src/index.tsx:17–20  ·  view source on GitHub ↗
(action: string)

Source from the content-addressed store, hash-verified

15 const [history, setHistory] = createSignal<Array<string>>([])
16 const [helloSequenceEnabled, setHelloSequenceEnabled] = createSignal(true)
17 const addToHistory = (action: string) => {
18 setLastSequence(action)
19 setHistory((h) => [...h.slice(-9), action])
20 }
21
22 createHotkeySequence(['G', 'G'], () => addToHistory('gg → Go to top'))
23 createHotkeySequence(['Shift+G'], () => addToHistory('G → Go to bottom'))

Callers 1

AppFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…