Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetKeyNameText() for different keyboard layouts
Message
From
16/12/2005 08:17:49
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01077812
Message ID:
01078610
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform