CefSharp icon indicating copy to clipboard operation
CefSharp copied to clipboard

WinForms - Hot keys are being swallowed, for example: System.Windows.Forms.Keys.LaunchApplication2

Open kiewic opened this issue 4 years ago • 2 comments

  • What version of the product are you using?

    • I'm running CefSharp.WinForms.Example from master branch commit 1155ef107c0d7464feec5c0db0ed90bbddccad64.
    • This example is pulling NuGet packages:
      • cef.redist.x64 79.1.31
      • cef.resdit.x86 79.1.31
    • I can reproduce with many other version of CefSharp (75, 73, etc.)
  • What architecture x86 or x64?

    • x86 and x64
  • On what operating system?

    • Windows 10
  • Are you using WinForms, WPF or OffScreen?

    • WinForms
  • What steps will reproduce the problem?

    1. Launch the CefSharp.WinForms.Example
    2. Press the Calculator, Browser Home or Launch Mail keys. Not every keyboard has hot keys, but the Natural Ergonomic Keyboard 4000 is an example of a keyboard that has these keys.
    3. Notice that the calculator, the default browser or the default email reader are not launched.
    4. Change to a non-CefSharp application and press these keys again. Calculator, default browser and default email reader are launched.
  • What is the expected output? What do you see instead?

    • CefSharp should NOT swallow these keys.
  • Please provide any additional information below.

    • No logs related using settings.LogSeverity = LogSeverity.Verbose
  • Does this problem also occur in the CEF Sample Application from http://opensource.spotify.com/cefbuilds/index.html?

    • To compare with WinForms run cefclient --multi-threaded-message-loop
    • The issues does not reproduces with cef_binary_79.1.31+gfc9ef34+chromium-79.0.3945.117_windows64_client.tar.bz2

kiewic avatar Jan 25 '20 01:01 kiewic

2. Press the Calculator, Browser Home or Launch Mail keys. Not every keyboard has hot keys, but the Natural Ergonomic Keyboard 4000 is an example of a keyboard that has these keys.

I don't own a keyboard with hot keys. You are are absolutely welcome to submit a PR.

Does the problem reproduce if you set multiThreadedMessageLoop to false? https://github.com/cefsharp/CefSharp/blob/cefsharp/79/CefSharp.WinForms.Example/Program.cs#L63

amaitland avatar Feb 05 '20 03:02 amaitland

That's a good point I forgot to mention. The issue does not reproduce with multiThreadedMessageLoop set to false.

Any clue where the issue could be?

kiewic avatar Feb 05 '20 18:02 kiewic