MessageDialogButton Caption shortcut key

The documentation says:

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 fails to work on Mac 26.3 and Xojo 2025 3.1 too.

The window with the button is being called like:

reqWin=New RequestListWin
.....
reqWin.ShowModal

Have not checked on Linux but just tested on Win 10+11 using Xojo 2025 R3.1 and works as described
Sounds like macOS issue

1 Like

Did y’all forget macOS doesn’t have this concept? It’s a Windows thing.

The ampersand hides on macOS, on Windows you’ll see the hotkey letter get underlined.

1 Like

I think we did forget :laughing:

I’m a GNU/Linux / Windows mostly user

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.

Place a second one. Isn’t it in the documentation ?

Excepted in some case(s); but they may not see the missing(s).
Example: drag and drop a Folder into an application (as asked some days ago).

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.

I’ll double check in a VM when I find the time. :thinking: