I started doing some research. While Fwh 23.07 version was active, I manually added TGet.prg to the make file of the program. I put a rem at the beginning of the METHOD KeyChar function in TGet.prg, and when I ran the program and pressed the Ğ character while on a get field, I got the value 208 in the nKey variable as follows.
- Code: Select all Expand view RUN
- METHOD KeyChar( nKey, nFlags ) CLASS TGet
local nHi, nLo
local lAccept
local bKeyAction := SetKey( nKey )
local nDefButton
local nVal, cVal
? nKey, nFlags, FW_SetUnicode()
http://www.objekt.com.tr/fwh_test/newtest2.png
Likewise, in the test performed when the fwh 23.10 version was active, the nKey variable returned the value 286, as seen below.
http://www.objekt.com.tr/fwh_test/newtest3.png
In both versions, there is a code snippet like the one below inside the METHOD KeyChar function.
- Code: Select all Expand view RUN
- //
case nKey > 255
// reject unicode chars
SendMessage( ::hWnd, WM_CHAR, ASC( "?" ), 0 )
return 0
In fwh 23.10 version, when the nKey variable is 286, a question mark is printed on the screen as per the action in this code.
As seen in both versions, the FW_Unicode() function Even though it is defined as .F., the nKey variable coming to METHOD KeyChar is different.
I tried both versions in FW_Unicode(.T.) condition. In both cases, the nKey variable is 286.
conclusion : METHOD Which function triggers the KeyChar function?