call KeyDownAfterInterface TWinControl does nothing here.if your custom control does something special with tab, override and inhibit, for example TCustomMemo.call ControlKeyDown, which in TWinControl, calls Application.ControlKeyDown:.TWinControl will call its Parent's ChildKey that's the "iteratively".use it to handle key shortcuts in a certain "area", for example a panel.if there is a Parent, iteratively call Parent.ChildKey to handle key message.else if there is a main form (Application.MainForm), let it handle a shortcut.else if there is a focused form (Screen.ActiveCustomForm), let it handle a shortcut.if there is a modal form active, let it handle a shortcut (see above, TCustomForm.IsShortcut).
if application has OnShortcut assigned, call it.let the application handle a shortcut (Application.IsShortcut):.set the menu's ShortcutHandled property to false in the menu item's OnClick handler, if you did not handle the shortcut and want to let the key processing continue.iterate through all menu items for this menu, check shortcuts, ".Click" the item.if form has Menu assigned, check it for shortcuts:.if form has OnShortcut event assigned, call it.get parent form, let it handle possible shortcut (TCustomForm.IsShortcut):.if a popupmenu is assigned, check it for shortcuts (whether it is popped up or not).When unhandled, that is, Message.Result = 0, it lets the widget handle the key, and if the widget has not done anything useful, then send a LM_KEYDOWN/LM_SYSKEYDOWN message to the LCL, which calls DoRemainingKeyDown consisting of: call KeyDownBeforeInterface (if control does not have csNoStdEvents in ControlStyle):.let the associated dragobject handle the key.get parent form, if it has keypreview, call its DoKeyDownBeforeInterface.call Application.NotifyKeyDownBeforeHandler (invokes before handlers).Before letting the "native" widget handle the key, send CN_KEYDOWN/CN_SYSKEYDOWN to the LCL (CN_SYSKEYDOWN when alt key is down), which calls DoKeyDownBeforeInterface consisting of: When the widgetset receives a key press it must act as follows. VK Table, slightly more useful, even for non German speakers.Normal letters and numbers are in the form VK_S or VK_5 the number pad keys are formed like this VK_NUMPAD5. Other useful examples are VK_RETURN, VK_ESCAPE and VK_TAB.
They are in the form of VK_DELETE and although these are old Windows symbols they work on all platforms. Key codes are defined in the LCLType unit.