Skip to content

Commit

Permalink
Improving keyboard-based working
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankBijnen committed Jan 25, 2025
1 parent dd5d270 commit f051b61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ object FMain: TFMain
OnEnter = EditQuickEnter
OnExit = EditQuickExit
OnKeyDown = EditQuickKeyDown
OnKeyPress = EditQuickKeyPress
end
object EditQuick: TEdit
Left = 48
Expand All @@ -334,6 +335,7 @@ object FMain: TFMain
OnEnter = EditQuickEnter
OnExit = EditQuickExit
OnKeyDown = EditQuickKeyDown
OnKeyPress = EditQuickKeyPress
end
end
object MetadataList: TValueListEditor
Expand Down
7 changes: 7 additions & 0 deletions Source/Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ TFMain = class(TScaleForm)
procedure CBoxETdirectKeyPress(Sender: TObject; var Key: Char);
procedure MetadataListStringsChange(Sender: TObject);
procedure MetadataListMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure EditQuickKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
ETBarSeriesFocal: TBarSeries;
Expand Down Expand Up @@ -2536,6 +2537,12 @@ procedure TFMain.EditQuickKeyDown(Sender: TObject; var Key: Word; Shift: TShiftS
end;
end;

procedure TFMain.EditQuickKeyPress(Sender: TObject; var Key: Char);
begin
if (Key = #13) then
Key := #0;
end;

procedure TFMain.ShowPreview;
var
{$IFDEF DEBUG_META}
Expand Down

0 comments on commit f051b61

Please sign in to comment.