1234567891011121314151617181920212223 |
- let theseKeys = psychoJS.eventManager.getKeys({keyList:['space']});
-
- // check for quit:
- if (theseKeys.indexOf('escape') > -1) {
- psychoJS.experiment.experimentEnded = true;
- }
- if (theseKeys.length > 0) { // at least one key was pressed
- let completed_ratings = 0;
- for(var thisSlider of [mainSoundsratings]) {
- if (thisSlider.getRating() !== undefined) { // so equality check is with an undefined type, not string
- completed_ratings = completed_ratings + 1;
- }
- }
- if (completed_ratings === 1) {
- continueRoutine = false; // end now
- }
- }
|