Skip to main content
Inspiring
April 15, 2014
Question

Cap7: Disable the Enter Key

  • April 15, 2014
  • 1 reply
  • 603 views

Is there a way to disable the Enter key for short answer question slides? Some of my users are hitting the Enter key instead of clicking the Submit button, which advances the slide.

This topic has been closed for replies.

1 reply

cjdawesIDAuthor
Inspiring
April 15, 2014

If anyone is interested, I was able to disable the Enter key with JavaScript. On slide enter I am executing the following script:

<script type="text/javascript">

function stopRKey(evt) {

  var evt = (evt) ? evt : ((event) ? event : null);

  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);

  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}

}

document.onkeypress = stopRKey;

</script>

Participant
May 5, 2014

I have the same issue with the Enter Key and the Short Answer questions in Cap v7.  So I tried inserting the java code that cjdawesID suggested.  I’ve tested with F12 and online and the quiz
still accepts the Enter Key. I’m not familiar entering Javascript.  Can anyone tell me if these are the proper steps?

 

1. On Enter: I selected “Executve JavaScript”, “Current” and deselected “Continue Playing the Project”.

2. In the Javascript window I copied/pasted thiscode.

Is there another step that I’m missing?

Andre Paz Leal
Inspiring
May 6, 2014

Anna the reason why is still working, it´s because you need to publish with HTML5 and now SWF, hit F11 instead of F12.