AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Propiedades WLanguage / Propiedades de ventanas, páginas y controles
  • Managing all the keyboard keys
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The ShortcutKey property gets and sets the keyboard shortcut associated with a control or menu option.
Ejemplo
// To be included in the declaration of the global variables of the window
EXTERN "KEYCONST.wl"

BTN_BUTTON1.ShortcutKey = skControl + skShift + Asc("U") // Ctrl + Shift + U
BTN_BUTTON1.ShortcutKey = skControl + VK_F1		// Ctrl + F1
// To be included in the declaration of the global variables of the window
EXTERN "KEYCONST.wl"

OPT_Manage_Suppliers..ShortcutKey = VK_F2
OPT_Manage_Users..ShortcutKey = skAlt + Asc("U")
Sintaxis

Getting the keyboard shortcut associated with a control or menu option Ocultar los detalles

<Result> = <Element used>.ShortcutKey
<Result>: Integer
Shortcut key associated with the control.
<Element used>: Control name
Name of item handled:
  • Name of a control,
  • WINDEVWindowsLinux Name of a menu option.

Changing the keyboard shortcut associated with a control or menu option Ocultar los detalles

<Element used>.ShortcutKey = <New shortcut>
<Element used>: Control name
Name of item handled:
  • Name of a control,
  • WINDEVWindowsLinux Name of a menu option.
<New shortcut>: Integer constant
Shortcut key associated with the control. This button may correspond to one or a combination of the following items:
  • Control keys:
    skAltAlt key.
    skControlCtrl key.
    skShiftShift key.
  • Specific control keys: Additional constants are available in the file "KeyConst.wl". These constants are used to identify all the keyboard keys. This file is available in the "Personal\External" subdirectory of WINDEV or WINDEV Mobile.. For more details, see remarks.
  • Character keys: Simply use the character's ASCII code (obtained with the Asc function).
Observaciones

Managing all the keyboard keys

To manage all the keys with the ShortcutKey property:
  1. Include the KeyConst.WL file in your project. This file associates a specific constant with each keyboard key. This file is available in the \Personal\Extern directory of WINDEV. To include this file in your applications, you need to use the EXTERN keyword as follows:
    EXTERN "KEYCONST.wl"
  2. Use the constants in the ShortcutKey property:
    cControl is Control <- ControlCreate("BTN_Button", typButton, 6, 60, 160, 30, false)
    cControl.ShortcutKey = skAlt + skShift + VK_F10
Remarks:
  • To manage character keys, simply use the ASCII code of that character (returned by Asc).
  • All the constants found in the KeyConst.WL file start with the letters VK_. These constants are displayed by the code completion in the code editor from the moment the file has been integrated with the EXTERN keyword.
Versión mínima requerida
  • Versión 19
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 10/05/2025

Señalar un error o enviar una sugerencia | Ayuda local