Troubleshooting custom keyboard shortcuts with Powerpoint add-in on Mac

Alistair Gillespie 1 Reputation point
2022-11-21T00:13:45.897+00:00

Hi,

I've followed the following guides to set up custom keyboard shortcuts for a Powerpoint add-in. It should all be ready to go.

The shortcuts.json resides in the src directory of the plugin, and I've created the required functions in taskpane.js like so:

shortcuts.json:

{  
    "actions": [  
        {  
            "id": "SHOWTASKPANE",  
            "type": "ExecuteFunction",  
            "name": "Show task pane for add-in"  
        },  
        {  
            "id": "HIDETASKPANE",  
            "type": "ExecuteFunction",  
            "name": "Hide task pane for add-in"  
        }  
    ],  
    "shortcuts": [  
        {     
            "action": "SHOWTASKPANE",  
            "key": {  
                "default": "Cmd+Shift+K"  
            }  
        },  
        {  
            "action": "HIDETASKPANE",  
            "key": {  
                "default": "Cmd+Shift+J"  
            }  
        }  
    ]  
}  

taskpane.js:

Office.actions.associate('SHOWTASKPANE', function () {  
  return Office.addin.showAsTaskpane()  
    .then(function () {  
      return;  
    })  
    .catch(function (error) {  
      return error.code;  
    });  
});  
  
Office.actions.associate('HIDETASKPANE', function () {  
  return Office.addin.hide()  
    .then(function () {  
      return;  
    })  
    .catch(function (error) {  
      return error.code;  
    });  
});  

manifest.xml:

  </VersionOverrides>  
  <ExtendedOverrides Url="https://localhost:3000/src/shortcuts.json"></ExtendedOverrides>  
</OfficeApp>  

Has anyone managed to get this working for Mac? My shortcuts failed to work after trying multiple different command chains, and no logs showed up via npm logging or the inspect elements panel.

Thank you for your help.

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
866 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,484 questions
0 comments No comments
{count} votes