Home / Function/ checkKeyCodes() — vue Function Reference

checkKeyCodes() — vue Function Reference

Architecture documentation for the checkKeyCodes() function in check-keycodes.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  2a912629_0971_8a64_979f_6ceb43905896["checkKeyCodes()"]
  261e5ebf_c209_6a5c_59aa_b7f8e4476d48["isKeyNotMatch()"]
  2a912629_0971_8a64_979f_6ceb43905896 -->|calls| 261e5ebf_c209_6a5c_59aa_b7f8e4476d48
  e667d00b_a47f_c88a_e931_82b5917dddc2["hyphenate()"]
  2a912629_0971_8a64_979f_6ceb43905896 -->|calls| e667d00b_a47f_c88a_e931_82b5917dddc2
  style 2a912629_0971_8a64_979f_6ceb43905896 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/instance/render-helpers/check-keycodes.ts lines 17–33

export function checkKeyCodes(
  eventKeyCode: number,
  key: string,
  builtInKeyCode?: number | Array<number>,
  eventKeyName?: string,
  builtInKeyName?: string | Array<string>
): boolean | null | undefined {
  const mappedKeyCode = config.keyCodes[key] || builtInKeyCode
  if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
    return isKeyNotMatch(builtInKeyName, eventKeyName)
  } else if (mappedKeyCode) {
    return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  } else if (eventKeyName) {
    return hyphenate(eventKeyName) !== key
  }
  return eventKeyCode === undefined
}

Domain

Subdomains

Frequently Asked Questions

What does checkKeyCodes() do?
checkKeyCodes() is a function in the vue codebase.
What does checkKeyCodes() call?
checkKeyCodes() calls 2 function(s): hyphenate, isKeyNotMatch.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free