MCPcopy Create free account
hub / github.com/testing-library/user-event / getModifierState

Function getModifierState

src/event/createEvent.ts:166–183  ·  view source on GitHub ↗
(k: string)

Source from the content-addressed store, hash-verified

164 metaKey: Boolean(metaKey),
165 shiftKey: Boolean(shiftKey),
166 getModifierState(k: string) {
167 return Boolean(
168 {
169 Alt: altKey,
170 AltGraph: modifierAltGraph,
171 CapsLock: modifierCapsLock,
172 Control: ctrlKey,
173 Fn: modifierFn,
174 FnLock: modifierFnLock,
175 Meta: metaKey,
176 NumLock: modifierNumLock,
177 ScrollLock: modifierScrollLock,
178 Shift: shiftKey,
179 Symbol: modifierSymbol,
180 SymbolLock: modifierSymbolLock,
181 }[k],
182 )
183 },
184 })
185}
186

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected