Browse Source

Reintroduce Microsoft copy/paste keys for Input Lines

Margers 11 months ago
parent
commit
91d9c3286a
2 changed files with 7 additions and 7 deletions
  1. 0 4
      packages/ide/fpviews.pas
  2. 7 3
      packages/ide/weditor.pas

+ 0 - 4
packages/ide/fpviews.pas

@@ -541,10 +541,6 @@ const menu_key_edit_cut:string[63]=menu_key_edit_cut_borland;
       menu_key_edit_paste:string[63]=menu_key_edit_paste_borland;
       menu_key_edit_paste:string[63]=menu_key_edit_paste_borland;
       menu_key_edit_all:string[63]=menu_key_edit_all_borland;
       menu_key_edit_all:string[63]=menu_key_edit_all_borland;
       menu_key_hlplocal_copy:string[63]=menu_key_hlplocal_copy_borland;
       menu_key_hlplocal_copy:string[63]=menu_key_hlplocal_copy_borland;
-      cut_key:word=kbShiftDel;
-      copy_key:word=kbCtrlIns;
-      paste_key:word=kbShiftIns;
-      all_key:word=kbNoKey;
 
 
 procedure RegisterFPViews;
 procedure RegisterFPViews;
 
 

+ 7 - 3
packages/ide/weditor.pas

@@ -736,6 +736,10 @@ const
        GetShiftState to be considered for extending
        GetShiftState to be considered for extending
        selection (PM) }
        selection (PM) }
      DontConsiderShiftState: boolean  = false;
      DontConsiderShiftState: boolean  = false;
+     cut_key:word=kbShiftDel;
+     copy_key:word=kbCtrlIns;
+     paste_key:word=kbShiftIns;
+     all_key:word=kbNoKey;
 
 
      CodeCompleteMinLen : byte = 4; { minimum length of text to try to complete }
      CodeCompleteMinLen : byte = 4; { minimum length of text to try to complete }
 
 
@@ -7006,7 +7010,7 @@ begin
                end;
                end;
              ClearEvent(Event);
              ClearEvent(Event);
            End
            End
-         else if (Event.KeyCode=kbShiftIns)  and
+         else if ((Event.KeyCode=kbShiftIns) or (Event.KeyCode=paste_key))  and
                  Assigned(Clipboard) and (Clipboard^.ValidBlock) then
                  Assigned(Clipboard) and (Clipboard^.ValidBlock) then
            { paste from clipboard }
            { paste from clipboard }
            begin
            begin
@@ -7034,7 +7038,7 @@ begin
                end;
                end;
              ClearEvent(Event);
              ClearEvent(Event);
            end
            end
-         else if (Event.KeyCode=kbCtrlIns)  and
+         else if ((Event.KeyCode=kbCtrlIns) or (Event.KeyCode=copy_key))  and
                  Assigned(Clipboard) then
                  Assigned(Clipboard) then
            { Copy to clipboard }
            { Copy to clipboard }
            begin
            begin
@@ -7045,7 +7049,7 @@ begin
              Clipboard^.SelEnd:=Clipboard^.CurPos;
              Clipboard^.SelEnd:=Clipboard^.CurPos;
              ClearEvent(Event);
              ClearEvent(Event);
            end
            end
-         else if (Event.KeyCode=kbShiftDel)  and
+         else if ((Event.KeyCode=kbShiftDel) or (Event.KeyCode=cut_key))  and
                  Assigned(Clipboard) then
                  Assigned(Clipboard) then
            { Cut to clipboard }
            { Cut to clipboard }
            begin
            begin