{
  "doc": {
    "id": "api/cypress-api/keyboard-api",
    "title": "Cypress.Keyboard",
    "description": "Set the default values for how the .type() command is executed in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/cypress-api/keyboard-api.md",
    "version": "c4ad6f88c531de58221c73dd91a75af7138334b8",
    "updated_at": "2026-11-10T01:15:02.829Z",
    "headings": [
      {
        "id": "api/cypress-api/keyboard-api#cypress-keyboard",
        "text": "Cypress.Keyboard",
        "level": 1
      },
      {
        "id": "api/cypress-api/keyboard-api#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/cypress-api/keyboard-api#keys-arguments",
        "text": "Keys Arguments",
        "level": 3
      },
      {
        "id": "api/cypress-api/keyboard-api#defaults-arguments",
        "text": "defaults Arguments",
        "level": 3
      },
      {
        "id": "api/cypress-api/keyboard-api#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/cypress-api/keyboard-api#press-tab-key",
        "text": "Press tab key",
        "level": 3
      },
      {
        "id": "api/cypress-api/keyboard-api#slow-down-typing-by-increasing-the-keystroke-delay",
        "text": "Slow down typing by increasing the keystroke delay",
        "level": 3
      },
      {
        "id": "api/cypress-api/keyboard-api#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/cypress-api/keyboard-api#where-to-put-keyboard-configuration",
        "text": "Where to put Keyboard configuration",
        "level": 3
      },
      {
        "id": "api/cypress-api/keyboard-api#set-the-keystroke-delay-in-test-configuration",
        "text": "Set the keystroke delay in test configuration",
        "level": 3
      },
      {
        "id": "api/cypress-api/keyboard-api#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/cypress-api/keyboard-api#syntax",
      "doc_id": "api/cypress-api/keyboard-api",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\nCypress.Keyboard.Keys(key)\nCypress.Keyboard.defaults(options)\n```\n\n### Keys Arguments\n\n**key _(String)_**\n\nThe key available for `cy.press()`.\n\nThe following keys are supported:\n\n| Reference | Value |\n| --- | --- |\n| Letters | `\"a\"` through `\"z\"`, `\"A\"` through `\"Z\"` |\n| Numbers | `\"0\"`, `\"1\"`, `\"2\"`, `\"3\"`, `\"4\"`, `\"5\"`, `\"6\"`, `\"7\"`, `\"8\"`, `\"9\"` |\n| Special Characters | `\"!\"`, `\"@\"`, `\"#\"`, `'+'`, `\"€\"`, `\"é\"`, etc. |\n| `Cypress.Keyboard.Keys.UP` | `\"ArrowUp\"` |\n| `Cypress.Keyboard.Keys.DOWN` | `\"ArrowDown\"` |\n| `Cypress.Keyboard.Keys.LEFT` | `\"ArrowLeft\"` |\n| `Cypress.Keyboard.Keys.RIGHT` | `\"ArrowRight\"` |\n| `Cypress.Keyboard.Keys.ESC` | `\"Escape\"` |\n| `Cypress.Keyboard.Keys.END` | `\"End\"` |\n| `Cypress.Keyboard.Keys.HOME` | `\"Home\"` |\n| `Cypress.Keyboard.Keys.PAGEDOWN` | `\"PageDown\"` |\n| `Cypress.Keyboard.Keys.PAGEUP` | `\"PageUp\"` |\n| `Cypress.Keyboard.Keys.ENTER` | `\"Enter\"` |\n| `Cypress.Keyboard.Keys.TAB` | `\"Tab\"` |\n| `Cypress.Keyboard.Keys.BACKSPACE` | `\"Backspace\"` |\n| `Cypress.Keyboard.Keys.DELETE` | `\"Delete\"` |\n| `Cypress.Keyboard.Keys.INSERT` | `\"Insert\"` |\n| `Cypress.Keyboard.Keys.SPACE` | `\"Space\"` |\n\n### defaults Arguments\n\n**options _(Object)_**\n\nAn object containing the following:\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `keystrokeDelay` | `null` | The delay, in milliseconds, between keystrokes while typing with [.type()](/llm/markdown/api/commands/type.md). Must be a non-negative number. |\n\n`keystrokeDelay` can also be set in the [Cypress configuration](/llm/markdown/app/references/configuration.md#Keyboard). The resolved value is read from the configuration first, then from `Cypress.Keyboard.defaults()`, and falls back to `0` if neither is set. A per-command `delay` passed to [`.type()`](/llm/markdown/api/commands/type.md) is independent of this and overrides the resolved value for that single call.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 315
    },
    {
      "id": "api/cypress-api/keyboard-api#keys-arguments",
      "doc_id": "api/cypress-api/keyboard-api",
      "heading": "Keys Arguments",
      "heading_level": 3,
      "content_markdown": "### Keys Arguments\n\n**key _(String)_**\n\nThe key available for `cy.press()`.\n\nThe following keys are supported:\n\n| Reference | Value |\n| --- | --- |\n| Letters | `\"a\"` through `\"z\"`, `\"A\"` through `\"Z\"` |\n| Numbers | `\"0\"`, `\"1\"`, `\"2\"`, `\"3\"`, `\"4\"`, `\"5\"`, `\"6\"`, `\"7\"`, `\"8\"`, `\"9\"` |\n| Special Characters | `\"!\"`, `\"@\"`, `\"#\"`, `'+'`, `\"€\"`, `\"é\"`, etc. |\n| `Cypress.Keyboard.Keys.UP` | `\"ArrowUp\"` |\n| `Cypress.Keyboard.Keys.DOWN` | `\"ArrowDown\"` |\n| `Cypress.Keyboard.Keys.LEFT` | `\"ArrowLeft\"` |\n| `Cypress.Keyboard.Keys.RIGHT` | `\"ArrowRight\"` |\n| `Cypress.Keyboard.Keys.ESC` | `\"Escape\"` |\n| `Cypress.Keyboard.Keys.END` | `\"End\"` |\n| `Cypress.Keyboard.Keys.HOME` | `\"Home\"` |\n| `Cypress.Keyboard.Keys.PAGEDOWN` | `\"PageDown\"` |\n| `Cypress.Keyboard.Keys.PAGEUP` | `\"PageUp\"` |\n| `Cypress.Keyboard.Keys.ENTER` | `\"Enter\"` |\n| `Cypress.Keyboard.Keys.TAB` | `\"Tab\"` |\n| `Cypress.Keyboard.Keys.BACKSPACE` | `\"Backspace\"` |\n| `Cypress.Keyboard.Keys.DELETE` | `\"Delete\"` |\n| `Cypress.Keyboard.Keys.INSERT` | `\"Insert\"` |\n| `Cypress.Keyboard.Keys.SPACE` | `\"Space\"` |\n",
      "section": "api",
      "anchors": [
        "keys-arguments"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 181
    },
    {
      "id": "api/cypress-api/keyboard-api#defaults-arguments",
      "doc_id": "api/cypress-api/keyboard-api",
      "heading": "defaults Arguments",
      "heading_level": 3,
      "content_markdown": "### defaults Arguments\n\n**options _(Object)_**\n\nAn object containing the following:\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `keystrokeDelay` | `null` | The delay, in milliseconds, between keystrokes while typing with [.type()](/llm/markdown/api/commands/type.md). Must be a non-negative number. |\n\n`keystrokeDelay` can also be set in the [Cypress configuration](/llm/markdown/app/references/configuration.md#Keyboard). The resolved value is read from the configuration first, then from `Cypress.Keyboard.defaults()`, and falls back to `0` if neither is set. A per-command `delay` passed to [`.type()`](/llm/markdown/api/commands/type.md) is independent of this and overrides the resolved value for that single call.\n",
      "section": "api",
      "anchors": [
        "defaults-arguments"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 125
    },
    {
      "id": "api/cypress-api/keyboard-api#notes",
      "doc_id": "api/cypress-api/keyboard-api",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Where to put Keyboard configuration\n\nA great place to put this configuration is in the [supportFile](/llm/markdown/app/core-concepts/writing-and-organizing-tests.md#Support-file), since it is loaded before any test files are evaluated.\n\n### Set the keystroke delay in test configuration\n\nThe keystroke delay can also be set via [test configuration](/llm/markdown/app/core-concepts/writing-and-organizing-tests.md#Test-Configuration), which can be useful when setting it for a single test or a subset of tests.\n\n```\nit(\n  'adds a keystroke delay for all typing in this test',\n  { keystrokeDelay: 10 },\n  () => {\n    cy.get('input').eq(0).type('slow typing')\n    cy.get('input').eq(1).type('more slow typing')\n  }\n)\n\ndescribe(\n  'adds a keystroke delay in all tests in this suite',\n  { keystrokeDelay: 10 },\n  () => {\n    it('types with delay in the first input', () => {\n      cy.get('input').eq(0).type('slow typing')\n    })\n\n    it('types with delay in the second input', () => {\n      cy.get('input').eq(1).type('more slow typing')\n    })\n  }\n)\n```\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 183
    },
    {
      "id": "api/cypress-api/keyboard-api#set-the-keystroke-delay-in-test-configuration",
      "doc_id": "api/cypress-api/keyboard-api",
      "heading": "Set the keystroke delay in test configuration",
      "heading_level": 3,
      "content_markdown": "### Set the keystroke delay in test configuration\n\nThe keystroke delay can also be set via [test configuration](/llm/markdown/app/core-concepts/writing-and-organizing-tests.md#Test-Configuration), which can be useful when setting it for a single test or a subset of tests.\n\n```\nit(\n  'adds a keystroke delay for all typing in this test',\n  { keystrokeDelay: 10 },\n  () => {\n    cy.get('input').eq(0).type('slow typing')\n    cy.get('input').eq(1).type('more slow typing')\n  }\n)\n\ndescribe(\n  'adds a keystroke delay in all tests in this suite',\n  { keystrokeDelay: 10 },\n  () => {\n    it('types with delay in the first input', () => {\n      cy.get('input').eq(0).type('slow typing')\n    })\n\n    it('types with delay in the second input', () => {\n      cy.get('input').eq(1).type('more slow typing')\n    })\n  }\n)\n```\n",
      "section": "api",
      "anchors": [
        "set-the-keystroke-delay-in-test-configuration"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 144
    }
  ]
}