I have the following JS:
Qualtrics.SurveyEngine.addOnload(function()
{
var that = this;
Event.observe(document, 'keydown', function keydownCallback(e) { //Set values for keys
var choiceID = null;
switch (e.keyCode) {
case 75: // 'k' was pressed
choiceID = 1;
}
if (choiceID) {
Event.stopObserving(document, 'keydown', keydownCallback);
that.setChoiceValue(choiceID, true)
that.clickNextButton();
} //Advance when key are pressed
});
});
I am happy that when I type "k," the survey moves forward. However, the survey respondent has the option of clicking on the "Next" button or clicking typing "k." I want to be able to see that the respondent typed "k" (or just clicked "Next") when I export the survey as a CSV file, preferably in a variable.
How do I record a keystroke that appears when I export the survey as a CSV file?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
