{"id":6342,"date":"2021-05-13T09:50:25","date_gmt":"2021-05-13T17:50:25","guid":{"rendered":"https:\/\/officedevblogs.wpengine.com\/?p=6342"},"modified":"2021-05-13T09:50:25","modified_gmt":"2021-05-13T17:50:25","slug":"add-custom-keyboard-shortcuts-to-your-office-add-ins-in-excel","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/add-custom-keyboard-shortcuts-to-your-office-add-ins-in-excel\/","title":{"rendered":"Add custom keyboard shortcuts to your Office Add-ins in Excel"},"content":{"rendered":"<p><em>This blog is\u202fthe\u202ffirst of a series\u202fhighlighting\u202fcustom keyboard shortcuts for Office Add-ins in Excel.<\/em><\/p>\n<p>Office has hundreds of native keyboard shortcuts that enable power users to work more efficiently. Keyboard shortcuts are also critical for users with mobility or vision disabilities because they provide an alternative to using a mouse. This is especially powerful in Excel where you may need\u00a0to repeat the same action several times during a single workflow.<\/p>\n<p>Over the past several years, we\u2019ve heard from many partners and developers about the need for custom keyboard shortcuts to help their users work more efficiently. Today, we are excited to announce general availability for custom keyboard shortcuts for Office Add-ins in Excel.<\/p>\n<h3>Introducing custom keyboard shortcuts for Office Add-ins<\/h3>\n<p>Developers are now able to configure custom keyboard shortcuts for Office Add-ins in Excel that can invoke any add-in related functionality. The possibilities are endless and keyboard shortcuts can be effective no matter the scenario of your add-in.<\/p>\n<p>In this blog post, we\u2019ll walk through use cases for keyboard shortcuts in your add-in. We&#8217;ll also highlight how one of our preview partners, Oracle, uses keyboard shortcuts to zoom in and out of their data.<\/p>\n<h4>Open\/Close the task pane without touching the mouse<\/h4>\n<p>With the help of <a href=\"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/use-the-shared-javascript-runtime-to-improve-the-ui-experience-of-your-office-add-in\/\">shared runtime<\/a>, you can register keyboard shortcuts to quickly show and hide the add-in task pane. This enables users to efficiently work between the task pane and the worksheet without ever reaching for their mouse. In the following video, we use <strong>Ctrl+Shift+Up<\/strong> and <strong>Ctrl+Shift+Down<\/strong> to show and hide the task pane.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-6360\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/05\/open_close_taskpane.gif\" alt=\"Example of a keyboard shortcut\" width=\"3360\" height=\"1942\" \/><\/p>\n<h4>Apply quick custom formatting to your cells<\/h4>\n<p>There are already many shortcuts in Excel to help you quickly format cells in the worksheet. With custom keyboard shortcuts, you can extend those capabilities to match specific formatting needs for your users. In the following video, we registered <strong>Ctrl+Shift+L<\/strong> to cycle through four different cell colors and quickly use the shortcut to apply formatting on the selected cell.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-6361\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/05\/quick_custom_formatting.gif\" alt=\"Example of a keyboard shortcut\" width=\"3360\" height=\"1942\" \/><\/p>\n<h4>Change your data view using a shortcut<\/h4>\n<p>One of our preview partners, Oracle, uses keyboard shortcuts to change the view of the data in the worksheet. The following video demonstrates using <strong>Ctrl+Shift+I<\/strong> and <strong>Ctrl+Shift+O<\/strong> to zoom in and out of the currently selected data point.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-6354\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/05\/change_data_view.gif\" alt=\"\" width=\"3360\" height=\"1888\" \/><\/p>\n<h4>The possibilities are endless<\/h4>\n<p>With the wide variety of functionalities available in Office Add-ins, you can register keyboard shortcuts to do just about anything in Excel. Just for fun, in the following video, we show you how to use <strong>Ctrl+Shift+Alt+C<\/strong> to insert a cat into the worksheet.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-6355\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/05\/possibilities-are-endless.gif\" alt=\"Example of a keyboard shortcut\" width=\"2560\" height=\"1480\" \/><\/p>\n<p>Every Office Add-in for Excel, including yours, can utilize keyboard shortcuts to help users work more efficiently and improve the overall accessibility of your add-in on Web, Mac, and Windows. Here are some links to help you get started with custom keyboard shortcuts in Office Add-ins:<\/p>\n<p>Play around with custom keyboard shortcuts using our PnP sample on GitHub: <a href=\"https:\/\/github.com\/OfficeDev\/PnP-OfficeAddins\/tree\/master\/Samples\/excel-keyboard-shortcuts\">PnP-OfficeAddins\/Samples\/excel-keyboard-shortcuts at master \u00b7 OfficeDev\/PnP-OfficeAddins<\/a> (github.com)<\/p>\n<p>To add shortcuts to your own Add-ins, check out our documentation: <a href=\"https:\/\/docs.microsoft.com\/en-us\/office\/dev\/add-ins\/design\/keyboard-shortcuts\">Custom keyboard shortcuts in Office Add-ins &#8211; Office Add-ins | Microsoft Docs<\/a><\/p>\n<p>Want custom keyboard shortcuts for Office Add-ins in Word, PPT, or Outlook? Let us know! Reach out to us on the <a href=\"https:\/\/aka.ms\/m365dev-suggestions\">Microsoft 365 Developer Platform suggestions forum on Microsoft Tech Community<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, we are excited to announce general availability for custom keyboard shortcuts for Office Add-ins in Excel.<\/p>\n","protected":false},"author":69076,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[18],"class_list":["post-6342","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office-add-ins","tag-excel"],"acf":[],"blog_post_summary":"<p>Today, we are excited to announce general availability for custom keyboard shortcuts for Office Add-ins in Excel.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69076"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=6342"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6342\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=6342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=6342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=6342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}