mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 19:20:30 +02:00
(Qt):
- TQtWidgetSet.GetKeyState (SynEdit understands more key sequences now) git-svn-id: trunk@11619 -
This commit is contained in:
parent
a73411c689
commit
cee914a98d
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user