Skip to content

Commit

Permalink
disable hotkeys Ctrl+F Ctrl+G in x32 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Feb 10, 2023
1 parent b26ba8b commit 917df6c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
45 changes: 22 additions & 23 deletions form_main.lfm
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
object fmMain: TfmMain
Left = 47
Height = 561
Height = 374
Top = 272
Width = 978
Width = 652
BorderStyle = bsNone
Caption = 'fmMain'
ClientHeight = 561
ClientWidth = 978
DesignTimePPI = 144
ClientHeight = 374
ClientWidth = 652
KeyPreview = True
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
PopupMenu = PopupText
LCLVersion = '2.2.4.0'
LCLVersion = '2.3.0.0'
object PanelAll: TPanel
Left = 0
Height = 561
Height = 374
Top = 0
Width = 978
Width = 652
Align = alClient
BevelOuter = bvNone
ClientHeight = 561
ClientWidth = 978
ClientHeight = 374
ClientWidth = 652
TabOrder = 0
object ed: TATSynEdit
Left = 0
Height = 561
Height = 374
Top = 0
Width = 978
Width = 652
Align = alClient
DoubleBuffered = True
Font.Height = -18
Font.Height = -12
Font.Name = 'MS Shell Dlg'
ParentFont = False
TabOrder = 0
Expand All @@ -54,13 +53,13 @@ object fmMain: TfmMain
end
end
object PopupLexers: TPopupMenu
Left = 258
Top = 122
Left = 172
Top = 81
end
object PopupText: TPopupMenu
OnPopup = PopupTextPopup
Left = 353
Top = 122
Left = 235
Top = 81
object mnuTextUndo: TMenuItem
Caption = 'Undo'
ShortCut = 16474
Expand Down Expand Up @@ -152,8 +151,8 @@ object fmMain: TfmMain
end
end
object PopupEnc: TPopupMenu
Left = 450
Top = 134
Left = 300
Top = 89
end
object PopupFileEnd: TPopupMenu
object mnuEndWin: TMenuItem
Expand All @@ -173,13 +172,13 @@ object fmMain: TfmMain
Enabled = False
Interval = 4000
OnTimer = TimerStatusbarTimer
Left = 569
Top = 150
Left = 379
Top = 100
end
object TimerEmpty: TTimer
Interval = 150
OnTimer = TimerEmptyTimer
Left = 707
Top = 168
Left = 471
Top = 112
end
end
9 changes: 9 additions & 0 deletions form_main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ procedure TfmMain.edKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
exit
end;

{$ifdef CPU64}
//we disable hotkeys Ctrl+F Ctrl+G Ctrl+H because in 32-bit version they give inseting chars F G H

//support Ctrl+F
if (Key=VK_F) and (Shift=[ssCtrl]) then
begin
Expand Down Expand Up @@ -475,6 +478,7 @@ procedure TfmMain.edKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
Key:= 0;
exit
end;
{$endif CPU64}

//support Ctrl+S
if (Key=VK_S) and (Shift=[ssCtrl]) then
Expand Down Expand Up @@ -899,6 +903,11 @@ procedure TfmMain.FormCreate(Sender: TObject);

LoadOptions;
UpdateMenuEnc(PopupEnc.Items);

{$ifndef CPU64}
mnuTextGoto.ShortCut:= 0;
mnuFind.ShortCut:= 0;
{$endif}
end;

procedure TfmMain.FormDestroy(Sender: TObject);
Expand Down

0 comments on commit 917df6c

Please sign in to comment.