The OSR demos use a TBufferPanel to draw the browser contents, which is a TCustomPanel subclass with a background TBitmap.
TBufferPanel gets the focus but it's not a TEdit. The OSR demos use the TChromium.OnPaint event to draw on the background bitmap from TBufferPanel but all keyboard and mouse events have to be notified to TChromium because TBufferPanel is just a "canvas".
Perhaps I'm missing some touch-screen event that should be notified to TChromium. Please, use all possible touch-screen events in Panel1 (TBufferPanel) with this demo and let me know what events are triggered when you touch the screen over the Panel1 component.
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.
Find text fields
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Find text fields
By the way, I simplified the KioskOSRBrowser demo and it's available at GitHub.
It also includes a bug fix in the INPUT element detection function.
It also includes a bug fix in the INPUT element detection function.
Re: Find text fields
Thanks Salvador!
I am very close to the result already
I will grab the new demo and use as start.
With best regards

I am very close to the result already

I will grab the new demo and use as start.
With best regards
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Find text fields
I found this android app to use the phone screen as a second PC monitor :
https://new.spacedesk.ph/
https://play.google.com/store/apps/deta ... edesk.beta
That app allows you to use the touchscreen in your phone too.
I installed it in my Android phone and the driver in Windows 10. I tested the KioskOSRBrowser demo and the virtual keyboard works correctly when I use my finger to touch different HTML elements in the browser.
The keyboard is shown instantly when I touch the search box in google.com and it's also hidden when I touch outside the search box. I tried to make some searches using the virtual keyboard with my finger and it worked too.
Please, test the KioskOSRBrowser demo without modifications in your computer.
https://new.spacedesk.ph/
https://play.google.com/store/apps/deta ... edesk.beta
That app allows you to use the touchscreen in your phone too.

I installed it in my Android phone and the driver in Windows 10. I tested the KioskOSRBrowser demo and the virtual keyboard works correctly when I use my finger to touch different HTML elements in the browser.
The keyboard is shown instantly when I touch the search box in google.com and it's also hidden when I touch outside the search box. I tried to make some searches using the virtual keyboard with my finger and it worked too.
Please, test the KioskOSRBrowser demo without modifications in your computer.
Re: Find text fields
Hi Salvador,
my problem is,
i cannot use the Delphi onscreen keyboard because it is bad and it does not serve my needs
I am sure i am not alone with this because Delphi onscreen keyboard is simply awful.
I therefore need to use my own keyboard which is currently an executable.
When i try to implement my own keyboard as following,
my problem is,
i cannot use the Delphi onscreen keyboard because it is bad and it does not serve my needs

I am sure i am not alone with this because Delphi onscreen keyboard is simply awful.
I therefore need to use my own keyboard which is currently an executable.
When i try to implement my own keyboard as following,
Code: Select all
{ - <<< - [ browser before contextmenu events... ] - >>> - }
procedure TfrmMain.chromiumMainBeforeContextMenu(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
begin
{ remove the bloody right-click pop-up menu }
model.Clear;
model.AddSeparator;
if processExists('OnScreenKeyboard.exe') then
model.AddItem(KIOSKBROWSER_CONTEXTMENU_HIDEKEYBOARD,
'Hide virtual keyboard')
else
model.AddItem(KIOSKBROWSER_CONTEXTMENU_SHOWKEYBOARD,
'Show virtual keyboard');
model.AddSeparator;
model.AddItem(KIOSKBROWSER_CONTEXTMENU_EXIT, 'Exit');
end;/code]
In your demo it is "TouchKeyboard1"
[code]{ - <<< - [ showing on-screen keyboard... ] - >>> - }
procedure TfrmMain.ShowKeyboardMsg(var aMessage: TMessage);
begin
ShowOnScreenKeyboard;
end;/code]
[code]{ - <<< - [ hiding on-screen keyboard... ] - >>> - }
procedure TfrmMain.HideKeyboardMsg(var aMessage: TMessage);
begin
CloseOnScreenKeyboard;
end;/code]
It opens the keyboard but never closes :(
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Find text fields
I understand. I only wanted to test the code that detects when to show or hide the keyboard.Hitman wrote: Wed Aug 22, 2018 1:14 pm Hi Salvador,
my problem is,
i cannot use the Delphi onscreen keyboard because it is bad and it does not serve my needs![]()
I am sure i am not alone with this because Delphi onscreen keyboard is simply awful.
I therefore need to use my own keyboard which is currently an executable.
If the demo works with TTouchKeyboard, then the problem must be in OnScreenKeyboard.exe or the code that
executes and terminates OnScreenKeyboard.exe.
Please, set breakpoints in these lines :Hitman wrote: Wed Aug 22, 2018 1:14 pm When i try to implement my own keyboard as following,Code: Select all
{ - <<< - [ browser before contextmenu events... ] - >>> - } procedure TfrmMain.chromiumMainBeforeContextMenu(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); begin { remove the bloody right-click pop-up menu } model.Clear; model.AddSeparator; if processExists('OnScreenKeyboard.exe') then model.AddItem(KIOSKBROWSER_CONTEXTMENU_HIDEKEYBOARD, 'Hide virtual keyboard') else model.AddItem(KIOSKBROWSER_CONTEXTMENU_SHOWKEYBOARD, 'Show virtual keyboard'); model.AddSeparator; model.AddItem(KIOSKBROWSER_CONTEXTMENU_EXIT, 'Exit'); end;
In your demo it is "TouchKeyboard1"Code: Select all
{ - <<< - [ showing on-screen keyboard... ] - >>> - } procedure TfrmMain.ShowKeyboardMsg(var aMessage: TMessage); begin ShowOnScreenKeyboard; end;
It opens the keyboard but never closesCode: Select all
{ - <<< - [ hiding on-screen keyboard... ] - >>> - } procedure TfrmMain.HideKeyboardMsg(var aMessage: TMessage); begin CloseOnScreenKeyboard; end;
![]()
- if processExists('OnScreenKeyboard.exe') then
- CloseOnScreenKeyboard;