From 7a69fa80b8ae0f4cd20311226469cbfc8f0dc25f Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Mon, 22 Sep 2025 10:48:08 -0400 Subject: [PATCH 1/2] docs: add escape key --- docs/api/commands/press.mdx | 4 +++- docs/api/cypress-api/keyboard-api.mdx | 23 ++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/api/commands/press.mdx b/docs/api/commands/press.mdx index a9c1dbb268..3d9eae9823 100644 --- a/docs/api/commands/press.mdx +++ b/docs/api/commands/press.mdx @@ -67,10 +67,11 @@ The key to press. Values for non single character keys are available on [`Cypres | Letters | `"a"` through `"z"`, `"A"` through `"Z"` | | Numbers | `"0"`, `"1"`, `"2"`, `"3"`, `"4"`, `"5"`, `"6"`, `"7"`, `"8"`, `"9"` | | Special Characters | `"!"`, `"@"`, `"#"`, `'+'`, `"€"`, `"é"`, etc. | +| `Cypress.Keyboard.Keys.UP` | `"ArrowUp"` | | `Cypress.Keyboard.Keys.DOWN` | `"ArrowDown"` | | `Cypress.Keyboard.Keys.LEFT` | `"ArrowLeft"` | | `Cypress.Keyboard.Keys.RIGHT` | `"ArrowRight"` | -| `Cypress.Keyboard.Keys.UP` | `"ArrowUp"` | +| `Cypress.Keyboard.Keys.ESC` | `"Escape"` | | `Cypress.Keyboard.Keys.END` | `"End"` | | `Cypress.Keyboard.Keys.HOME` | `"Home"` | | `Cypress.Keyboard.Keys.PAGEDOWN` | `"PageDown"` | @@ -171,6 +172,7 @@ If your application prevents the default behavior of the `beforeunload` event, t | ----------------------------------- | ----------------------------------------------------------------------------------- | | [14.3.0](/app/references/changelog) | Added the `.press()` command | | [15.1.0](/app/references/changelog) | Expanded support to include named keys and single+multi-codepoint UTF-8 characters. | +| [15.3.0](/app/references/changelog) | Added support for `{esc}` key. | ## See also diff --git a/docs/api/cypress-api/keyboard-api.mdx b/docs/api/cypress-api/keyboard-api.mdx index e01f3ab19f..694b5471d7 100644 --- a/docs/api/cypress-api/keyboard-api.mdx +++ b/docs/api/cypress-api/keyboard-api.mdx @@ -27,9 +27,26 @@ The key available for `cy.press()`. The following keys are supported: -| Reference | Value | -| --------------------------- | ------- | -| `Cypress.Keyboard.Keys.TAB` | `"Tab"` | +| Reference | Value | +| --------------------------------- | -------------------------------------------------------------------- | +| Letters | `"a"` through `"z"`, `"A"` through `"Z"` | +| Numbers | `"0"`, `"1"`, `"2"`, `"3"`, `"4"`, `"5"`, `"6"`, `"7"`, `"8"`, `"9"` | +| Special Characters | `"!"`, `"@"`, `"#"`, `'+'`, `"€"`, `"é"`, etc. | +| `Cypress.Keyboard.Keys.UP` | `"ArrowUp"` | +| `Cypress.Keyboard.Keys.DOWN` | `"ArrowDown"` | +| `Cypress.Keyboard.Keys.LEFT` | `"ArrowLeft"` | +| `Cypress.Keyboard.Keys.RIGHT` | `"ArrowRight"` | +| `Cypress.Keyboard.Keys.ESC` | `"Escape"` | +| `Cypress.Keyboard.Keys.END` | `"End"` | +| `Cypress.Keyboard.Keys.HOME` | `"Home"` | +| `Cypress.Keyboard.Keys.PAGEDOWN` | `"PageDown"` | +| `Cypress.Keyboard.Keys.PAGEUP` | `"PageUp"` | +| `Cypress.Keyboard.Keys.ENTER` | `"Enter"` | +| `Cypress.Keyboard.Keys.TAB` | `"Tab"` | +| `Cypress.Keyboard.Keys.BACKSPACE` | `"Backspace"` | +| `Cypress.Keyboard.Keys.DELETE` | `"Delete"` | +| `Cypress.Keyboard.Keys.INSERT` | `"Insert"` | +| `Cypress.Keyboard.Keys.SPACE` | `"Space"` | ### defaults Arguments From 8aa0b3e727ed5bf21d24f444829fed2fe170c18d Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Mon, 22 Sep 2025 11:38:12 -0400 Subject: [PATCH 2/2] reorder history for cy.press --- docs/api/commands/press.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/commands/press.mdx b/docs/api/commands/press.mdx index 3d9eae9823..7221a48671 100644 --- a/docs/api/commands/press.mdx +++ b/docs/api/commands/press.mdx @@ -170,9 +170,9 @@ If your application prevents the default behavior of the `beforeunload` event, t | Version | Changes | | ----------------------------------- | ----------------------------------------------------------------------------------- | -| [14.3.0](/app/references/changelog) | Added the `.press()` command | -| [15.1.0](/app/references/changelog) | Expanded support to include named keys and single+multi-codepoint UTF-8 characters. | | [15.3.0](/app/references/changelog) | Added support for `{esc}` key. | +| [15.1.0](/app/references/changelog) | Expanded support to include named keys and single+multi-codepoint UTF-8 characters. | +| [14.3.0](/app/references/changelog) | Added the `.press()` command | ## See also