Ribbon customization with keytips

709
2
06-21-2021 11:35 PM
Labels (2)
BenKraas
New Contributor

Disclaimer: I have not yet updated (again) to ArcGIS Pro 2.8 (For a good reason)

I want to design a custom ribbon tab with the tools I most often use and then use keytips (Press alt/F10 and have letters assigned to the tab and more importantly the elements/tools/buttons in it) to access the tools (using AHK to assign custom shortcuts)

Yes, I am aware of the "accelerator" feature. But ESRI removed one of the tools (esri_editing_SketchRectanglePolygonTool) from access in the "All Commands" bar in 2.8, hence I cannot access that tool there (unless accelerators are exportable just as the ribbon is. That I haven't tested yet). Also the accelerator does not accept shift but that's a minor issue and can be worked around

What I'm asking is: How do you get the keytips of tools and buttons within a ribbon tab to work? I researched 2 hours yesterday and maybe I'm missing something small but I can't figure it out. I was able to assign the Tab a custom keytip (just add keytip="G" at the tab) however this wouldn't work for the elements in that tab

The SketchRectanglePolygonTool is no longer available in 2.8 (in ribbon and quick-access, my reason for not updating), however you can sort of cheat this limitation if you can code (just replace a tool refID with the Command ID you want)

Thank you very much in advance!

0 Kudos
2 Replies
BenKraas
New Contributor

Edit: While I would still like to know how keytips of buttons and tools work, export of accelerators works and they are easily configurable in the code so I will likely be using this technique instead.

 

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

A bit late, but i just wanted to explain how KeyTips (defined in your add-in's config.daml) can be used in ArcGIS Pro.  For the screenshots in my illustration below i used the "RibbonControls" community sample:

arcgis-pro-sdk-community-samples/Framework/RibbonControls at 6078006a3943364f2a7931b19d1eb03c8a99e1c...

In order to use KeyTips in ArcGIS Pro (after you opened a project) you must first press the Alt key or the F10 key, this shows all available KeyTip letters for tabs on the Pro ribbon:

Wolf_3-1680717988988.png

Next you press any of displayed KeyTips letters (white and framed in black). So for example to get to the “Sample Tab” I simply press the ‘X’ key. Now the UI is updated to show the ‘Sample Tab’s’ Key Tips:

 

Wolf_6-1680718103672.png

Finally, I can choose a KeyTip from the selected ‘Sample Tab’ tab. For example, if I want to execute the ‘Button 2’ command on the ‘Sample Tab’, I simply press the ‘X’ key followed by the ‘E’ key. The command is executed, and I get this:

Wolf_7-1680718176946.png

 


 

 

 

0 Kudos