CIA Compliance Manager — API Documentation - v1.1.50
    Preparing search index...

    Module utils/keyboardUtils

    Keyboard utilities for shortcut handling and platform detection

    This module provides cross-platform keyboard shortcut handling with proper platform detection (Mac vs. Windows/Linux) and key combination parsing.

    import { detectPlatform, getKeyCombination, formatKeyDisplay } from './keyboardUtils';

    // Detect user's platform
    const platform = detectPlatform(); // 'mac' | 'windows' | 'linux' | 'unknown'

    // Handle keyboard event
    document.addEventListener('keydown', (e) => {
    const combo = getKeyCombination(e);
    console.log('Pressed:', combo); // e.g., 'ctrl+shift+k'
    });

    Functions

    resetPlatformCache
    detectPlatform
    getPlatformModifier
    getKeyCombination
    normalizeShortcut
    shortcutsMatch
    formatShortcut
    splitShortcutKeys
    isInputElement
    shouldIgnoreKeyboardEvent
    getPlatformShortcut
    getShortcutAriaLabel
    areKeyboardShortcutsSupported