Help For TAB function on CEF1

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.

Help For TAB function on CEF1

Postby cmtjy11 » Sun Jan 20, 2013 9:45 pm

Hello,

I'm using VS2010 build a project about CEF 1 on Windows 7 64bits.
Nowadays I found that when I press TAB the cursor will skip into the URL address ,it maybe right but I wanna ban it and realize the other.
I use the OnKeyEvent via (code == VK_TAB), even directly return true , it doesn't work.
Then I use the JavaScript, via the body's keydown event ,it still doesn't work .WHY?? Need your advice!

Secondly Could I use the SendKeyEvent to post combination key like "shift + Enter" or "ctrl + c" and so on???

Moreover I found when I send like "browser->SendKeyEvent(KT_KEYDOWN, VK_RETURN, 0, false, false);"
On the API OnKeyEvent I found that the modifiers is 1024, the code and type are both right,
but I send like "browser->SendKeyEvent(KT_KEYDOWN, VK_RETURN, 1025, false, false);" it will be wrong in the OnKeyEvent ,because the modifiers will become 1056;
I only know these as follows,something else?? :evil:
KEY_SHIFT
KEY_CTRL
KEY_ALT
KEY_META
KEY_KEYPAD


Thanks for help!
cmtjy11
Techie
 
Posts: 17
Joined: Wed Jul 04, 2012 1:02 am

Re: Help For TAB function on CEF1

Postby magreenblatt » Tue Jan 22, 2013 8:59 am

Implement CefFocusHandler::OnTakeFocus.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Help For TAB function on CEF1

Postby cmtjy11 » Wed Jan 23, 2013 12:52 am

magreenblatt wrote:Implement CefFocusHandler::OnTakeFocus.

thanks a lot, I found it work, and it only work when I press the TAB. but it also helps.
BTW, about the other two problems, do you have any idea??
the modifiers become 1056, it should be wrong. after I SendKeyEvent the bool isAfterJavaScript will be true. Need some advice.


and I use the version "cef_binary_1.1025.607_windows", THX
cmtjy11
Techie
 
Posts: 17
Joined: Wed Jul 04, 2012 1:02 am


Return to Support Forum

Who is online

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