Skip to content

fix: keyList must be a list, not a bare string - #334

Merged
pellet merged 3 commits into
NeuroTechX:masterfrom
pellet:fix/escape-key-detection
Aug 29, 2026
Merged

fix: keyList must be a list, not a bare string#334
pellet merged 3 commits into
NeuroTechX:masterfrom
pellet:fix/escape-key-detection

Conversation

@pellet

@pellet pellet commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

getKeys() filters with key[0] in keyList, so a bare string is a substring test:
'escape' fires on a/c/e/p/s and silently aborts a running experiment.

Fixed in _user_input() plus 20 waitKeys() gates. Note 'space', not 'spacebar'
not a psychopy key name; ['spacebar'] would match nothing

pellet added 2 commits August 29, 2026 15:11
getKeys() filters with `key[0] in keyList`, so 'escape' matched a/c/e/p/s and
silently aborted running experiments. 'space', not 'spacebar' -- the latter is
not a psychopy key name and only worked as a substring.
Over-permissive continue prompts; identical substring bug to the previous commit.
@pellet
pellet marked this pull request as ready for review August 29, 2026 06:26
@pellet
pellet merged commit 41694d4 into NeuroTechX:master Aug 29, 2026
8 checks passed
@pellet
pellet deleted the fix/escape-key-detection branch August 29, 2026 11:13
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