WM_SYSKEYUP missing from ALT key

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.

WM_SYSKEYUP missing from ALT key

Postby jdekeij » Thu Jun 25, 2020 7:25 am

Analysis:
When pressing the ALT key and releasing the ALT key the WM_SYSKEYDOWN and the WM_SYSKEYUP are send through to the GUI driver by posting it to the widget layer. The message ends with this in the GUI driver layer which has the form component and the menu’s. With the ALT key down the menu shows its underlined shortcut. For instance “File” gets an underline under the ‘F’. After the ALT key up, the menu item get a colored background. This last makes it possible to use arrow down to open the pulldown menu.
Pressing ALT+F opens directly the menu.

The single ALT key down and ALT key up is not working with the latest CEF. In the next paragraph I will try to explain why this is not working.

With the old CEF version 3.x, the keyboard handler gave us all keystrokes. For instance when we press the Alt key and release it, both the WM_SYSKEYDOWN and the WM_SYSKEYUP are passed through to our keyboard handler. To get called by CEF for keystrokes we need to inherit from CefKeyboardHandler and this is in both the new and old version the same. The call back method we use is the OnPreKeyEvent. OnPreKeyEvent is called before a keyboard event is sent to the renderer. When we look in the debug trace of the old CEF we see the following when pressing and releasing the ALT key.

9; 6H; WM_SYSKEYDOWN shortcut:true keystroke: ; 0A277E08; CefKeyboardHandler::OnPreKeyEvent.
9; 7H; WM_SYSKEYUP shortcut:true keystroke: ; 0A277E08; CefKeyboardHandler::OnPreKeyEvent.

When doing the same in the new CEF latest version we get only the first line:
9; 7H; WM_SYSKEYDOWN keystroke: ; 0E3C68B0; CefKeyboardHandler::OnPreKeyEvent.

If we do the same for the Ctrl and Shift keys we see no difference between the old and new cef. It seems only a problem for the alt key and its WM_SYSKEY* message. The Ctrl and Shift keys only generate a WM_KEYDOWN and a WM_KEYUP.

Hopefully this can be fixed since this holds up the new release of our product.

Jasper de Keijzer
Lead GUI developer UNIFACE.
jdekeij
Newbie
 
Posts: 3
Joined: Mon Jun 22, 2020 8:21 am

Re: WM_SYSKEYUP missing from ALT key

Postby magreenblatt » Thu Jun 25, 2020 10:06 am

What old and new CEF versions are you using? Does the problem reproduce in the CEF sample applications?

This code hasn't changed any time recently in CEF, so you're probably looking at a bug in Chromium or Blink. I suggest you build CEF/Chromium locally and try to debug the issue.
magreenblatt
Site Admin
 
Posts: 10310
Joined: Fri May 29, 2009 6:57 pm

Re: WM_SYSKEYUP missing from ALT key

Postby jdekeij » Thu Jun 25, 2020 10:37 am

We used the version 3.2623.1397. In this version we could return true in the keyboard handler for the WM_SYSKEYDOWN and we got the WM_SYSKEYUP on the ALT key up.

In the v81.0.4044.138 version, if we return true on the WM_SYSKEYDOWN we will not get the WM_SYSKEYUP. This is a difference which makes the menu not work in uniface.
When returning false on the WM_SYSKEYDOWN we get the WM_SYSKEYUP as well but then we see that the cef-renderer is taking the focus of our menu and the underscore in the, for instance file menu 'f' is removed on the keyup. So we cannot arrow down to open the menu after this.

Our customers use <ALT>down - <ALT>-up - <ARROWDOWN>down - <ARROWDOWN>up to open a menu. And this worked in the older version of CEF.

Hope this clarifies the problem.

I will try to create a local build of chrome. See whether I can find this on the internet on how to do this.

Jasper de Keijzer
jdekeij
Newbie
 
Posts: 3
Joined: Mon Jun 22, 2020 8:21 am

Re: WM_SYSKEYUP missing from ALT key

Postby magreenblatt » Thu Jun 25, 2020 1:17 pm

magreenblatt
Site Admin
 
Posts: 10310
Joined: Fri May 29, 2009 6:57 pm

Re: WM_SYSKEYUP missing from ALT key

Postby jdekeij » Fri Jul 03, 2020 8:49 am

FYI
Further research and debugging the Chromium sources showed that this problem of the WM_SYSKEYUP is caused by a coding error in Chromium.

I raised a bug and hope it will be fixed soon.

I share the link for your information:
https://bugs.chromium.org/p/chromium/is ... id=1100813

Kind regards
Jasper de Keijzer
Lead GUI developer Uniface b.v.
jdekeij
Newbie
 
Posts: 3
Joined: Mon Jun 22, 2020 8:21 am

Re: WM_SYSKEYUP missing from ALT key

Postby magreenblatt » Fri Jul 03, 2020 10:52 am

Thanks for raising the Chromium issue and posting the link.
magreenblatt
Site Admin
 
Posts: 10310
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

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