Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2063 - Incorrect disable Esc key
Summary: Incorrect disable Esc key
Status: RESOLVED FIXED
Alias: None
Product: TeeGrid for Delphi
Classification: Unclassified
Component: Grid (show other bugs)
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: david berneda
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-17 10:41 EDT by sandra pazos
Modified: 2018-07-17 10:42 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sandra pazos 2018-07-17 10:41:50 EDT
The Key variable should not always be assigned to 0. 
To solve a problem with a specific platform, you should enclose it in the corresponding define. The code below maybe fix the problem: 
procedure TTeeGrid.KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);
var tmp : TKeyState;
begin
  inherited;

  tmp.KeyChar:=KeyChar;
  tmp.Key:=Key;

  tmp.Shift:=Shift;
  tmp.Event:=TGridKeyEvent.Down;

  FGrid.Key(tmp);

  {$IFDEF MACOS32}
  Key:=0; // <-- disable "beep" on Mac OSX
  {$ENDIF}
end;