Skip to main content

Click Mode

Click mode allows users to interact with clickable elements using keyboard shortcuts.

How to Activate Click Mode

First, initialize OpenKeyNav on the page.

const openKeyNav = new OpenKeyNav();
openKeyNav.init();

To activate click mode, press the k key. Clickable elements will be labeled with keyboard shortcuts.

How to Click an Element

Once click mode is activated:

  1. Look for the labels on clickable elements.
  2. Press the key combination displayed on the label to "click" the respective element.

Configuring Click Mode Keyboard Shortcut

You can customize the keyboard shortcut used to activate click mode by modifying the configuration settings. For example, you can change the key from k to c.

Example

Here's an example of how to initialize OpenKeyNav and configure the click mode keyboard shortcut:

const openKeyNav = new OpenKeyNav();

const config = {
keys: {
click: 'c' // Change the click mode key to 'c'
}
};

openKeyNav.init(config);

After initializing OpenKeyNav with the custom configuration, press the c key to enter click mode. You will see labels on clickable elements. Press the key combinations shown on these labels to click the elements.

Summary

  • Activate Click Mode: Press the k key (or the custom key if configured).
  • Click an Element: Press the key combination on the label of the clickable element.

By using click mode, you can enhance keyboard accessibility and allow users to navigate and interact with your website more efficiently.