From b53d0aeba04a4c5552aaede6393e549d3602bd75 Mon Sep 17 00:00:00 2001 From: jesus Date: Sun, 17 Aug 2008 18:20:33 +0000 Subject: [PATCH] LCL, check for modified charcode after keypress, issue #11793 git-svn-id: trunk@16091 - --- lcl/interfaces/win32/win32callback.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index f54223b5e9..98e2f4cdbd 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -249,6 +249,7 @@ var NMHdr: PNMHdr absolute LParam; // used by WM_NOTIFY TmpSize: TSize; // used by WM_MEASUREITEM Info: TComboboxInfo; + OrgCharCode: word; // used in WM_CHAR handling function ShowHideTabPage(NotebookHandle: HWnd; Showing: boolean): integer; var @@ -1255,6 +1256,7 @@ begin CharCode := Word(Char(WideChar(WParam))) else CharCode := Word(WParam); + OrgCharCode := CharCode; Result := 0; Assert(False,Format('WM_CHAR KeyData= %d CharCode= %d ',[KeyData,CharCode])); end; @@ -2403,7 +2405,7 @@ begin // if charcode was modified by LCL, convert ansi char // to unicode char, if not change was made WParam has // the right unicode char so just use it. - if (LMChar.Result=1) then + if (LMChar.Result=1) or (OrgCharCode<>LMChar.CharCode) then WParam := Word(WideChar(Char(LMChar.CharCode))); end else {$ENDIF}