mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 13:12:37 +02:00
Patch from bug #20121, also added ssModifier constant in the unit Controls for global usage, but use it with care not to do something like [ssModifier, ssMeta] which wont compile in Macs
git-svn-id: trunk@35131 -
This commit is contained in:
parent
3b95059ce4
commit
1130c0fb47
@ -70,6 +70,10 @@ const
|
||||
bvRaised = GraphType.bvRaised;
|
||||
bvSpace = GraphType.bvSpace;
|
||||
|
||||
// Constant to define which key should be utilized for keyboard shortcuts like Ctrl+C (Copy),Z,X,V
|
||||
// Mac and iOS use Meta instead of Ctrl for those shortcuts
|
||||
ssModifier = {$if defined(darwin) or defined(macos) or defined(iphonesim)} ssMeta {$else} ssCtrl {$endif};
|
||||
|
||||
type
|
||||
TWinControl = class;
|
||||
TControl = class;
|
||||
|
@ -1657,7 +1657,7 @@ begin
|
||||
begin//Cut
|
||||
CutToClipBoard;
|
||||
end
|
||||
else if (Shift = [ssCtrl]) then
|
||||
else if (Shift = [ssModifier]) then
|
||||
begin//Clear
|
||||
DeleteSelected;
|
||||
end
|
||||
@ -1701,20 +1701,20 @@ begin
|
||||
PasteFromClipBoard;
|
||||
end;
|
||||
end
|
||||
else if (Shift = [ssCtrl]) then
|
||||
else if (Shift = [ssModifier]) then
|
||||
begin//Copy
|
||||
CopyToClipBoard;
|
||||
end;
|
||||
Key := 0;
|
||||
Exit;
|
||||
end;
|
||||
if (Key = VK_C) and (Shift = [ssCtrl]) then
|
||||
if (Key = VK_C) and (Shift = [ssModifier]) then
|
||||
begin//Copy
|
||||
CopyToClipBoard;
|
||||
Key := 0;
|
||||
Exit;
|
||||
end;
|
||||
if (Key = VK_X) and (Shift = [ssCtrl]) then
|
||||
if (Key = VK_X) and (Shift = [ssModifier]) then
|
||||
begin//Cut
|
||||
if not ReadOnly then
|
||||
begin
|
||||
@ -1723,7 +1723,7 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if (Key = VK_V) and (Shift = [ssCtrl]) then
|
||||
if (Key = VK_V) and (Shift = [ssModifier]) then
|
||||
begin//Paste
|
||||
if not ReadOnly then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user