Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetKeyNameText() for different keyboard layouts
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01077812
Message ID:
01078610
Vues:
12
This message has been marked as the solution to the initial question of the thread.
Hi, just to share a solution:

**************************************************************
local lnScanCode
lnScanCode = 33

declare integer ToAscii IN user32 integer uVirtKey, integer uScanCode, string @lpKeyState, string @lpChar, integer uFlags
*!* declare integer GetKeyboardState in user32 string @lpKeyState
declare integer MapVirtualKey in user32 integer uCode, integer uMapType

local lcKeyState, lcChar
lcKeyState = chr(0) && although it should be something like =GetKeyboardState(@lcKeyState)
lcChar = chr(0)
if ToAscii(MapVirtualKey(lnScanCode,1), 0, @lcKeyState, @lcChar, 0) = 1
? lcChar
endif
***************************************************************

Mario
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform