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

Function RegistrationsViewer

examples/solid/createHotkeySequences/src/index.tsx:348–443  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

346// ---------------------------------------------------------------------------
347
348function RegistrationsViewer() {
349 const { hotkeys, sequences } = createHotkeyRegistrations()
350
351 return (
352 <section class="demo-section">
353 <h2>Live Registrations (createHotkeyRegistrations)</h2>
354 <p>
355 This table is rendered from <code>createHotkeyRegistrations()</code> — a
356 reactive view of all registered hotkeys and sequences. Trigger counts
357 update in real-time.
358 </p>
359
360 <Show when={hotkeys().length > 0}>
361 <h3>Hotkeys</h3>
362 <table class="registrations-table">
363 <thead>
364 <tr>
365 <th>Hotkey</th>
366 <th>Name</th>
367 <th>Description</th>
368 <th>Triggers</th>
369 </tr>
370 </thead>
371 <tbody>
372 <For each={hotkeys()}>
373 {(reg) => (
374 <tr>
375 <td>
376 <kbd>{formatForDisplay(reg.hotkey)}</kbd>
377 </td>
378 <td>{reg.options.meta?.name ?? '\u2014'}</td>
379 <td class="description-cell">
380 {reg.options.meta?.description ?? '\u2014'}
381 </td>
382 <td class="trigger-count">{reg.triggerCount}</td>
383 </tr>
384 )}
385 </For>
386 </tbody>
387 </table>
388 </Show>
389
390 <h3>Sequences ({sequences().length})</h3>
391 <table class="registrations-table">
392 <thead>
393 <tr>
394 <th>Sequence</th>
395 <th>Name</th>
396 <th>Description</th>
397 <th>Enabled</th>
398 <th>Triggers</th>
399 </tr>
400 </thead>
401 <tbody>
402 <For each={sequences()}>
403 {(reg) => (
404 <tr>
405 <td>

Callers

nothing calls this directly

Calls 2

formatForDisplayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…