ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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, a "Call letter" keyboard shortcut can be defined from the field label ('&' character in front of the letter to be defined as the call letter).. 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 Note: In Android, for security reasons, the "Home" and "End call" keys cannot be used as keyboard 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. On 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 window editor options: under the "Home" pane, in the "Environment" group, pull down "Options" and select "Window editor options"..
  2. On 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: 10/04/2024

Send a report | Local help