Hello,
I am trying to record the amount of times a key is pressed during a video that plays in full screen. I can successfully make the video play in full screen automatically and record key presses but not at the same time. It seems that the question needs to clicked upon before it starts counting the key presses which never happens when the video starts in full screen. I had to disable the controls in the video in order to prevent rewinding, therefore, I can't allow participants to open in full screen themselves. Does anyone know of any potential solutions? Below is my current code for the question containing the video.
I appreciate any help!
Solved
Recording key presses while full screen?
Best answer by TomG
- https://community.qualtrics.com/XMcommunity/discussion/comment/45536#Comment_45536key contains the key, not the key code
- You should use one keydown handler
document.onkeydown = function(event) {
if(event.key.toUpperCase() == "G") {
...
}
else if(event.key.toUpperCase() == "D") {
...
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

I've defined both variables in the survey flow. Any suggestions on how to collect both? I very much appreciate the help and patience, as I am a novice to any programming.