Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tried to fix CudaText Shift+NumPadHome, Shift+NumPadEnd #289

Open
Alexey-T opened this issue Sep 24, 2021 · 0 comments
Open

tried to fix CudaText Shift+NumPadHome, Shift+NumPadEnd #289

Alexey-T opened this issue Sep 24, 2021 · 0 comments

Comments

@Alexey-T
Copy link
Owner

Alexey-T commented Sep 24, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant