Results 1 to 5 of 5

Thread: HID keyboard Unhandled key code 10036 !

  1. #1
    Join Date
    Jan 2019
    Posts
    21
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default HID keyboard Unhandled key code 10036 !

    Hello all,

    im developing android application to catch key strokes.
    As far as im using real keyboard, all works fine...

    However, if i use:
    Qt Code:
    1. Keys.onPressed: { JS.keyboardListener(event.key); }
    To copy to clipboard, switch view to plain text mode 

    them im having the error:
    W libInventory_armeabi-v7a.so: Unhandled key code 10036 !

    so, does the application use some virtual keyboard which cant handle its keys?
    is there a way to convert them into common ones so they will correcspond to real ascii keys?

    Basicaly, im just low in c++, therefore what I tried is to install nativeEventFilter, exactly this way (just main.cpp simple approach):
    Qt Code:
    1. #include <QAbstractEventDispatcher>
    2. #include <QAbstractNativeEventFilter>
    3.  
    4. class MyAppNativeEventFilter : public QAbstractNativeEventFilter
    5. {
    6. virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
    7. };
    8.  
    9. int main(int argc, char *argv[])
    10. {
    11. QGuiApplication app(argc, argv);
    12.  
    13. // Native Filter
    14. MyAppNativeEventFilter filter;
    15. app.installNativeEventFilter(&filter);
    16.  
    17. return app.exec();
    18. }
    To copy to clipboard, switch view to plain text mode 

    but it just gives me thre errors while compile:
    Qt Code:
    1. C:\Qt\Projects\Sources\Inventory\main.cpp:-1: error: error: undefined reference to 'vtable for MyAppNativeEventFilter'
    2. :-1: error: the vtable symbol may be undefined because the class is missing its key function
    3. :-1: error: linker command failed with exit code 1 (use -v to see invocation)
    To copy to clipboard, switch view to plain text mode 

    so I would very much kindly like to ask you if you can help me on this issue

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,728
    Thanks
    13
    Thanked 1,608 Times in 1,535 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: HID keyboard Unhandled key code 10036 !

    Quote Originally Posted by shokarta View Post
    but it just gives me thre errors while compile:
    Qt Code:
    1. C:\Qt\Projects\Sources\Inventory\main.cpp:-1: error: error: undefined reference to 'vtable for MyAppNativeEventFilter'
    2. :-1: error: the vtable symbol may be undefined because the class is missing its key function
    3. :-1: error: linker command failed with exit code 1 (use -v to see invocation)
    To copy to clipboard, switch view to plain text mode 
    Your code declares the existence MyAppNativeEventFilter and its nativeEventFilter() function but does not provide an implementation. The abstract class requires an implementation of the nativeEventFilter() function. A minimal implementation could just return false; something like:
    Qt Code:
    1. // Declare
    2. class MyAppNativeEventFilter : public QAbstractNativeEventFilter
    3. {
    4. virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override
    5. };
    6.  
    7. // Implement
    8. bool MyAppNativeEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result) override
    9. {
    10. return false;
    11. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2019
    Posts
    21
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: HID keyboard Unhandled key code 10036 !

    Qt Code:
    1. expected function body after function declarator
    To copy to clipboard, switch view to plain text mode 
    on line:
    Qt Code:
    1. bool MyAppNativeEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result) override
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,937
    Thanks
    276
    Thanked 803 Times in 792 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: HID keyboard Unhandled key code 10036 !

    ChrisW67 forget to add a semicolon after the function declaration. Don't just blindly copy code and paste it into your application. Think about the answer before you use it.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,728
    Thanks
    13
    Thanked 1,608 Times in 1,535 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: HID keyboard Unhandled key code 10036 !

    Quote Originally Posted by d_stranz View Post
    ChrisW67 forget to add a semicolon after the function declaration. Don't just blindly copy code and paste it into your application.
    Indeed, I originally inlined the implementation and then copy-n-pasted myself into the missing semicolon

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Unhandled Exception from DLL QT 4.6.0
    By qlarity_three in forum Newbie
    Replies: 2
    Last Post: 5th February 2010, 19:11
  3. Unhandled Exception
    By dougbroadwell in forum Qt Programming
    Replies: 2
    Last Post: 20th March 2009, 22:32
  4. Unhandled Exception in QTableView->setModel(QSqlTableModel)
    By dougbroadwell in forum Qt Programming
    Replies: 0
    Last Post: 19th March 2009, 19:35
  5. Unhandled Exception Err
    By Masih in forum Newbie
    Replies: 9
    Last Post: 25th July 2007, 20:28

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.