Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

SimpleOSRBrowser doesn't support UP/DOWN Key

Post Reply
tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

SimpleOSRBrowser doesn't support UP/DOWN Key

Post by tad.chen »

When I use SimpleOSRBrowser to visit www.google.com, I can't use UP/DOWN key in keyboard to select item in the dropdown list. Please see the attached picture. But cefclient in OSR mode can support this well.
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: SimpleOSRBrowser doesn't support UP/DOWN Key

Post by salvadordf »

Thanks for reporting the issue!

Right now I'm busy but I'll take a look as soon as I can.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: SimpleOSRBrowser doesn't support UP/DOWN Key

Post by salvadordf »

The latest CEF4Delphi version has the fix for that issue with the arrow keys. You can download it from GitHub :
https://github.com/salvadordf/CEF4Delphi

If you prefer to use an old version then you only have to modify this line :
https://github.com/salvadordf/CEF4Delph ... r.pas#L260

The TForm1.AppEventsMessage procedure set handled to true for the WM_KEYDOWN message only when the user pressed the TAB key :

Code: Select all

Handled := (Msg.wParam = VK_TAB);
Now it sets handled to true when the user presses the arrow keys too :

Code: Select all

Handled := (Msg.wParam in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]);
This is needed because the form sets the focus to a different control when you press the arrow keys.
tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

Re: SimpleOSRBrowser doesn't support UP/DOWN Key

Post by tad.chen »

It works now, thank you very much!
Post Reply