Skip to content
Discussion options

You must be logged in to vote

Hi @sp-conway,

The RT is measured from the moment that the keyboard listener is created by calling getKeyboardResponse.

What I would recommend is rather than trying to schedule all of the drawing events with different calls to setTimeout you should chain together these events so that one triggers the next. For example:

function begin(){
	draw_fixation_cross();
	jsPsych.pluginAPI.setTimeout(blank_screen, fix_dur);
}

function blank_screen(){
	clear_screen();
	jsPsych.pluginAPI.setTimeout(draw_lines, post_fix_dur);
}

function draw_lines(){
	if(n_stim == 1){
		drawline1();
	}
	if(n_stim == 2){
		drawline2();
	}
	if(n_stim == 3){
		drawline3();
	}
	jsPsych.pluginAPI.getKeyboardResponse({ ... })

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sp-conway
Comment options

@jodeleeuw
Comment options

Answer selected by sp-conway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants