Ribbon Keytips

3 Feb 202624 minutes to read

The Ribbon control supports KeyTips to provide keyboard navigation for its items. This feature can be enabled by setting the enableKeyTips property to true.

The keytips will be shown when the Alt + Windows/Command keys are pressed. This allows users to access any Ribbon element by pressing the corresponding keys.

Ribbon items keytip

You can assign a KeyTip to any Ribbon item, including tabs, groups, and individual controls, using the keyTip property.

import { Ribbon, RibbonItemSize, RibbonItemType, RibbonTabModel, RibbonGroupButtonSelection, RibbonKeyTip, RibbonGallery, RibbonColorPicker } from '@syncfusion/ej2-ribbon';

Ribbon.Inject(RibbonKeyTip, RibbonGallery, RibbonColorPicker);

let fontStyle: string[] = ['Algerian', 'Arial', 'Calibri', 'Cambria', 'Cambria Math', 'Candara', 'Courier New', 'Georgia', 'Impact', 'Segoe Print', 'Segoe Script', 'Segoe UI', 'Symbol', 'Times New Roman', 'Verdana', 'Windings'
];
let fontSize: string[] = ['8', '9', '10', '11', '12', '14', '16', '18', '20', '22', '24', '26', '28', '36', '48', '72', '96'];
let tabs: RibbonTabModel[] = [{
  header: "Home",
  keyTip: 'H',
  groups: [{
    header: "Clipboard",
    groupIconCss: 'e-icons e-paste',
    keyTip: 'CD',
    collections: [{
      items: [{
        type: RibbonItemType.SplitButton,
        allowedSizes: RibbonItemSize.Large,
        keyTip: 'PA',
        ribbonTooltipSettings: {
          title: 'Paste',
          cssClass: 'custom-tooltip',
          iconCss: 'e-icons e-paste',
          content: 'Paste content here.</br> Add content on the clipboard to your document.'
        },
        splitButtonSettings: {
          content: 'Paste',
          iconCss: 'e-icons e-paste',
          items: [{ text: 'Keep Source Format' }, { text: 'Merge format' }, { text: 'Keep text only' }]
        }
      }]
    }, {
      items: [{
        type: RibbonItemType.Button,
        keyTip: 'CU',
        buttonSettings: {
          content: 'cut',
          iconCss: 'e-icons e-cut'
        }
      }, {
        type: RibbonItemType.Button,
        keyTip: 'CO',
        buttonSettings: {
          content: 'copy',
          iconCss: 'e-icons e-copy'
        }
      }, {
        type: RibbonItemType.Button,
        keyTip: 'CS',
        buttonSettings: {
          content: 'Format Painter',
          iconCss: 'e-icons e-format-painter'
        }
      }]
    },]
  }, {
    header: "Font",
    orientation: 'Row',
    groupIconCss: 'e-icons e-bold',
    enableGroupOverflow: true,
    keyTip: 'FB',
    cssClass: 'font-group',
    collections: [{
      items: [{
        type: RibbonItemType.ComboBox,
        keyTip: 'O1',
        comboBoxSettings: {
          dataSource: fontStyle,
          index: 2,
          allowFiltering: true,
          width: '150px'
        }
      }, {
        type: RibbonItemType.ComboBox,
        keyTip: 'O2',
        comboBoxSettings: {
          dataSource: fontSize,
          index: 4,
          width: '65px'
        }
      }]
    }, {
      items: [{
        type: RibbonItemType.GroupButton,
        keyTip: 'GB',
        groupButtonSettings: {
          selection: RibbonGroupButtonSelection.Single,
          items: [{
            iconCss: 'e-icons e-bold',
            keyTip: '1',
            selected: true
          },
          {
            iconCss: 'e-icons e-italic',
            keyTip: '2'
          },
          {
            iconCss: 'e-icons e-underline',
            keyTip: '3'
          },
          {
            iconCss: 'e-icons e-strikethrough',
            keyTip: '4'
          },
          {
            iconCss: 'e-icons e-change-case',
            keyTip: '5'
          }]
        }
      }, {
        type: RibbonItemType.ColorPicker,
        keyTip: 'CP',
        colorPickerSettings: {
          value: '#123456'
        }
      }
      ]
    }]
  },
  {
    header: "Gallery",
    showLauncherIcon: true,
    groupIconCss: 'e-icons e-paste',
    collections: [{
      items: [{
        type: RibbonItemType.Gallery,
        keyTip: 'GY',
        gallerySettings: {
          itemCount: 3,
          groups: [{
            itemWidth: '100',
            header: 'Styles',
            items: [{
              content: 'Normal'
            }, {
              content: 'No Spacing'
            }, {
              content: 'Heading 1'
            }, {
              content: 'Heading 2'
            }, {
              content: 'Heading 3'
            }, {
              content: 'Heading 4'
            }, {
              content: 'Heading 5'
            }]
          }]
        }
      }]
    }]
  },
  {
    header: 'Tables',
    groupIconCss: 'e-icons e-table',
    collections: [{
      items: [{
        type: RibbonItemType.DropDown,
        keyTip: 'T',
        allowedSizes: RibbonItemSize.Large,
        dropDownSettings: {
          content: 'Table',
          iconCss: 'e-icons e-table',
          items: [
            { text: 'Insert Table' }, { text: 'Draw Table' },
            { text: 'Convert Table' }, { text: 'Excel SpreadSheet' }
          ]
        }
      }]
    }]
  },
  {
    header: 'Show',
    groupIconCss: 'e-icons e-copy',
    collections: [{
      items: [{
        type: RibbonItemType.CheckBox,
        keyTip: 'R1',
        checkBoxSettings: {
          label: 'Ruler',
          checked: false
        }
      }, {
        type: RibbonItemType.CheckBox,
        keyTip: 'R2',
        checkBoxSettings: {
          label: 'Gridlines',
          checked: false
        }
      }, {
        type: RibbonItemType.CheckBox,
        keyTip: 'R3',
        checkBoxSettings: {
          label: 'Navigation Pane',
          checked: true
        }
      }]
    }]
  }]
}];

let ribbon: Ribbon = new Ribbon({
  tabs: tabs,
  enableKeyTips: true
});
ribbon.appendTo("#ribbon");

ribbon.ribbonKeyTipModule.showKeyTips('H');
<!DOCTYPE html>
<html lang="en">

<head>
    <script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
    <title>Essential JS 2 - Ribbon</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta name="description" content="Essential JS 2" />
    <meta name="author" content="Syncfusion" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-base/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-buttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-popups/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-splitbuttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-inputs/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-lists/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-dropdowns/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-navigations/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-ribbon/styles/tailwind3.css" rel="stylesheet" />

    <!--system js reference and configuration-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
    <style>
        .custom-tooltip.e-paste{
            font-size: 50px;
        }
    </style>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
    <div id='loader'>LOADING....</div>
    <div id='container'>
        <div id="ribbon"></div>
    </div>
</body>

</html>

File menu keytip

A KeyTip can be assigned to the File Menu button using the keyTip property within the fileMenuSettings.

import { Ribbon, RibbonTabModel, RibbonItemType, RibbonItemSize, RibbonFileMenu, RibbonKeyTip } from "@syncfusion/ej2-ribbon";
import { MenuItemModel } from "@syncfusion/ej2-navigations";

Ribbon.Inject(RibbonFileMenu, RibbonKeyTip);

let tabs: RibbonTabModel[] = [
  {
    header: "Home",
    groups: [
      {
        header: "Clipboard",
        collections: [
          {
            items: [
              {
                type: RibbonItemType.SplitButton,
                allowedSizes: RibbonItemSize.Large,
                splitButtonSettings: {
                    content: 'Paste',
                    iconCss: 'e-icons e-paste',
                    items: [{ text: 'Keep Source Format' }, { text: 'Merge format' }, { text: 'Keep text only' }]
                }
              },
            ],
          },
          {
            items: [
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Cut",
                  iconCss: "e-icons e-cut",
                }
              },
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Copy",
                  iconCss: "e-icons e-copy",
                }
              },
            ],
          }
        ]
      }
    ]
  }
];

let fileMenuItems: MenuItemModel[] = [
    { text: "New", iconCss: "e-icons e-file-new", id: "new" },
    { text: "Open", iconCss: "e-icons e-folder-open", id: "Open" },
    { text: "Rename", iconCss: "e-icons e-rename", id: "rename" },
    { text: "Save as", iconCss: "e-icons e-save", id: "save" }
];

let ribbon: Ribbon = new Ribbon({
    tabs: tabs,
    fileMenu: {
        menuItems: fileMenuItems,
        keyTip: "F",
        visible: true
    },
    enableKeyTips: true
});
ribbon.appendTo("#ribbon");
ribbon.ribbonKeyTipModule.showKeyTips();
<!DOCTYPE html>
<html lang="en">

<head>
            <script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
    <title>Essential JS 2 - Ribbon</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta name="description" content="Essential JS 2" />
    <meta name="author" content="Syncfusion" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-base/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-buttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-popups/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-splitbuttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-inputs/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-lists/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-dropdowns/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-navigations/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-ribbon/styles/tailwind3.css" rel="stylesheet" />

    <!--system js reference and configuration-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
    <div id='loader'>LOADING....</div>
    <div id='container'>
        <div id="ribbon"></div>
    </div>
</body>
</html>

Backstage menu keytip

You can assign KeyTips to Backstage menu items by defining the keyTip property for each item in the Backstage configuration.

import { Ribbon, RibbonTabModel, RibbonItemType, RibbonItemSize, RibbonBackstage, RibbonKeyTip } from "@syncfusion/ej2-ribbon";

Ribbon.Inject(RibbonBackstage, RibbonKeyTip);

let tabs: RibbonTabModel[] = [
  {
    header: "Home",
    groups: [
      {
        header: "Clipboard",
        collections: [
          {
            items: [
              {
                type: RibbonItemType.SplitButton,
                allowedSizes: RibbonItemSize.Large,
                splitButtonSettings: {
                    content: 'Paste',
                    iconCss: 'e-icons e-paste',
                    items: [{ text: 'Keep Source Format' }, { text: 'Merge format' }, { text: 'Keep text only' }]
                }
              },
            ],
          },
          {
            items: [
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Cut",
                  iconCss: "e-icons e-cut",
                }
              },
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Copy",
                  iconCss: "e-icons e-copy",
                }
              },
            ],
          }
        ]
      }
    ]
  }
];

let ribbon: Ribbon = new Ribbon({
    tabs: tabs,
    backStageMenu: {
      keyTip: 'F',
      items: [
        { id: 'home', keyTip: 'H', text: 'Home', iconCss: 'e-icons e-home', content: '#homeContent' },
        { id: 'new', keyTip: 'N', text: 'New', iconCss: 'e-icons e-file-new', content: '#newContent' },
        { id: 'open', keyTip: 'O', text: 'Open', iconCss: 'e-icons e-folder-open', content: '#openContent' }
      ],
      visible: true,
      backButton: { text: 'Close' }
    },
    enableKeyTips: true
});
ribbon.appendTo("#ribbon");
ribbon.ribbonKeyTipModule.showKeyTips('F');
<!DOCTYPE html>
<html lang="en">

<head>
    <script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
    <title>Essential JS 2 - Ribbon</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta name="description" content="Essential JS 2" />
    <meta name="author" content="Syncfusion" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-base/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-buttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-popups/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-splitbuttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-inputs/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-lists/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-dropdowns/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-navigations/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-ribbon/styles/tailwind3.css" rel="stylesheet" />
    <!--system js reference and configuration-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
    <style>
        .e-ribbon-backstage-content{
            width: 550px;
            height: 350px;
        }

        .section-title {
            font-size: 22px;
        }

        .new-docs {
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
        }

        .category_container {
            width: 150px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
        }

        .doc_category_image {
            width: 80px;
            height: 100px;
            background-color: #fff;
            border: 1px solid rgb(125, 124, 124);
            text-align: center;
            overflow: hidden;
            margin: 0px auto 10px;
        }

        .doc_category_text {
            font-size: 16px;
        }

        .section-content {
            padding: 12px 0px;
            cursor: pointer;
        }

        .doc_icon {
            font-size: 16px;
            padding: 0px 10px;
        }

        .category_container:hover, .section-content:hover {
            background-color: #dfdfdf;
            border-radius: 5px;
            transition: all 0.3s;
        }
    </style>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
    <div id='loader'>LOADING....</div>
    <div id='container'>
        <div id="ribbon"></div>
    </div>
</body>
<script type="text/x-jsrender" id="homeContent">
    <div id='home-wrapper' style="padding: 20px;">
        <div id='new-section' class='new-wrapper'>
            <div class='section-title'> New </div>
            <div class='category_container'>
                <div class='doc_category_image'></div> 
                <span class='doc_category_text'> New document </span>
            </div>
        </div>
        <div id='block-wrapper'><div class='section-title'> Recent </div>
            <div class="section-content" style="padding: 12px 0px; cursor: pointer">
                <table>
                    <tbody>
                        <tr>
                            <td> <span class="doc_icon e-icons e-open-link"></span> </td>
                            <td> 
                                <span style="display: block; font-size: 14px"> Ribbon.docx </span>
                                <span style="font-size: 12px"> EJ2 >> Components >> Navigations >> Ribbon >> default </span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</script>
<script type="text/x-jsrender" id="newContent">
    <div id='new-content' style="padding: 20px;">
        <div id='new-section' class='new-wrapper'>
            <div class='section-title'> New </div>
            <div class='category_container'>
                <div class='doc_category_image'></div> 
                <span class='doc_category_text'> New document </span>
            </div>
        </div>
    </div>
</script>
<script type="text/x-jsrender" id="openContent">
    <div style="padding: 20px;">
        <div class="section-content" style="padding: 12px 0px; cursor: pointer">
            <table>
                <tbody>
                    <tr>
                        <td> <span class="doc_icon e-icons e-open-link"></span> </td>
                        <td> 
                            <span style="display: block; font-size: 14px"> Open in Desktop App </span>
                            <span style="font-size: 12px"> Use the full functionality of Ribbon </span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="section-content" style="padding: 12px 0px cursor: pointer">
            <table>
                <tbody>
                    <tr>
                        <td> <span class="doc_icon e-icons e-protect-sheet"></span> </td>
                        <td> 
                            <span style="display: block; font-size: 14px"> Protect Document </span>
                            <span style="font-size: 12px">To prevent accidental changes,
                                this document has been set to open as view-only.</span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</script>
</html>

Ribbon layout switcher keytip

A KeyTip can be added to the layout switcher button using the layoutSwitcherKeyTip property.

import { Ribbon, RibbonTabModel, RibbonItemType, RibbonItemSize, RibbonFileMenu, RibbonKeyTip } from "@syncfusion/ej2-ribbon";
import { MenuItemModel } from "@syncfusion/ej2-navigations";

Ribbon.Inject(RibbonFileMenu, RibbonKeyTip);

let tabs: RibbonTabModel[] = [
  {
    header: "Home",
    groups: [
      {
        header: "Clipboard",
        collections: [
          {
            items: [
              {
                type: RibbonItemType.SplitButton,
                allowedSizes: RibbonItemSize.Large,
                splitButtonSettings: {
                    content: 'Paste',
                    iconCss: 'e-icons e-paste',
                    items: [{ text: 'Keep Source Format' }, { text: 'Merge format' }, { text: 'Keep text only' }]
                }
              },
            ],
          },
          {
            items: [
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Cut",
                  iconCss: "e-icons e-cut",
                }
              },
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Copy",
                  iconCss: "e-icons e-copy",
                }
              },
            ],
          }
        ]
      }
    ]
  }
];

let fileMenuItems: MenuItemModel[] = [
    { text: "New", iconCss: "e-icons e-file-new", id: "new" },
    { text: "Open", iconCss: "e-icons e-folder-open", id: "Open" },
    { text: "Rename", iconCss: "e-icons e-rename", id: "rename" },
    { text: "Save as", iconCss: "e-icons e-save", id: "save" }
];

let ribbon: Ribbon = new Ribbon({
    tabs: tabs,
    fileMenu: {
        menuItems: fileMenuItems,
        visible: true
    },
    enableKeyTips: true,
    layoutSwitcherKeyTip: "LS"
});
ribbon.appendTo("#ribbon");
ribbon.ribbonKeyTipModule.showKeyTips();
<!DOCTYPE html>
<html lang="en">

<head>
    <script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
    <title>Essential JS 2 - Ribbon</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta name="description" content="Essential JS 2" />
    <meta name="author" content="Syncfusion" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-base/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-buttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-popups/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-splitbuttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-inputs/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-lists/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-dropdowns/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-navigations/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-ribbon/styles/tailwind3.css" rel="stylesheet" />

    <!--system js reference and configuration-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>

<body>
    <div id='loader'>LOADING....</div>
    <div id='container'>
        <div id="ribbon"></div>
    </div>
</body>
</html>

Ribbon launcher icon keytip

A KeyTip can be assigned to a group’s launcher icon using the launcherIconKeyTip property.

import { Ribbon, RibbonTabModel, RibbonItemType, RibbonItemSize, RibbonFileMenu, RibbonKeyTip } from "@syncfusion/ej2-ribbon";
import { MenuItemModel } from "@syncfusion/ej2-navigations";

Ribbon.Inject(RibbonFileMenu, RibbonKeyTip);

let tabs: RibbonTabModel[] = [
  {
    header: "Home",
    keyTip: "H",
    groups: [
      {
        header: "Clipboard",
        showLauncherIcon: true,
        launcherIconKeyTip: "L",
        collections: [
          {
            items: [
              {
                type: RibbonItemType.SplitButton,
                allowedSizes: RibbonItemSize.Large,
                splitButtonSettings: {
                    content: 'Paste',
                    iconCss: 'e-icons e-paste',
                    items: [{ text: 'Keep Source Format' }, { text: 'Merge format' }, { text: 'Keep text only' }]
                }
              },
            ],
          },
          {
            items: [
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Cut",
                  iconCss: "e-icons e-cut",
                }
              },
              {
                type: RibbonItemType.Button,
                buttonSettings: {
                  content: "Copy",
                  iconCss: "e-icons e-copy",
                }
              },
            ],
          }
        ]
      }
    ]
  }
];

let fileMenuItems: MenuItemModel[] = [
    { text: "New", iconCss: "e-icons e-file-new", id: "new" },
    { text: "Open", iconCss: "e-icons e-folder-open", id: "Open" },
    { text: "Rename", iconCss: "e-icons e-rename", id: "rename" },
    { text: "Save as", iconCss: "e-icons e-save", id: "save" }
];

let ribbon: Ribbon = new Ribbon({
    tabs: tabs,
    fileMenu: {
        menuItems: fileMenuItems,
        visible: true
    },
    enableKeyTips: true
});
ribbon.appendTo("#ribbon");
ribbon.ribbonKeyTipModule.showKeyTips('H');
<!DOCTYPE html>
<html lang="en">

<head>
    <script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
    <title>Essential JS 2 - Ribbon</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta name="description" content="Essential JS 2" />
    <meta name="author" content="Syncfusion" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-base/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-buttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-popups/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-splitbuttons/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-inputs/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-lists/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-dropdowns/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-navigations/styles/tailwind3.css" rel="stylesheet" />
    <link href="https://cdn.syncfusion.com/ej2/32.2.3/ej2-ribbon/styles/tailwind3.css" rel="stylesheet" />

    <!--system js reference and configuration-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
    <script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>

<body>
    <div id='loader'>LOADING....</div>
    <div id='container'>
        <div id="ribbon"></div>
    </div>
</body>

</html>

Methods

Show keytips

Use the showKeyTips method to display the KeyTips dynamically. To navigate into a specific tab’s or group’s KeyTips, pass its KeyTip as an argument. For instance, showKeyTips('H') will show the KeyTips for all items under the element assigned the ‘H’ KeyTip.

Hide KeyTips

Use the hideKeyTips method to hide all visible KeyTips on the Ribbon.

Guidelines for adding keytips

Before adding keytips to the ribbon items consider the following:

  • Avoid using the same keytip setting on multiple items.

For example: When you add the keytip text H or HF for the same items, it activates the first item occurrence of H, while any subsequent instances of H or HF are ignored.

  • Do not use the same first letter for the single and double keytip items.

For example: When accessing keytip text F, FP and FPF added for the different ribbon items and pressing F key, only the F key tip associated item will be activated while the FP, FPF configured ribbon items will be ignored.