ATSynEdit icon indicating copy to clipboard operation
ATSynEdit copied to clipboard

tried to fix CudaText Shift+NumPadHome, Shift+NumPadEnd

Open Alexey-T opened this issue 4 years ago • 0 comments

atsynedit_cmd_handler.inc

procedure TATSynEdit.KeyDown(var Key: Word; Shift: TShiftState);
var
  NCmd: integer;
begin
  if FLockInput then exit;
  inherited;
  if Key=0 then Exit;

  //solve CudaText issue #1703, when Shift+NumPad7 is not recognized as Shift+Home (same for Shift+End)
  {$if defined(LCLGTK2) or defined(LCLQT5)}
  if Key=VK_NUMPAD1 then
  begin
    Key:= VK_END;
    if ssShift in GetKeyShiftState then
      Shift:= [ssShift];
  end
  else
  if Key=VK_NUMPAD7 then
  begin
    Key:= VK_HOME;
    if ssShift in GetKeyShiftState then
      Shift:= [ssShift];
  end;
  {$endif}
                 

this don't help, because LCL gets NumPad1, NumPad7 WITHOUT SHIFT STATE even when Shift is pressed! gtk2+qt5.

Alexey-T avatar Sep 24 '21 19:09 Alexey-T