Knowing if Shift-Key is pressed in WMKeyDown lazarus / 8-Other ---------------------------------------------------------------------- mmustaros · 2006-09-16 09:06 Hi, I have a component which is derived from TEdit. I add to it the following procedure: Procedure WMKeyDown(var Message: TLMKeyDown); Message LM_KeyDown; and the internal code: Procedure TMMBEditBtn.WMKeyDown(var Message: TLMKeyDown); //Message LM_KeyDown; begin   if Message.CharCode = 9 then begin     showmessage ('Key Tab Pressed')     end; end; I need know inside this procedure if Shift key is pressed. Delphi has GetKeyState function. if GetKeyState(VK_SHIFT) < 0 then Showmessage('Shift was pressed'); but it don't work in Lazarus. Can everyone help me? thanks, Miquel. ---------------------------------------------------------------------- Marc · 2006-09-19 10:55 lclintf has, but.... to make life easier, don't mess with wmKeyxxx messages. windows messages are not guarantied to work. Better override the Keydown/KeyDownBeforeInterface/KeyDownAfterInterface method. There you have the translated shiftstate as well.