I'm trying to create a custom ribbon in one of my Excel 2010 addins, and for some reason Office is overriding some of the keytips (keyboard accelerators). I know if Office sees a conflict it will usually override one or both of the keytips to "Y", "Y2", "Y3", etc.. but in this example I only have one button in my tab so there is no other control for it to conflict with.
Here is the XML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab id="tabid_1" label="SampleTab" keytip = "B">
<group id="grpid_1" label="SampleGroup">
<button id="btnid_1" label="SampleButton" keytip="Z" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Instead of the SampleButton having a keytip of Z, it gets replaced with "Y2". I see this behavior regardless of the keytip of the Tab (which is currently "B"). I checked to make sure that there wasn't some other button with a keytip of "BZ" that might be conflicting, but didn't see any.
I also see that behavior if I try to make the keytip of the SampleButton be "Y", but I assume this is because all "Y*" keytips are reserved for conflicts.
Incidentally, I was also having this problem with a keytip of "C", but for some un-explained reason that was happening only when I didn't have a label for the <group>
. As soon as I added a label to the <group>
, "C" stopped being overridden with "Y2". Very strange behavior.
Anyone have any ideas what could be causing this? Thanks in advance!
I was having the same issue and I ended up just changing the keytip value from an uppercase "Z" to a lowercase "z" and it worked. No idea why. Hopefully it works for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With