Logging "Enter" key presses on Qualtrics

Home Forums Support Logging "Enter" key presses on Qualtrics

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #6819
    Madeleine
    Guest

    Hello, I am needing help creating a java code to log “Enter” key presses for a task in a survey on Qualtrics. I have the following code but it is not working
    function checkKey(e) {

    var org_value = document.getElementById(‘QR~QID1’).value;

    var timestamp = new Date().getTime();

    if (e.keyCode == 13) {

    document.getElementById(‘QR~QID1’).value = org_value + ‘**’ + timestamp + ‘:’ + ‘Enter’;

    }

    }

    Qualtrics.SurveyEngine.addOnload(function()

    {

    document.onkeydown = checkKey;

    document.getElementById(‘QR~QID1’).style.display = ‘none’;

    var timestamp = new Date().getTime();

    document.getElementById(‘QR~QID1’).value = timestamp + “:” + ‘start’;

    });

    Thanks in advance!!

Viewing 1 post (of 1 total)
  • The forum ‘Support’ is closed to new topics and replies.