Keyboard navigation introduction

To enable navigating the menu wih a keyboard, include the "keyboardNavigation" add-on .js and .css files and use the keyboardNavigation options.

   <script src="path/to/jquery.js"></script>
   <script src="path/to/jquery.mmenu.js"></script>
   <script src="path/to/jquery.mmenu.keyboardnavigation.js"></script>
   <link href="path/to/jquery.mmenu.css" rel="stylesheet" />
   <link href="path/to/jquery.mmenu.keyboardnavigation.css" rel="stylesheet" />
      $(document).ready(function() {
            keyboardNavigation: {
               // keyboardNavigation options

Note that the "keyboardNavigation" add-on is disabled for touchscreens to prevent an virtual keyboard to appear when opening the menu.

Options for the "keyboardNavigation" add-on

Option Default value Datatype Description
1 See "Enhancements".
keyboardNavigation A map of options or true or "default" for keyboardNavigation.enable.
enable false Boolean Whether or not to enable navigating the menu with a keyboard.
Set to "default" to automatically put focus on the first focusable element when opening the menu or a panel.
enhance 1 false Boolean Whether or not to enhance the basic default keyboard navigation.

With the keyboardNavigation.enhance option set to true, the menu will be enhanced for navigating with a keyboard beyond the basic default usage:

Configuration for the "keyboardNavigation" add-on

The "keyboardNavigation" add-on has no configuration options.

API methods for the "keyboardNavigation" add-on

The "keyboardNavigation" add-on has no API methods.

CSS variables for the "keyboardNavigation" add-on

The "keyboardNavigation" add-on has no CSS variables.

SCSS variables for the "keyboardNavigation" add-on

Variable Default value Datatype Description
Include CSS
$mm_opt_keyboardnavigation true Boolean Whether or not to include CSS for the keyboardNavigation add-on throughout the entire CSS framework.

Next add-on:
Lazy submenus

Deprecated There is a new, improved version available. Check it out on

Get the new version No thanks