Skip to content

Keycodes: Do not test for keyCode in isKeyboardEvent #45777

@swissspidy

Description

@swissspidy

What problem does this address?

#43147 had an issue testing keyboard shortcuts because @testing-library/user-event removed support for keyCode in version 14, but isKeyboardEvent still tests for it.

What is your proposed solution?

If that util can be adjusted to test for key instead of keyCode, then workarounds like fireEvent.keyDown() are no longer needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions