Skip to content

Commit d200cf2

Browse files
committed
Document normalizeAccessKeys option
1 parent eb533e0 commit d200cf2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/api/dialog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ The `dialog` module has the following methods:
3535
* `properties` String[] (optional) - Contains which features the dialog should use, can
3636
contain `openFile`, `openDirectory`, `multiSelections`, `createDirectory`
3737
and `showHiddenFiles`.
38+
* `normalizeAccessKeys` Boolean (optional) - Normalize the keyboard access keys
39+
across platforms. Default is `false`. Enabling this assumes `&` is used in
40+
the button labels for the placement of the keyboard shortcut access key
41+
and labels will be converted so they work correctly on each platform, `&`
42+
characters are removed on macOS, converted to `_` on Linux, and left
43+
untouched on Windows. For example, a button label of `Vie&w` will be
44+
converted to `Vie_w` on Linux and `View` on macOS and can be selected
45+
via `Alt-W` on Windows and Linux.
3846
* `callback` Function (optional)
3947
* `filePaths` String[] - An array of file paths chosen by the user
4048

0 commit comments

Comments
 (0)