Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Docs Custom Menu Hotkey (accelerator key/character, like "F" for File menu, or "S" for Save)

I am adding a custom menu to a spreadsheet and would like to use a hotkey to access the menu. The Alt-F hotkey opens the File pulldown menu. I would like to define Alt-B to activate my pulldown. Is there a way to do this? If so, can I then add hotkeys to the menu items? Here is the code I am using to add the menu:

function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();

var BoxwoodMenuItems = [{name : "Payments & Registeration Check-ins", functionName : "htmlRegistrationPayments"},
                       {name: "Assign Billets", functionName: "htmlAssignBillets"},
                       null, // Results in a line separator.
                       {name : "Get Remaining # of Allowed Sent Emails", functionName : "showRemainingEmails"},
                       ];
  sheet.addMenu("Boxwood", BoxwoodMenuItems);
};
like image 314
Karl_S Avatar asked May 02 '14 18:05

Karl_S


1 Answers

At this time it's not possible to set custom keyboard shortcuts / hotkeys Google Docs / Sheets / Forms / Slides for custom menus, but it's possible to do that for Google Sheets Macros.

References

  • Official Guides

    • Custom Menus in G Suite
  • Official Issue Tracker

    • Need a support to map shortcut to script functions
like image 82
Rubén Avatar answered Sep 20 '22 13:09

Rubén