ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Options and actions
  • Overview
  • How to?
  • Assigning a keyboard shortcut to a control in a window
  • Assigning a keyboard shortcut to a control in a page
  • & character
  • Managing the & character in the window controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Keyboard shortcut and hotkey
Overview
A control in a window or page can be associated with an alphanumeric character, a key or combination of keys ("keyboard shortcut"), etc.
This shortcut gives direct access to the control.
Remark: By default, you can set a "Hotkey" using the text of the control ('&' character before the letter to be defined as hotkey). For more details, see "& character".
How to?
WINDEVAndroidJava

Assigning a keyboard shortcut to a control in a window

To assign a keyboard shortcut to a control in a window:
  1. Open the control description window (select "Description" in the context menu).
  2. Go to the "UI" tab and click the button next to "Keyboard shortcut".
  3. Select the keys that constitute the desired hotkey.
    The "Detection" button is used to detect the key (or the combination of keys) used on the keyboard.
  4. Validate.
Android Remark: In Android, for security reasons, the "Home" and "End of call" keys cannot be used as shortcuts.
WEBDEV - Server code

Assigning a keyboard shortcut to a control in a page

To define the hotkey of a page control:
  1. Open the control description window (select "Description" in the context menu).
  2. In the "Details" tab, select the requested key combination in the "Hotkey" control.
  3. Validate.
& character
WINDEV

Managing the & character in the window controls

By default, you can use a hotkey as a keyboard shortcut. This hotkey is assigned using the text of the control ('&' character before the letter to be defined as hotkey).
The shortcut associated with to the control will be Alt + Letter after &.
To display the '&' character in a caption, this character must be typed twice. For example:
  • "War&Peace" will be displayed as "WarPeace" (with Alt + P as hotkey).
  • "War&&Peace" will be displayed as "War&Peace".
To define how the '&' character will be interpreted, use the InterpretAmpersand property.
In order for the '&' character to be automatically inserted before the caption of the new controls:
  1. Display the options of the window editor: on the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the window editor".
  2. In the "Controls" tab, check "Automatically set a hotkey when creating a control".
  3. Validate.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/19/2023

Send a report | Local help