- TQtWidgetSet.GetKeyState (SynEdit understands more key sequences now)

git-svn-id: trunk@11619 -
This commit is contained in:
paul 2007-07-25 09:24:31 +00:00
parent a73411c689
commit cee914a98d
2 changed files with 35 additions and 0 deletions

View File

@ -1646,6 +1646,40 @@ begin
end;
end;
function TQtWidgetSet.GetKeyState(nVirtKey: Integer): Smallint;
begin
Result := 0;
case nVirtKey of
VK_LSHIFT: nVirtKey := VK_SHIFT;
VK_LCONTROL: nVirtKey := VK_CONTROL;
VK_LMENU: nVirtKey := VK_MENU;
end;
case nVirtKey of
VK_MENU:
if (QApplication_keyboardModifiers and QtMetaModifier) > 0 then
Result:=-1;
VK_SHIFT:
if (QApplication_keyboardModifiers and QtShiftModifier) > 0 then
Result:=-1;
VK_CONTROL:
if (QApplication_keyboardModifiers and QtControlModifier) > 0 then
Result:=-1;
VK_LBUTTON:
if (QApplication_mouseButtons and QtLeftButton) > 0 then
Result := -1;
VK_RBUTTON:
if (QApplication_mouseButtons and QtRightButton) > 0 then
Result := -1;
VK_MBUTTON:
if (QApplication_mouseButtons and QtMidButton) > 0 then
Result := -1;
else
DebugLn('TQtWidgetSet.GetKeyState TODO ', DbgSVKCode(Word(nVirtkey)));
end;
end;
{------------------------------------------------------------------------------
Method: TQtWidgetSet.GetDeviceRawImageDescription
Params: none

View File

@ -81,6 +81,7 @@ function GetDeviceRawImageDescription(DC: HDC; Desc: PRawImageDescription): bool
function GetDeviceSize(DC: HDC; var P: TPoint): Boolean; Override;
function GetDC(hWnd: HWND): HDC; override;
function GetFocus: HWND; override;
function GetKeyState(nVirtKey: Integer): Smallint; override;
function GetMapMode(DC: HDC): Integer; override;
function GetObject(GDIObj: HGDIOBJ; BufSize: Integer; Buf: Pointer): Integer; override;
function GetProp(Handle : hwnd; Str : PChar): Pointer; override;