Copy link to clipboard
Copied
Using Captivate 11.5/Windows, is there a script or some other option that will disable a browser's Ctrl+S function when viewing a project? The scenario is saving a document in MS Word and allowing the learner to use any method of saving the document (Save button on the QAT, File>Save/Save As, or Ctrl+S). Any help would be muchly appreciated!
Copy link to clipboard
Copied
Hi,
Can you clarify the learner's interactions?
Are you simulating MS Word and you want the learner to practice/demonstrate that they can save the document in different ways?
I am not clear about the relationship between Word and browser.
Copy link to clipboard
Copied
Thanks for responding, Eric. Let me clarify.
The "Save a Word File" project includes a click box for Ctrl+S, packaged as SCORM (HTLM5), and published to an LMS. The learner is viewing the project in the browser of their choice from the LMS. Pressing Ctrl+S as the learner is instructed on the appropriate slide invokes the Save As dialog box for the browser in use, not the control configured with the click box (Ctrl+S).
I was hoping that we could use JavaScript to temporarily disable the Ctrl+S function of a browser. Unfortunately, Captivate's JavaScript support is extremely limited. If you have any other ideas, I'm open to them.
Copy link to clipboard
Copied
Hello,
The following JS code has worked for me in the past to disable Control/Command + S for me in the past while a Captivate project is running:
$(window).bind('keydown', function(event) {
if (event.ctrlKey || event.metaKey) {
switch (String.fromCharCode(event.which).toLowerCase()) {
case 's':
event.preventDefault();
alert("Control/Command + S is not allowed.");
break;
default:
break;
}
}
});
You can easily add other letter keys by adding more case statements.
Hope this helps you out a bit.
Copy link to clipboard
Copied
Hello there, I was wanting to know if my solution worked for you? I hope my message finds yo and your family doing well!