Skip to content

Commit 67a6046

Browse files
docs: add escape key to supported key.press() named keys (#6279)
* docs: add escape key * reorder history for cy.press --------- Co-authored-by: Jennifer Shehane <[email protected]>
1 parent a224312 commit 67a6046

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

docs/api/commands/press.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ The key to press. Values for non single character keys are available on [`Cypres
6767
| Letters | `"a"` through `"z"`, `"A"` through `"Z"` |
6868
| Numbers | `"0"`, `"1"`, `"2"`, `"3"`, `"4"`, `"5"`, `"6"`, `"7"`, `"8"`, `"9"` |
6969
| Special Characters | `"!"`, `"@"`, `"#"`, `'+'`, `"€"`, `"é"`, etc. |
70+
| `Cypress.Keyboard.Keys.UP` | `"ArrowUp"` |
7071
| `Cypress.Keyboard.Keys.DOWN` | `"ArrowDown"` |
7172
| `Cypress.Keyboard.Keys.LEFT` | `"ArrowLeft"` |
7273
| `Cypress.Keyboard.Keys.RIGHT` | `"ArrowRight"` |
73-
| `Cypress.Keyboard.Keys.UP` | `"ArrowUp"` |
74+
| `Cypress.Keyboard.Keys.ESC` | `"Escape"` |
7475
| `Cypress.Keyboard.Keys.END` | `"End"` |
7576
| `Cypress.Keyboard.Keys.HOME` | `"Home"` |
7677
| `Cypress.Keyboard.Keys.PAGEDOWN` | `"PageDown"` |
@@ -167,10 +168,11 @@ If your application prevents the default behavior of the `beforeunload` event, t
167168

168169
## History
169170

170-
| Version | Changes |
171-
| ------------------------------------------ | ----------------------------------------------------------------------------------- |
172-
| [15.1.0](/app/references/changelog#15-1-0) | Expanded support to include named keys and single+multi-codepoint UTF-8 characters. |
173-
| [14.3.0](/app/references/changelog#14-3-0) | Added the `.press()` command |
171+
| Version | Changes |
172+
| ----------------------------------- | ----------------------------------------------------------------------------------- |
173+
| [15.3.0](/app/references/changelog) | Added support for `{esc}` key. |
174+
| [15.1.0](/app/references/changelog) | Expanded support to include named keys and single+multi-codepoint UTF-8 characters. |
175+
| [14.3.0](/app/references/changelog) | Added the `.press()` command |
174176

175177
## See also
176178

docs/api/cypress-api/keyboard-api.mdx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,26 @@ The key available for `cy.press()`.
2727

2828
The following keys are supported:
2929

30-
| Reference | Value |
31-
| --------------------------- | ------- |
32-
| `Cypress.Keyboard.Keys.TAB` | `"Tab"` |
30+
| Reference | Value |
31+
| --------------------------------- | -------------------------------------------------------------------- |
32+
| Letters | `"a"` through `"z"`, `"A"` through `"Z"` |
33+
| Numbers | `"0"`, `"1"`, `"2"`, `"3"`, `"4"`, `"5"`, `"6"`, `"7"`, `"8"`, `"9"` |
34+
| Special Characters | `"!"`, `"@"`, `"#"`, `'+'`, `"€"`, `"é"`, etc. |
35+
| `Cypress.Keyboard.Keys.UP` | `"ArrowUp"` |
36+
| `Cypress.Keyboard.Keys.DOWN` | `"ArrowDown"` |
37+
| `Cypress.Keyboard.Keys.LEFT` | `"ArrowLeft"` |
38+
| `Cypress.Keyboard.Keys.RIGHT` | `"ArrowRight"` |
39+
| `Cypress.Keyboard.Keys.ESC` | `"Escape"` |
40+
| `Cypress.Keyboard.Keys.END` | `"End"` |
41+
| `Cypress.Keyboard.Keys.HOME` | `"Home"` |
42+
| `Cypress.Keyboard.Keys.PAGEDOWN` | `"PageDown"` |
43+
| `Cypress.Keyboard.Keys.PAGEUP` | `"PageUp"` |
44+
| `Cypress.Keyboard.Keys.ENTER` | `"Enter"` |
45+
| `Cypress.Keyboard.Keys.TAB` | `"Tab"` |
46+
| `Cypress.Keyboard.Keys.BACKSPACE` | `"Backspace"` |
47+
| `Cypress.Keyboard.Keys.DELETE` | `"Delete"` |
48+
| `Cypress.Keyboard.Keys.INSERT` | `"Insert"` |
49+
| `Cypress.Keyboard.Keys.SPACE` | `"Space"` |
3350

3451
### defaults Arguments
3552

0 commit comments

Comments
 (0)