Develop a browser app based on Gecko lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- csip · 2011-08-02 11:48 Hi! I'm developing a browser app based on Gecko, and need some help. I want to implement following: Catch a Keypress event and get scan code of pressed key in browser component. Catch a Click or double click event and mouse position in browser component. How can I get these informations from onDOMKeyUp/onDOMKeyDown, onDOMMouseClick events? Or is there any other solution? Thanks! ---------------------------------------------------------------------- Sora-Kun · 2011-08-02 11:58 Hi,   You should read the Gecko Documentation (if there is one).  there is no example provided with the package ? ---------------------------------------------------------------------- csip · 2011-08-02 15:56 Quote from: KingXerxes on August 02, 2011, 01:58:16 pm  You should read the Gecko Documentation (if there is one). Why do you think that I didn't done it? Quote from: KingXerxes on August 02, 2011, 01:58:16 pm there is no example provided with the package ? Of course there is an example. But it shows very simple usage. Many thanks that you want to help ---------------------------------------------------------------------- gmendezg · 2013-06-23 15:35 The Gecko component is incomplete. You can add this code in your project: Code: [Select] //Extends nsXPCOM to support NS_IDOMKEYEVENT_IID //View example C++ http://frothing.googlecode.com/svn/trunk/src/mozilla/mozsupport.cpp const   NS_IDOMKEYEVENT_IID: TGUID = '{028e0e6e-8b01-11d3-aae7-0010838a3123}'; type     nsIDOMKeyEvent = interface(nsIDOMUIEvent)       ['{028e0e6e-8b01-11d3-aae7-0010838a3123}']       function GetAltKey(): PRBool; safecall;       property AltKey: PRBool read GetAltKey;       function GetCharCode(): PRUint16; safecall;     end; //Asign this method to the onDOMKeyDown event procedure TMainForm.webBrowserDOMKeyPress(Sender: TObject;   aEvent: TGeckoDOMEvent); var ev:nsIDOMKeyEvent; begin   aEvent.event.QueryInterface (NS_IDOMKEYEVENT_IID, ev);   case ev.GetCharCode() of        27: begin                     do something ....            end;        VK_F5: do something....   end;   //ShowMessage(intToStr(ev.GetCharCode())); end;