chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.17k stars 452 forks source link

Alt Gr and Ctrl + Alt issues in OSR mode #3026

Open magreenblatt opened 3 years ago

magreenblatt commented 3 years ago

Original report by Per Bengtsson (Bitbucket: Per Bengtsson).


On a Swedish keyboard layout it is possible to output @ using Alt Gr + 2 but Ctrl + Alt + 2 is no longer working. Simulating the input (both methods) from auto test (e.g. python) no longer works either.

  1. Physically typing Ctrl + Alt + 2 or simulating from test code (example code in Python below).
  2. Expected output @. Actual output nothing.
  3. Tested on cef_binary_85.3.12+g3e94ebf+chromium-85.0.4183.121_windows64_client.
    OS: Windows 10 Enterprise 64-bit.
  4. The issue started on cef_binary_80.0.4+g74f7b0c+chromium-80.0.3987.122_windows64_client.
  5. Not reproducible on Google Chrome Version 85.0.4183.121 (Official Build) (64-bit)
# Set focus on a webpage texbox and run the below function in a Python console.
import keyboard
from time import sleep

def output_at_sign():
   # Switch back to the browser
   keyboard.press_and_release('alt+tab')
   sleep(1)

   # Output @
   keyboard.press_and_release('altgr+2')

magreenblatt commented 3 years ago

Original comment by Florian Simon (Bitbucket: Florian Simon).


I had this issue in my CEF application. There’s a been a change in how CEF handles Alt-Gr. There’s a new you gotta handle event modifiers in your code.

magreenblatt commented 3 years ago

Duplicate of #2892.

magreenblatt commented 3 years ago

Original comment by Per Bengtsson (Bitbucket: Per Bengtsson).


#2892 has status resolved but Ctrl + Shift + [any modifier character] still doesn’t work in the CEF client with OSR mode on.

magreenblatt commented 3 years ago

Re-opening, since this may require a fix in cefclient.

magreenblatt commented 3 years ago

PR for Windows: https://bitbucket.org/chromiumembedded/cef/pull-requests/377

magreenblatt commented 3 years ago

Windows: cefclient: Map Shift+Ctrl+Alt to Shift+AltGr for OSR (see issue #3026)

→ <<cset 1ffa5528b3e3 (bb)>>

magreenblatt commented 2 years ago

Original comment by Ahcene Bouguezouli (Bitbucket: Ahcene Bouguezouli).


We have the same issue with German keyboard. Alt Gr +Q displays the char @ but Ctrl + Alt + Q is not working anymore.

magreenblatt commented 2 years ago

@ Ahcene Bouguezouli: What CEF version? Are you testing with cefclient that includes the 1ffa5528b3e3 fix? Does reverting that fix solve the issue for you?

magreenblatt commented 2 years ago

Original comment by Ahcene Bouguezouli (Bitbucket: Ahcene Bouguezouli).


@Marshall Greenblatt: We are using 91.1.160. But also the same problem in the latest stable version(92.0.260). We don’t use the  1ffa5528b3e3 fix.

Correction: Displaying the @ character with Ctrl+Alt+Q is not possible in a Chromium web browser hosted in a normal WPF window on a German keyboard. We do not use OSR mode. Perhaps it is another issue!

magreenblatt commented 2 years ago

@ Ahcene Bouguezouli: In that case you should try the fix.

magreenblatt commented 2 years ago

Original comment by Ahcene Bouguezouli (Bitbucket: Ahcene Bouguezouli).


@Marshall Greenblatt: As I understand, the fix is only for the OSR mode. But we have this problem in normal mode.

magreenblatt commented 2 years ago

@ Ahcene Bouguezouli: This issue is only for OSR mode. If you have an problem with normal (windowed) mode, and if that problem reproduces with supported versions, then please create a new issue.

magreenblatt commented 2 years ago

Original comment by Alex Maitland (Bitbucket: a-maitland).


@Ahcene Bouguezouli I suspect you are using CefSharp WPF implementation for which a fix will be included in version 93 see https://github.com/cefsharp/CefSharp/pull/3769

Cefclient should likely also be updated to check VK_MENU instead of VK_RMENU so the left alt press is also detected.

magreenblatt commented 2 years ago

Original comment by Ahcene Bouguezouli (Bitbucket: Ahcene Bouguezouli).


@{557058:5abcbcf9-b372-4ecb-830e-ddb451b76481} great, thanks

magreenblatt commented 3 years ago

Original changes by Per Bengtsson (Bitbucket: Per Bengtsson).


magreenblatt commented 3 years ago
magreenblatt commented 3 years ago
magreenblatt commented 3 years ago
magreenblatt commented 3 years ago