# @jspsych/plugin-html-keyboard-response

> jsPsych plugin for displaying a stimulus and getting a keyboard response

Latest version **2.2.0** (published 2026-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jspsych/plugin-html-keyboard-response
pnpm add @jspsych/plugin-html-keyboard-response
yarn add @jspsych/plugin-html-keyboard-response
bun add @jspsych/plugin-html-keyboard-response
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-07-26 |
| First published | 2021-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 105.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1220 |
| Author | Josh de Leeuw |
| Maintainers | bjoluc, jodeleeuw, jadeddelta |

## Links

- npm: https://www.npmjs.com/package/@jspsych/plugin-html-keyboard-response
- Repository: https://github.com/jspsych/jsPsych
- Homepage: https://www.jspsych.org/latest/plugins/html-keyboard-response
- Issues: https://github.com/jspsych/jsPsych/issues
- npm.io page: https://npm.io/package/@jspsych/plugin-html-keyboard-response

## Recent versions

- 2.2.0 (latest) — 2026-07-26
- 2.1.0 — 2025-01-07
- 2.0.0 — 2024-07-16
- 1.1.3 — 2023-11-15
- 1.1.2 — 2022-09-20
- 1.1.1 — 2022-05-19
- 1.1.0 — 2021-12-01
- 1.0.0 — 2021-10-02

## README

![jspsych logo](http://www.jspsych.org/7.0/img/jspsych-logo.jpg)

jsPsych is a JavaScript framework for creating behavioral experiments that run in a web browser.

## Plugin Description

The html-keyboard-response plugin displays HTML content and records responses generated with the keyboard. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant does not respond within a fixed length of time.

## Examples

Several example experiments and plugin demonstrations are available in the `/examples` folder.
After you've downloaded the [latest release](https://github.com/jspsych/jsPsych/releases), double-click on an example HTML file to run it in your web browser, and open it with a programming-friendly text editor to see how it works.

## Documentation

Documentation for this plugin is available [here](https://www.jspsych.org/latest/plugins/html-keyboard-response).

## Getting help

For questions about using the library, please use the GitHub [discussions forum](https://github.com/jspsych/jsPsych/discussions).
You can also browse through the history of Q&A on the forum to find related questions.

## Contributing

We :heart: contributions!
See the [contributing to jsPsych](https://www.jspsych.org/latest/developers/contributing/) documentation page for more information about how you can help.

## Citation

If you use this library in academic work, the preferred citation is:

de Leeuw, J.R., Gilbert, R.A., & Luchterhandt, B. (2023). jsPsych: Enabling an open-source collaborative ecosystem of behavioral experiments. *Journal of Open Source Software*, *8*(85), 5351, [https://joss.theoj.org/papers/10.21105/joss.05351](https://joss.theoj.org/papers/10.21105/joss.05351).

This paper is an updated description of jsPsych and includes all current core team members. It replaces the earlier paper that described jsPsych:

de Leeuw, J.R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. *Behavior Research Methods*, _47_(1), 1-12. doi:[10.3758/s13428-014-0458-y](http://link.springer.com/article/10.3758%2Fs13428-014-0458-y)

Citations help us demonstrate that this library is used and valued, which allows us to continue working on it.

## Contributors

jsPsych is open source project with [numerous contributors](https://github.com/jspsych/jsPsych/graphs/contributors).
The project is currently managed by the core team of Josh de Leeuw ([@jodeleeuw](https://github.com/jodeleeuw)), Becky Gilbert ([@becky-gilbert](https://github.com/becky-gilbert)), and Björn Luchterhandt ([@bjoluc](https://github.com/bjoluc)).

jsPsych was created by [Josh de Leeuw](http://www.twitter.com/joshdeleeuw).

We're also grateful for the generous support from a [Mozilla Open Source Support award](https://www.mozilla.org/en-US/moss/), which funded development of the library from 2020-2021.

---
_Source: https://npm.io/package/@jspsych/plugin-html-keyboard-response · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
