* Extract modifier flags from KeyboardEvent * @param event - KeyboardEvent * @returns Mods flags
(event: KeyboardEvent)
| 263 | * @returns Mods flags |
| 264 | */ |
| 265 | private extractModifiers(event: KeyboardEvent): Mods { |
| 266 | let mods = Mods.NONE; |
| 267 | |
| 268 | if (event.shiftKey) mods |= Mods.SHIFT; |
| 269 | if (event.ctrlKey) mods |= Mods.CTRL; |
| 270 | if (event.altKey) mods |= Mods.ALT; |
| 271 | if (event.metaKey) mods |= Mods.SUPER; |
| 272 | |
| 273 | // Note: CapsLock and NumLock are not in KeyboardEvent modifiers |
| 274 | // They would need to be tracked separately if needed |
| 275 | // For now, we don't set CAPSLOCK or NUMLOCK flags |
| 276 | |
| 277 | return mods; |
| 278 | } |
| 279 | |
| 280 | /** |
| 281 | * Check if this is a printable character with no special modifiers |