Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(keyboard): parse escaped bracket followed by descriptor #814

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

ph-fritsche
Copy link
Member

@ph-fritsche ph-fritsche commented Dec 28, 2021

What:

Fix key descriptor parsing.

Why:

Closes #769

How:

Always treat repeated brackets as escaped brackets.
Support describing keys per printable key inside { } brackets so that they can be used with modifiers.

{{{ArrowLeft}: press+release {, then press+release ArrowLeft
{\{>5}: press { for 5 keydowns

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@ph-fritsche ph-fritsche added this to the userEvent v14 milestone Dec 28, 2021
@codesandbox-ci
Copy link

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.

Latest deployment of this branch, based on commit 591a5ce:

Sandbox Source
userEvent-PR-template Configuration
user-event-13.4.2 Issue #769
user-event-13.5.0 Issue #769

@codecov
Copy link

codecov bot commented Dec 28, 2021

Codecov Report

Merging #814 (591a5ce) into beta (2c5d9f1) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              beta      #814   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           77        77           
  Lines         1572      1572           
  Branches       557       556    -1     
=========================================
  Hits          1572      1572           
Impacted Files Coverage Δ
src/utils/keyDef/readNextDescriptor.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c5d9f1...591a5ce. Read the comment docs.

@ph-fritsche ph-fritsche merged commit 684451f into beta Dec 30, 2021
@ph-fritsche ph-fritsche deleted the fix-769 branch December 30, 2021 07:26
@github-actions
Copy link

🎉 This PR is included in version 14.0.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

user-event (version 13.5.0) doesn't understand{{{arrowleft} correctly
1 participant