Skip to main content
cngx-src documentation

matchesKeyCombo

Functioncore/utils/keyboard

projects/core/utils/keyboard.util.ts

Description#

Tests whether a KeyboardEvent matches a parsed KeyCombo.

Signature#

matchesKeyCombo(event: KeyboardEvent, combo: KeyCombo, isMac: boolean)

Parameters#

@parameventKeyboardEvent

The keyboard event to test.

@paramcomboKeyCombo

The parsed combo to match against.

@paramisMacboolean

Whether the current platform is macOS (affects mod resolution).

Returns#

boolean