| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Window.EnableEscForCustomDialog
Enables ESC key to close a custom dialog.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Window | 16.4 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
MBS( "Window.EnableEscForCustomDialog"; Button Label ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Button Label | The title of the button to click for ESC. Pass empty text to disable. |
"Cancel" |
Result
Returns OK or error.
Description
Enables ESC key to close a custom dialog.On macOS, we wait for a dialog to show and then assign the ESC key as keyboard shortcut.
On Windows we watch key events for the ESC key and then use UI Automation to click the custom dialog button with the right label.
Examples
Enable ESC for Cancel button:
Set Variable [ $r ; Value: MBS("Window.EnableEscForCustomDialog"; "Cancel") ]
Show Custom Dialog [ "Test dialog" ; "Please press ESC key to close dialog." ]
Show Custom Dialog [ "Test dialog" ; "Please press ESC key to close dialog." ]
Disable the feature:
Set Variable [ $r ; Value: MBS("Window.EnableEscForCustomDialog"; "") ]
Release notes
- Version 16.4
- Added Window.EnableEscForCustomDialog function.
Blog Entries
This function checks for a license.
Created 20th August 2026, last changed 20th August 2026
MarkDown version: WindowEnableEscForCustomDialog.md