PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Managing all the keyboard keys
  • Keys on Mobile devices (Pockets PC) and Smartphones
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The Property ShortcutKey allows you to know and modify the shortcut key (also called call letter) associated to an control.
Example
// To be included in the declaration code of global variables of window
EXTERN "KEYCONST.wl"
 
BTN_BUTTON1.Shortcut Key = skControl + skShift + Asc("U") // Ctrl + Shift + U
BTN_BUTTON1.Shortcut Key = skControl + VK_F1// Ctrl + F1
Syntax

Finding out the keyboard shortcut associated with a control Hide the details

<Result> = <Control used>.ShortcutKey
<Result>: Integer
Shortcut key associated with the control.
<Control used>: Control name
Name of control to use.

Modifying the keyboard shortcut associated with a control Hide the details

<Control used>.ShortcutKey = <New shortcut>
<Control used>: Control name
Name of control to use.
<New shortcut>: Integer constant
Shortcut key associated with the control. This key can correspond to one of the following elements or to a combination of the following elements:
  • Control keys:
    skAltAlt key.
    skControlCtrl key.
    skShiftShift key.
  • Specific control keys: Additional constants are available in the "KeyConst.wl" file. These constants are used to identify all the keyboard keys. This file is available in the "\Personal\Extern" directory of WINDEV or WINDEV Mobile. See remarks for more details.
  • Character keys: All you have to do is use the ASCII code of the character (returned by Asc).
Remarks

Managing all the keyboard keys

To manage all the keys on the keyboard with the Property ShortcutKey:
  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, the EXTERN keyword must be used as follows:
    EXTERN "KEYCONST.wl"
  2. Use the constants in the Property ShortcutKey:
    cControl is Control <- ControlCreate("BTN_Button", typButton, 6, 60, 160, 30, false)
    Shortcut Key Field = skAlt + skShift + VK_F10
Remarks:
  • To manage the character keys, use the ASCII code of character (returned by Asc).
  • All the constants found in the KeyConst.WL file start with the letters VK_. As soon as the file was included with the EXTERN keyword, these constants are proposed by the automatic completion in the code editor.
Windows Mobile

Keys on Mobile devices (Pockets PC) and Smartphones

The diagrams below present the WLanguage constants associated with the keys.
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment