Some users have mouse with back/next buttons. CEF uses them to go back/next in the navigation history. However, I want to prevent that and to move that logic in my application instead. I can't find a way to do that, since TChromium events are not fired for these buttons, so I was wondering if it is possible to add such setting for CEF?
I have found the following, which might be helpful:
https://magpcss.org/ceforum/viewtopic.php?f=6&t=16543
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Disable back/next mouse buttons
Re: Disable back/next mouse buttons
Use the OnRenderCompMsg event
Code: Select all
case aMessage.Msg of
//button down
523:
begin
case aMessage.wParamHi of
1: aHandled := true;
2: aHandled := true;
end;
end;
//button up
524:
begin
case aMessage.wParamHi of
1: begin
aHandled := true;
//here you execute your code
end;
2: begin
aHandled := true;
//here you execute your code
end;
end;
end;
end;
Re: Disable back/next mouse buttons
Thanks, that works!