Description:

A virtual keyboard for touch-screen application

Virtual Keyboard for touch-screen devices written in C/C++ Qt, compatible for Qt 4.x and 5.x The widget works with QLineEdit, but you can modify it for your convenience.

Features:

-- Floating or embedded in QWidget feature
-- Numeric Keyboard
-- click sound buttons
-- copy/cut and paste facility
-- echo password facility
-- dynamic keyboard layout based on selected language
-- move around textbox using TAB or directly click on a textbox (require subclassing as in the provided example)
-- Dual mode keyboard: large and small
-- zoom facility for pressed keys

Supported Languages:

Arabic
English
French
German
Italian
Russian

We appreciate any donation since this will be used to improve or better support this project.

Have a nice day
Last changelog:

Added missing files 1 month ago

Added new form files missed out in the last commit.

C

AlterX

5 years ago

My suggestions using win api, therefore it works for all native windows other then qt system (that is based on win api)

Report

vidya2027

5 months ago

hi edup,
I am facing the same problem as yours, virtual keyboard to write any active window. so did you get the solution if yes then please share the snippet. thanks in advance.

Report

edup

5 years ago

Hi AlterX,

Thanks for your comment.

Even i don't know how to do this in QT:

I know we can do a process monitoring so we can access to all processes for sure.

And i know that we can use a virtual keyboard to our OS that writes to the focus windows, independent if was launched by us or not (in windows you have a virtual keyboard).

What i want to do is something like this:

You have a computer A that opens a socket to computer B.

You have a computer C that opens a socket to computer B.

The computer A and C asks B for all of its opened windows or to run a proccess so:

The computer A and C asks computer B to run a process like notepad (or calcultator).

Then the user in computer A choose the process where he wants to write to. So, computer A sends a message to computer B saying that wants to write on notepad.
Computer C sends a message to computer B saying that wants to write on calculator.

After that i want to have simultaneous writing on notepad (user A) and calculator (user B).

I want to add more than 2 users after this test.

Thanks a lot for your help.



Report

C

AlterX

5 years ago

Hi, too complex and low portability!
What you can do for sure on Windows:
1 - Create a service monitoring click messages on textbox/windows; so you can open a stand-alone keyboard
2 - The stand-alone keyboard, using Win API, can manipolate textboxes and style.

I'm very busy at this moment and I cannot do that; use those above:
1- GetForegroundWindow() and similar to get current focused app
2- Scan for children of app to find textbox; use GetWindow() with flags (CHILD, NEXTCHILD) and GetClassName() to find textbox instances
3- Put char in the textbox: use SendMessage() with handle of current textbox and code of key pressed in Qt keyboard
4- Change aspect using other API and handle of textbox

I hope that is a good starter for you.

Report

edup

5 years ago

Im trying to implement this virtual keyboard to work with any other window/process of the system. Can you please help?

- How to get all running windows or processes?
- How to say to this virtual keyboard to write to the chosen process/window?

Thanks a lot.

Best Regards,

Report

C

AlterX

5 years ago

Hi,
I think the way to write in processes is not good and is a little complicated due to protection of process (what you want to do is called injection and of course it could be a weak of an OS). Please show me your idea about that above.

Report

vinithr

5 years ago

Hi,

I have downloaded the application and tried to build using qmake and make its throwing following errors

/KeyBoard/widgetKeyboard2011$ qmake
/KeyBoard/widgetKeyboard2011$ make
g++ -Wl,-O1 -o widgetKeyboard2011 examplemyfocus.o main.o tester.o QKeyPushButton.o widgetKeyBoard.o moc_mainwindow.o moc_tester.o moc_QKeyPushButton.o moc_widgetKeyBoard.o qrc_virtualboard.o -L/usr/lib -lQtGui -lQtCore -lpthread
/usr/bin/ld: moc_mainwindow.o: in function vtable for MainWindow:moc_mainwindow.cpp(.rodata._ZTV10MainWindow+0x14): error: undefined reference to 'MainWindow::~MainWindow()'
/usr/bin/ld: moc_mainwindow.o: in function vtable for MainWindow:moc_mainwindow.cpp(.rodata._ZTV10MainWindow+0x18): error: undefined reference to 'MainWindow::~MainWindow()'
/usr/bin/ld: moc_mainwindow.o: in function vtable for MainWindow:moc_mainwindow.cpp(.rodata._ZTV10MainWindow+0xb4): error: undefined reference to 'MainWindow::changeEvent(QEvent*)'
/usr/bin/ld: moc_mainwindow.o: in function vtable for MainWindow:moc_mainwindow.cpp(.rodata._ZTV10MainWindow+0xec): error: undefined reference to 'non-virtual thunk to MainWindow::~MainWindow()'
/usr/bin/ld: moc_mainwindow.o: in function vtable for MainWindow:moc_mainwindow.cpp(.rodata._ZTV10MainWindow+0xf0): error: undefined reference to 'non-virtual thunk to MainWindow::~MainWindow()'
collect2: ld returned 1 exit status
make: *** [widgetKeyboard2011] Error 1


It seems to be the MainWindow.cpp file does not exist in the downloaded package.

Could you please help me out to sort out this??

Thanks in Advance

Regards
Vinithr

Report

C

AlterX

5 years ago

Hi, first of all try to use QtCreator, before that, delete .user file and then in QtCreator click on "clean all" and then on "run qmake", and then recompile.

Report

vinithr

5 years ago

I used the QT creator and followed the steps that you have given., still the same error

Report

C

AlterX

5 years ago

I've downloaded the source, unpacked and successfully compiled with QtCreator 2.5 (64bit). I don't have any suggestion sorry!

Report

vinithr

5 years ago

Thanks for your time...
i am using qtcreator 4.7.1. Is this application is compactable with Qt 4.7.1.?

Report

C

AlterX

5 years ago

I think you meant QtCreator 2.4 with Qt runtime 4.7.x
Yes, I've used QtCreator 2.5 with Qt runtime 4.7.4

Report

vinithr

5 years ago

Yes.The application that i am creating is building properly.Only this application having problem.

Could you please share me the code that you have compiled.so that i can use that code and check whether it is getting compiled or not.??

Regards
Vinithr

Report

C

AlterX

5 years ago

The code is the same as above...I've just downloaded that ;)

Report

ashaihullin

5 years ago

I'm just wonder, why didn't you use "QApplication::postEvent"s for keys?

Report

Myzhar

5 years ago

To avoid user issues remember to not add "projectname.user.pro" file in the archive :)

Report

Myzhar

5 years ago

However, I tried it on my "Asus EeePC T101MT" that can be used as a touchscreen tablet and I think it is very good, very reactive.

Linux does not have good free virtual keyboards and your seems very promising.

It would we great if you could use it as virtual keyboard standalone to be used with each active application that has focus.

Report

C

AlterX

5 years ago

Hi...
thank you for your comment!
It's very difficult to port in general way on an entire linux system...

Report

mariuszekpl

6 years ago

Could I write "national characters" ?
by VirtualKeyboard ?

I try but i can't.

For exaple Polish extra chars
ĄĆĘŃÓŁŹĆ
ąćęńółźć




Report

C

AlterX

6 years ago

Sorry i didn't catch what are you doing...can you explain with more details?

Thank you

Report

huguley

7 years ago

I got the same error as above. I removed in the inline from the function:
bool widgetKeyBoard::isEmbeddedKeyboard(void)
{
return (this->m_embeddedKeyboard);
}

and it compiles and works. I found a patch for it online so this one may just be out of date.

Report

swiftscythe

7 years ago

I've just downloaded your app and can't build it.
It's strange, because when I uncompress the file only a widgetVirtualKey folder appears, and its content is just Tester.
I run qmake and make in Tester and I get:

QKeyPushButton.o: In function `QKeyPushButton::QKeyPushButton(QWidget*)':
QKeyPushButton.cpp:(.text+0x12b): undefined reference to `widgetKeyBoard::isEmbeddedKeyboard()'
QKeyPushButton.o: In function `QKeyPushButton::mousePressEvent(QMouseEvent*)':
QKeyPushButton.cpp:(.text+0x10c2): undefined reference to `widgetKeyBoard::isEmbeddedKeyboard()'
QKeyPushButton.o: In function `QKeyPushButton::mouseReleaseEvent(QMouseEvent*)':
QKeyPushButton.cpp:(.text+0x19ac): undefined reference to `widgetKeyBoard::isEmbeddedKeyboard()'
collect2: ld returned 1 exit status
make: *** [Tester] Error 1
==> ERROR: Build Failed.

Thanks in advance!

Report

C

AlterX

7 years ago

It seems an IDE problem since virtualKeyboard was created with QT Creator 1.2

I've created a new project from scratch and now it should work with QT SDK By Nokia (Qt creator 1.3.1) and Nokia QT SDK
for mobile.

Report

swiftscythe

7 years ago

Yes now it builds, thanks :)

Report

sanjay1758

6 years ago

hi, i'm new to Qt ..how to integrate this keyboard with QT Demo Browser.

like when i press mouse on the address bar , the keyboard should open ...


please help me in solving this....

Report

Added missing files 1 month ago

Added new form files missed out in the last commit.

Numeric Keyboard feature 2 months ago

Added feature to create a numeric keyboard (check that out in the screenshot)

Improved keyboard behaviour 3 months ago

It is now possible to create several instance in the same application (previous version only one instance allowed)
Keyboard can now be created as floating widget or embedded in a QWidget
A new parameter in the show() allows to specify the QLineEdit to start with when the keyboard shows up
Extended example to show above features

8 years ago

A new resynch of code was required since during the transfer of the code to github something went wrong resulting in a strange language localization.
Now the code is up-to-date and it seems to work well.
Please let me know if you have any problem

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
2017.08
updated Aug 23 2017
added Jun 23 2009
downloads today
2
page views today 26