Skip to content

Version Packages - #3697

Merged
jodeleeuw merged 1 commit into
mainfrom
changeset-release/main
Jul 26, 2026
Merged

Version Packages#3697
jodeleeuw merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

jspsych@8.3.0

Minor Changes

  • #3708 a69d7ad7aca8a0b0d97c5893ab09a368bd9dda25 Thanks @jodeleeuw! - Added a CSS style to jspsych.css that renders <kbd> elements (or any element with class "jspsych-key") as a visual keycap. Wrapping a key name in <kbd> inside a trial renders it as a keycap, e.g. Press <kbd>space</kbd> to continue.

  • #3707 a9f454ee58fda69173dbaa1ecfa4aa7797920031 Thanks @jodeleeuw! - Added the ability to measure how long a response key was held down. The getKeyboardResponse() method of the keyboard plugin API gains an optional wait_for_key_release option; when true, the callback_function fires at key release instead of key press, and its payload includes an rt_key_duration field (the press-to-release duration in milliseconds) alongside the usual key and rt. The five *-keyboard-response plugins (html, image, audio, video, canvas) expose a matching wait_for_key_release trial parameter (default false) and record the new rt_key_duration data field. The release is matched to the press by the physical key (KeyboardEvent.code), so changing the shift state while holding a key (which changes e.key) does not prevent the release from being detected, and the key reported to the callback is always the value from the original keydown event. If the window loses focus while a key is held (a blur event), the browser stops delivering the eventual keyup; in that case the pending release is resolved with rt_key_duration: null (the hold duration cannot be measured) and the held-key state is cleared so it does not leak into the next trial.

@jspsych/plugin-audio-keyboard-response@2.2.0

Minor Changes

  • #3707 a9f454ee58fda69173dbaa1ecfa4aa7797920031 Thanks @jodeleeuw! - Added the ability to measure how long a response key was held down. The getKeyboardResponse() method of the keyboard plugin API gains an optional wait_for_key_release option; when true, the callback_function fires at key release instead of key press, and its payload includes an rt_key_duration field (the press-to-release duration in milliseconds) alongside the usual key and rt. The five *-keyboard-response plugins (html, image, audio, video, canvas) expose a matching wait_for_key_release trial parameter (default false) and record the new rt_key_duration data field. The release is matched to the press by the physical key (KeyboardEvent.code), so changing the shift state while holding a key (which changes e.key) does not prevent the release from being detected, and the key reported to the callback is always the value from the original keydown event. If the window loses focus while a key is held (a blur event), the browser stops delivering the eventual keyup; in that case the pending release is resolved with rt_key_duration: null (the hold duration cannot be measured) and the held-key state is cleared so it does not leak into the next trial.

@jspsych/plugin-canvas-keyboard-response@2.2.0

Minor Changes

  • #3707 a9f454ee58fda69173dbaa1ecfa4aa7797920031 Thanks @jodeleeuw! - Added the ability to measure how long a response key was held down. The getKeyboardResponse() method of the keyboard plugin API gains an optional wait_for_key_release option; when true, the callback_function fires at key release instead of key press, and its payload includes an rt_key_duration field (the press-to-release duration in milliseconds) alongside the usual key and rt. The five *-keyboard-response plugins (html, image, audio, video, canvas) expose a matching wait_for_key_release trial parameter (default false) and record the new rt_key_duration data field. The release is matched to the press by the physical key (KeyboardEvent.code), so changing the shift state while holding a key (which changes e.key) does not prevent the release from being detected, and the key reported to the callback is always the value from the original keydown event. If the window loses focus while a key is held (a blur event), the browser stops delivering the eventual keyup; in that case the pending release is resolved with rt_key_duration: null (the hold duration cannot be measured) and the held-key state is cleared so it does not leak into the next trial.

@jspsych/plugin-html-keyboard-response@2.2.0

Minor Changes

  • #3707 a9f454ee58fda69173dbaa1ecfa4aa7797920031 Thanks @jodeleeuw! - Added the ability to measure how long a response key was held down. The getKeyboardResponse() method of the keyboard plugin API gains an optional wait_for_key_release option; when true, the callback_function fires at key release instead of key press, and its payload includes an rt_key_duration field (the press-to-release duration in milliseconds) alongside the usual key and rt. The five *-keyboard-response plugins (html, image, audio, video, canvas) expose a matching wait_for_key_release trial parameter (default false) and record the new rt_key_duration data field. The release is matched to the press by the physical key (KeyboardEvent.code), so changing the shift state while holding a key (which changes e.key) does not prevent the release from being detected, and the key reported to the callback is always the value from the original keydown event. If the window loses focus while a key is held (a blur event), the browser stops delivering the eventual keyup; in that case the pending release is resolved with rt_key_duration: null (the hold duration cannot be measured) and the held-key state is cleared so it does not leak into the next trial.

@jspsych/plugin-image-keyboard-response@2.2.0

Minor Changes

  • #3707 a9f454ee58fda69173dbaa1ecfa4aa7797920031 Thanks @jodeleeuw! - Added the ability to measure how long a response key was held down. The getKeyboardResponse() method of the keyboard plugin API gains an optional wait_for_key_release option; when true, the callback_function fires at key release instead of key press, and its payload includes an rt_key_duration field (the press-to-release duration in milliseconds) alongside the usual key and rt. The five *-keyboard-response plugins (html, image, audio, video, canvas) expose a matching wait_for_key_release trial parameter (default false) and record the new rt_key_duration data field. The release is matched to the press by the physical key (KeyboardEvent.code), so changing the shift state while holding a key (which changes e.key) does not prevent the release from being detected, and the key reported to the callback is always the value from the original keydown event. If the window loses focus while a key is held (a blur event), the browser stops delivering the eventual keyup; in that case the pending release is resolved with rt_key_duration: null (the hold duration cannot be measured) and the held-key state is cleared so it does not leak into the next trial.

@jspsych/plugin-video-keyboard-response@2.2.0

Minor Changes

  • #3707 a9f454ee58fda69173dbaa1ecfa4aa7797920031 Thanks @jodeleeuw! - Added the ability to measure how long a response key was held down. The getKeyboardResponse() method of the keyboard plugin API gains an optional wait_for_key_release option; when true, the callback_function fires at key release instead of key press, and its payload includes an rt_key_duration field (the press-to-release duration in milliseconds) alongside the usual key and rt. The five *-keyboard-response plugins (html, image, audio, video, canvas) expose a matching wait_for_key_release trial parameter (default false) and record the new rt_key_duration data field. The release is matched to the press by the physical key (KeyboardEvent.code), so changing the shift state while holding a key (which changes e.key) does not prevent the release from being detected, and the key reported to the callback is always the value from the original keydown event. If the window loses focus while a key is held (a blur event), the browser stops delivering the eventual keyup; in that case the pending release is resolved with rt_key_duration: null (the hold duration cannot be measured) and the held-key state is cleared so it does not leak into the next trial.

@jspsych/test-utils@1.3.0

Minor Changes

  • #3707 f14e9784fd49f36ac9051c6d5cdbd7223f391a9b Thanks @jodeleeuw! - The keyDown() and keyUp() helpers accept an optional second argument that sets the code property (the physical key) on the dispatched KeyboardEvent, in addition to the existing key argument. A new windowBlur() helper dispatches a blur event on window and flushes pending promises, for testing behavior that depends on the page losing focus.

@jspsych/config@3.3.4

Patch Changes

  • #3696 972548ec4c71388919f39b701b515f1d5c2793d3 Thanks @jodeleeuw! - Bump build-time dependencies to clear security advisories: esbuild to ^0.25.0 (dev-server CORS advisory), rollup to ^4.59.0 (path-traversal and DOM-clobbering advisories), and rollup-plugin-esbuild to 6.2.1. These are build-tooling dependencies, so there is no change to runtime behavior.

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 5 times, most recently from ae35988 to 5005940 Compare July 22, 2026 15:54
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 5005940 to f83140f Compare July 26, 2026 13:01
@jodeleeuw
jodeleeuw merged commit 04db97d into main Jul 26, 2026
5 checks passed
@jodeleeuw
jodeleeuw deleted the changeset-release/main branch July 26, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant