Skip to content

Commit 7a69fa8

Browse files
committed
docs: add escape key
1 parent e264503 commit 7a69fa8

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

docs/api/commands/press.mdx

Lines changed: 3 additions & 1 deletion
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"` |
@@ -171,6 +172,7 @@ If your application prevents the default behavior of the `beforeunload` event, t
171172
| ----------------------------------- | ----------------------------------------------------------------------------------- |
172173
| [14.3.0](/app/references/changelog) | Added the `.press()` command |
173174
| [15.1.0](/app/references/changelog) | Expanded support to include named keys and single+multi-codepoint UTF-8 characters. |
175+
| [15.3.0](/app/references/changelog) | Added support for `{esc}` key. |
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)