Hot Door CORE Forum

Full Version: alerts::question -- escape key returns "no" response
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
hdi::core::alerts::Response userResp = hdi::core::alerts::question("yes-no-cancel", "yes", "no", "cancel");

With this dialog, pressing the esc key returns a "noButtonChosen" response rather than a cancel or dismissal. Is this the intended behavior?
On Mac or Windows? I think that might be intended behavior to match old ADM code, but I'll have to double-check.
It works that way on both Mac and Windows, at least in AI 21. It's not hard to work around, though: just put the cancel button in the middle, or else make a custom dialog. Which now reminds me that the escape key worked here under Windows (as a noButton response) but in another custom dialog the escape key only doubles as a Cancel click on the Mac. Interesting...