Replies: 1 comment
-
Tab button click? Do you mean tab key press? If you need to focus the next control then you should be able to cast IWebBrowser to ChromiumWebBrowser and call https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.selectnextcontrol?view=windowsdesktop-6.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Using Chromium Win Forms (last version available at Nuget). Found that browser is "eating" keyboard input, preventing main form keydown event handler to be hooked. In general thats ok, however I need to change this behaviour for "Tab" button (when clicking it I need to send focus from browser to another control on my form). At the same time, the rest of key input should be processed by chromium as it is now.
I suppose, I should somehow implement the interface IKeyboardHandler and connect it to the ChromiumWebBrowser.KeyboardHandler property, and return true on any keypress in both OnKeyEvent() and OnPreKeyEvent(). Tried this example https://github.com/cefsharp/CefSharp/blob/master/CefSharp.WinForms.Example/Handlers/KeyboardHandler.cs , but it doesnt work out of the box. Basically I tried to change it a little bit to process TAB in OnPreKeyEvent. In this case it avoids browser to process it, however further the event is not propagated to parent form keydown
Beta Was this translation helpful? Give feedback.
All reactions