Action defaults / Usage |
When using the ON ACTION clause in a dialog instruction, action defaults accelerators are applied in both GUI and TUI mode. For backward compatibility, this is not done in TUI mode when using the ON KEY clause.
The traditional ON KEY clause in a dialog like INPUT implicitly defines the acceleratorName attribute for the action, and the corresponding action default accelerator will be ignored. For example, when you define an ON KEY(F10) block, the first accelerator will be "F10", even if an action default defines an accelerator "F5" for the action "F10". However, you can set other accelerators with the acceleratorName2, acceleratorName3 and acceleratorName4 attributes in action defaults.
In menus, the behavior is a bit different, see the COMMAND and COMMAND KEY clause in MENU.
If no accelerator is specified in action defaults for a predefined action, the runtime system sets one or more default accelerators according to the user interface mode. For example, the accept action will get the Return and Enter keys in GUI mode, but in TUI mode, the Escape key would be used.
If you want to force an action to have no accelerator, you can use none as the accelerator name.