keypressed / keyup / keydown

636 views
Skip to first unread message

Nicolas Rafalowski

unread,
May 10, 2012, 2:34:20 AM5/10/12
to cefs...@googlegroups.com

I have a Winform application where a put cef in it docked to fill the form.
 
How I can get keypressed events???
 
 I need to check if the user pressed F11.
 
I tried everything but with no success... I am not getting any key event!!!
 
nor at the form level nor at the cef control level
 
Any suggestions?

anthony taranto

unread,
May 10, 2012, 3:45:32 AM5/10/12
to cefs...@googlegroups.com
The GitHub user MickMaido implemented CefKeyboardHandler in his branch here:

https://github.com/MickMaido/CefSharp/commit/a1969f1f5a40b8d188f63ba570da4b25bb0725af

He hasn't sent a pull request and I haven't been proactive about merging changes. If you want to clean up this change and send me a pull request I'll consider merging it into my master branch when I have time.

In the mean time, you may be able to catch the browser key press using javascript and communicate it back to your c# code using a bound object.

Nicolas Rafalowski

unread,
May 10, 2012, 6:24:59 AM5/10/12
to cefs...@googlegroups.com
I tried it and worked just fine!!! until i tried to capture F1-F12 keys... with no success
 
does MickMaido  brach fix it also?
 
any suggestions.

anthony taranto

unread,
May 10, 2012, 2:16:09 PM5/10/12
to cefs...@googlegroups.com
You tried using javascript but javascript is unable to detect function keys? I am not sure how the MickMaido branch behaves, I have not tried it.

anthony taranto

unread,
May 17, 2012, 3:41:51 AM5/17/12
to cefs...@googlegroups.com
I merged the MickMaido changes. Using the latest master, you should now be able to implement IKeyboardHandler, it appears to correctly capture function keypresses.
Reply all
Reply to author
Forward
0 new messages