Search code examples
c#winformsgoogle-chromecefsharpon-screen-keyboard

CefSharp: I want to open my custom keyboard in the ChromiumWebBrowse


I want to open my own keyboard in the ChromiumWebBrowser. I do not know how to do that. I cannot determine the focus of an Input element. And I only need my own touch keyboard. I use CefSharp.WinForms 83.4.20.0. Windows 7 and Windows 8 , Windows 10

CefSettings settings = new CefSettings();
settings.CefCommandLineArgs["touch-events"] = "enabled";
settings.CefCommandLineArgs.Add("disable-usb-keyboard-detect", "1");
Cef.Initialize(settings)

This brings up the Windows OnScreen-Keyboard, but I want brings up own keyboard.


Solution

  • My problem is solved. This code helped to connect my keyboard

    browser settings

       CefSharpSettings.ShutdownOnExit = true;
       CefSettings settings = new CefSettings();
       settings.CachePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\CEF";
       settings.CefCommandLineArgs["print-preview"]= "disable";
       Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
    

    Keyboard call

    ScreenKeyboard.Invoke(new Action(() =>
                            {
                                ScreenKeyboard.Visible = (task.Exception == null && task.Result);
                            }));