Disable Browser's Ctrl+S Functionality

Community Beginner ,
Jan 05, 2021 Jan 05, 2021

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!

TOPICS
Advanced, Advanced actions, Quizzing and LMS

Views

150

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 06, 2021 Jan 06, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 08, 2021 Feb 08, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 08, 2021 Feb 08, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines