Custom keyboard driver on embedded linux
-
Hello great Qt masters!
This is my first post. I searched trough the forum and I did not find any post similar to what I am looking for.
I'll try to be as specific as possible. If there is something missing on my question, please let me know so I can improve it.I'm trying to make a custom keyboard driver/plugin to use on a linux based system.
Our keyboard is similar to a phone keypad and so it needs a custom driver to work properly, since the linux input subsystem has no support to this kind of keyboard.To try my driver I tried to define and export the variable QWS_KEYBOARD=mydriver:/dev/input/eventX and installed my driver in the "[qt installation path]/plugins/kbddrivers/libqmydriverkbddriver.so" and on the "[application root]/kbddrivers/libqmydriverkbddriver.so" but neither seem to be loaded on application start (I used strace to check which files were being opened).
How can I load a custom keyboard plugin to a Qt application on linux embedded?
Do I need to select some option on configure to make this possible?edit: I am using embedded Qt 4.8.5!
-
Yes, I changed the return value from keys to match my driver's plugin name.
In fact I modified plugins/kbddrivers/linuxinput/main.cpp+qkbdlinuxinput_qws.h/cpp to make a class that correctly inherits QKbdDriverPlugin and other that inherits QWSKeyboardHandler to be returned on the creator function in QMyDriverKbdDriver.I tried to 'export QT_DEBUG_PLUGINS=1' and I only got:
@
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qtopia/plugins/imageformats/libqjpeg.so"
keys ("jpeg", "jpg")
@Any tips?
-
I finally found a way to make my application load the keyboard driver.
I was trying to load the keyboard driver plugin using qmlviewer to show my applycation on screen.
If I create a cpp application and use it (and qmlapplicationviewer) to load my QML it loads the driver correctly and my keyboard works!
Apparently qmlviewer does not handle keyboard driver correctly.
Thank you for your support.