(
event: KeyboardEvent | MouseEvent,
{
altKey,
ctrlKey,
metaKey,
shiftKey,
modifierAltGraph,
modifierCapsLock,
modifierFn,
modifierFnLock,
modifierNumLock,
modifierScrollLock,
modifierSymbol,
modifierSymbolLock,
}: EventModifierInit,
)
| 142 | } |
| 143 | |
| 144 | function initUIEventModifiers( |
| 145 | event: KeyboardEvent | MouseEvent, |
| 146 | { |
| 147 | altKey, |
| 148 | ctrlKey, |
| 149 | metaKey, |
| 150 | shiftKey, |
| 151 | modifierAltGraph, |
| 152 | modifierCapsLock, |
| 153 | modifierFn, |
| 154 | modifierFnLock, |
| 155 | modifierNumLock, |
| 156 | modifierScrollLock, |
| 157 | modifierSymbol, |
| 158 | modifierSymbolLock, |
| 159 | }: EventModifierInit, |
| 160 | ) { |
| 161 | assignProps(event, { |
| 162 | altKey: Boolean(altKey), |
| 163 | ctrlKey: Boolean(ctrlKey), |
| 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 | |
| 187 | function initKeyboardEvent( |
| 188 | event: KeyboardEvent, |
nothing calls this directly
no test coverage detected