{
  "doc": {
    "id": "api/cypress-api/keyboard-api",
    "title": "Cypress.Keyboard | Cypress Documentation",
    "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": "3cf5b86b3403f604bdf7f3e35025c3bc3865e02c",
    "updated_at": "2026-05-07T17:44:31.931Z",
    "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#remove-the-keystroke-delay",
        "text": "Remove 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)Cypress.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` | `10` | The delay, in milliseconds, between keystrokes while typing with [.type()](/llm/markdown/api/commands/type.md). Set to `0` to remove the delay. Must be a non-negative number. |\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 257
    },
    {
      "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` | `10` | The delay, in milliseconds, between keystrokes while typing with [.type()](/llm/markdown/api/commands/type.md). Set to `0` to remove the delay. Must be a non-negative number. |\n",
      "section": "api",
      "anchors": [
        "defaults-arguments"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 69
    },
    {
      "id": "api/cypress-api/keyboard-api#examples",
      "doc_id": "api/cypress-api/keyboard-api",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Press tab key\n\n```\ncy.press(Cypress.Keyboard.Keys.TAB)cy.get('input.second').should('have.focus')\n```\n\n### Slow down typing by increasing the keystroke delay\n\n```\nCypress.Keyboard.defaults({  keystrokeDelay: 20,})\n```\n\n### Remove the keystroke delay\n\n```\nCypress.Keyboard.defaults({  keystrokeDelay: 0,})\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 44
    },
    {
      "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(  'removes keystroke delay for all typing in this test',  { keystrokeDelay: 0 },  () => {    cy.get('input').eq(0).type('fast typing')    cy.get('input').eq(1).type('more fast typing')  })describe(  'removes keystroke delay in all tests in this suite',  { keystrokeDelay: 0 },  () => {    it('types fast in the first input', () => {      cy.get('input').eq(0).type('fast typing')    })    it('types fast in the second input', () => {      cy.get('input').eq(1).type('more fast typing')    })  })\n```\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 173
    },
    {
      "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(  'removes keystroke delay for all typing in this test',  { keystrokeDelay: 0 },  () => {    cy.get('input').eq(0).type('fast typing')    cy.get('input').eq(1).type('more fast typing')  })describe(  'removes keystroke delay in all tests in this suite',  { keystrokeDelay: 0 },  () => {    it('types fast in the first input', () => {      cy.get('input').eq(0).type('fast typing')    })    it('types fast in the second input', () => {      cy.get('input').eq(1).type('more fast typing')    })  })\n```\n",
      "section": "api",
      "anchors": [
        "set-the-keystroke-delay-in-test-configuration"
      ],
      "path": "/llm/json/chunked/api/cypress-api/keyboard-api.json",
      "token_estimate": 135
    }
  ]
}