user-event icon indicating copy to clipboard operation
user-event copied to clipboard

Add brackets (`[]{}`) to defaultKeyMap for keyboard()/type()

Open bawjensen opened this issue 1 year ago • 1 comments

What:

Adding support for brackets to address #1225

Why:

To allow easier testing of functionality that relies on both key and code being valid for keyboard events involving left/right brackets

How:

Updated keyMap.ts, ran the test suite.

Checklist:

  • [N/A] Documentation
  • [x] Tests
  • [x] Ready to be merged

I'm unclear whether any documentation needs updating, since I imagine this just falls under the heading of the TODO at the bottom of keyMap.ts, i.e. this is simply filling out the mappings.

Also I considered the updates to the existing tests enough, but it's possibly I ought to add more test cases (namely for the right bracket cases).

bawjensen avatar Jun 18 '24 19:06 bawjensen

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codesandbox-ci[bot] avatar Jun 18 '24 19:06 codesandbox-ci[bot]

:tada: This PR is included in version 14.6.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jan 21 '25 17:01 github-actions[bot]