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.