CEF3 Detect user interaction

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF3 Detect user interaction

Postby FinitelyFailed » Thu Sep 17, 2015 7:44 am

Hi

What is the best way to detect user interaction, e.g. that a user types something, scrolls, clicks on a link etc? I have found the KeyboardHandler (which works fine), but as I understand there is no MouseHandler or similar? I have create a Window in Qt 5.5 and uses its HWND when creating a browser. This works fine, but CEF seems to eat up all input events, making it pretty hard to intercept.
FinitelyFailed
Techie
 
Posts: 27
Joined: Wed Sep 16, 2015 1:22 am

Re: CEF3 Detect user interaction

Postby magreenblatt » Thu Sep 17, 2015 10:54 am

What are you trying to do? Events can be detected using JavaScript.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3 Detect user interaction

Postby FinitelyFailed » Fri Sep 18, 2015 1:23 am

I'm just trying to detect if a user is using the browser, if there is no activity after a time I may want to do something. Like load an other URL or similar. The browser should be able to display an arbitrary website.

Edit: So the best solution is somewhere a long the line of executing a javascript (from inside my application) in the browser and let it (the javascript) talk with my app? How to I get it to communicate from the script to my application? How can I avoid some kind of conflict problem with the websites javascript? Excuse my ignorance, I'm not a web developer.
FinitelyFailed
Techie
 
Posts: 27
Joined: Wed Sep 16, 2015 1:22 am

Re: CEF3 Detect user interaction

Postby magreenblatt » Fri Sep 18, 2015 4:18 am

FinitelyFailed wrote:How to I get it to communicate from the script to my application?

See the JavaScriptIntegration and GeneralUsage Wiki pages.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 89 guests