RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBCtrlGrid.KeyDown Method

Performs special processing when a key is pressed.

Pascal
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
C++
virtual __fastcall KeyDown(Word Key, TShiftState Shift);

After calling the OnKeyDown event handler, KeyDown translates each combination of the Key and Shift parameters into a logical key code and calls the DoKey method to perform the appropriate action. 

KeyDown performs the following translations:

Key and Shift values 
Key code 
LeftArrow  
gkLeft  
RightArrow  
gkRight  
UpArrow  
gkUp  
DownArrow  
gkDown  
PageUp  
gkPageUp  
PageDown  
gkPageDown  
Home  
gkHome  
End  
gkEnd  
Return  
gkEditMode  
F2  
gkEditMode  
Insert  
gkAppend  
Ctrl+Insert  
gkInsert  
Ctrl+Delete  
gkDelete  
Escape  
gkCancel  
All other keys  
gkNull  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!