At the form level, it can be done by using the form's KeyPreview property and OnKeyPress event handler, for example:
function IsKeyPressed(const AKey : Word) : Boolean;
begin
Result := GetKeyState(AKey) < 0;
end;
procedure TMyBaseForm.FormCreate(Sender: TObject);
begin
inherited;
KeyPreview := True;
end;
procedure TMyBaseForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if(IsKeyPressed(VK_DECIMAL))
then Key := FormatSettings.DecimalSeparator;
end;
But this solution requires to have a common base form class for all application's forms and won't work with any form/dialog who is not inheriting from that base class (i.e: It will not work with a simple InputQuery either)