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

Method render

examples/lit/key-hold/src/app.ts:38–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 <header>
37 <h1>KeyHoldController</h1>
38 <p>
39 Returns a boolean indicating if a specific key is currently held.
40 Optimized to only re-render when that specific key changes.
41 </p>
42 </header>
43
44 <main>
45 <section class="demo-section">
46 <h2>Modifier Key States</h2>
47 <div class="modifier-grid">
48 <div
49 class="modifier-indicator ${
50 this.shiftHold.value ? 'active' : ''
51 }"
52 >
53 <span class="key-name">Shift</span>
54 <span class="status">
55 ${this.shiftHold.value ? 'HELD' : 'Released'}
56 </span>
57 </div>
58 <div
59 class="modifier-indicator ${
60 this.controlHold.value ? 'active' : ''
61 }"
62 >
63 <span class="key-name">Control</span>
64 <span class="status">
65 ${this.controlHold.value ? 'HELD' : 'Released'}
66 </span>
67 </div>
68 <div
69 class="modifier-indicator ${this.altHold.value ? 'active' : ''}"
70 >
71 <span class="key-name">Alt / Option</span>
72 <span class="status">
73 ${this.altHold.value ? 'HELD' : 'Released'}
74 </span>
75 </div>
76 <div
77 class="modifier-indicator ${
78 this.metaHold.value ? 'active' : ''
79 }"
80 >
81 <span class="key-name">Meta (⌘ / ⊞)</span>
82 <span class="status">
83 ${this.metaHold.value ? 'HELD' : 'Released'}
84 </span>
85 </div>
86 </div>
87 </section>
88
89 <section class="demo-section">
90 <h2>Space Bar Demo</h2>
91 <div
92 class="space-indicator ${this.spaceHold.value ? 'active' : ''}"
93 >
94 ${this.spaceHold.value ? '🚀 SPACE HELD!' : 'Hold Space Bar'}
95 </div>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected