Place a single “&” in front of any character to make it the shortcut key for the button.
The & correctly gets stripped out of the display of the button, but the keyboard shortcut doesn’t work. Am I missing something? Xojo 2025r31 on macOS 15.7.3.
It has been a macOS thing since the beginning, afaik. It’s more of a power user thing, but it’s there. Easy example: in the Finder, rename a file and change its file extension. The resulting confirmation dialog will ask if you’re sure. The Keep button is the default. The other button is Use .ext. Pressing command-u will select that button.
This isn’t that feature, and customizing that requires declares. The last person investigating was Sam figuring out how we could get Apple’s new-at-the-time command delete to work for don’t save. The fact that Sam has left this community and this still hasn’t been updated should speak volumes.
This is the Windows shortcut for being able to press just the letter to select the button on a confirmation dialog. This feature / functionality has not changed in Xojo’s time.
The docs just need updating to be more specific about what this feature is and it’s Windows-only usage.
As is common with the current team of documentation maintainers, there is way more copypasta examples than useful information.
I remember having used heavily that trick on Mac OS; it’s only recently that it seems to have vanished. There are two exceptions: ⌘. for “Cancel” and ⌘D for “Don’t save”; those still work today.
As far as I can tell, it went removed around the time the standard alert started to have vertically-aligned buttons, some years ago.
If it ever functioned as macOS’ keyboard shortcut for the button, that has not worked on macOS in Xojo’s time. Not since I tried to build Answers in 2014.
The Don’t Save thing relies on the exact words “Don’t Save” which is why Sam was researching the new Delete paradigms. I am unsure if the “Don’t Save” trick even works in other languages.