# Preparing C1DynamicHelp for Authoring Mode

## Content



To allow Help authors to activate and deactivate [C1DynamicHelp](/componentone/api/win/online-dynamichelp/dotnet-framework-api/C1.Win.C1DynamicHelp.4.8/C1.Win.C1DynamicHelp.C1DynamicHelp.html) **authoring mode** so that they can map topics in your application, you have a wide variety of options. You can use anything from a special keystroke combination to a registry node that, if present, activates authoring mode.

This example shows how to specify a keystroke combination.

1.  [Specify a source Help file for C1DynamicHelp.](/componentone/docs/win/online-dynamichelp/usingdynamichelpforw/fordevelopersmapping/specifyingthesourceh)
2.  Select your **Form** and set the **KeyPreview** property to **True** in the Properties window.
3.  Select **View** | **Code** so you can add code to override the **OnKeyDown** method and specify a keystroke combination to activate and deactivate **authoring mode**.
4.  Add the following code:
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    ' toggle authoring mode when the user hits Ctrl+Shift+A
    Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
        If (e.KeyCode = Keys.A And e.Control And e.Shift) Then
            C1DynamicHelp1.AuthoringMode = Not C1DynamicHelp1.AuthoringMode
        End If
        MyBase.OnKeyDown(e)
    End Sub
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    // toggle authoring mode when the user hits Ctrl+Shift+A
    override protected void OnKeyDown(KeyEventArgs e)
    {
        if (e.KeyCode == Keys.A && e.Control && e.Shift)
        {
            c1DynamicHelp1.AuthoringMode = !c1DynamicHelp1.AuthoringMode;
        }
        base.OnKeyDown(e);
    }
    ```
    
    DOC-DETAILS-TAG-CLOSE
    

C1DynamicHelp **authoring mode** will be activated or deactivated when the user presses the **Ctrl**+**Shift**+**A** keys.