Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Custom keyboard driver on embedded linux

Custom keyboard driver on embedded linux

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fernando.lopes
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agocs
      wrote on last edited by
      #2

      Try setting QT_DEBUG_PLUGINS to 1 before launching the application. It will print some information about the plugins Qt finds and loads.

      Just to verify: you are returning "mydriver" from keys() in the plugin, right?

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fernando.lopes
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fernando.lopes
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved