Home / Function/ isKeypressCommand() — react Function Reference

isKeypressCommand() — react Function Reference

Architecture documentation for the isKeypressCommand() function in BeforeInputEventPlugin.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  c6e61bc7_4505_cc0c_c72b_758c9ce05187["isKeypressCommand()"]
  a235366c_1abe_162c_b9bf_7fbbfb597584["BeforeInputEventPlugin.js"]
  c6e61bc7_4505_cc0c_c72b_758c9ce05187 -->|defined in| a235366c_1abe_162c_b9bf_7fbbfb597584
  17925d0e_e60e_3acc_8c2a_0e7947a22eeb["getFallbackBeforeInputChars()"]
  17925d0e_e60e_3acc_8c2a_0e7947a22eeb -->|calls| c6e61bc7_4505_cc0c_c72b_758c9ce05187
  style c6e61bc7_4505_cc0c_c72b_758c9ce05187 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/events/plugins/BeforeInputEventPlugin.js lines 99–105

function isKeypressCommand(nativeEvent: any) {
  return (
    (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
    // ctrlKey && altKey is equivalent to AltGr, and is not a command.
    !(nativeEvent.ctrlKey && nativeEvent.altKey)
  );
}

Domain

Subdomains

Frequently Asked Questions

What does isKeypressCommand() do?
isKeypressCommand() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/plugins/BeforeInputEventPlugin.js.
Where is isKeypressCommand() defined?
isKeypressCommand() is defined in packages/react-dom-bindings/src/events/plugins/BeforeInputEventPlugin.js at line 99.
What calls isKeypressCommand()?
isKeypressCommand() is called by 1 function(s): getFallbackBeforeInputChars.

Analyze Your Own Codebase

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

Try Supermodel Free