Problem statement : The virtual keyboard is required in linux environment which should be launched every time when user presses on editable UI components, like virtual keyboard in iPhone, iPad, Android, etc.
Solution overview : As basis for virtual keyboard was taken matchbox-keyboard which is an open-source application and provides rich functionality. The mechanism of auto-toggling was solved by modifying the source of QT and GTK to send Dbus signals on "on_press" signal (when user presses on editable UI comp.) to some daemon which turns virtual keyboard on.
Issue : "on_press" Dbus signal is sent when user presses or clicks on UI components i.e. during "on_click" event of QT and GTK. The virtual keyboard is hidden on "focus_out" event of QT and GTK. Keyboard is not switched on during "focus_in" event because some application while launching are emitting "focus_in" event for a moment then emitting "focus_out" event, so virtual keyboard was shows for a short time then hidden which was not accurate. this was solved by generating "on_press" Dbus signal during "on_click" GTK and QT events.
So now here I have another problem.
This happens because the second editable box emits "focus_in" event and not "on_click" event.
So please help to find a solution for the case when user switches between editable box with tab button. Or if you have totally other solution please suggest it.
Thanks in advance, Levon
I'm the author of Florence Virtual Keyboard: http://florence.sourceforge.net. I used at-spi (http://en.wikipedia.org/wiki/Assistive_Technology_Service_Provider_Interface) to solve the problem. The advantage of at-spi is that it works not only with GTK and Qt but also with java, Firefox and Libre/OpenOffice.
On supported platforms (Embedded Linux, WinCE) Qt emits a special QEvent
when software input panel should be shown;
QEvent::RequestSoftwareInputPanel
Description is;
A widget wants to open a software input panel (SIP).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With