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:
Code:
Keys.onPressed: { JS.keyboardListener(event.key); }
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):
Code:
#include <QAbstractEventDispatcher>
#include <QAbstractNativeEventFilter>
class MyAppNativeEventFilter : public QAbstractNativeEventFilter
{
virtual bool nativeEventFilter
(const QByteArray &eventType,
void *message,
long *result
) override;
};
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
// Native Filter
MyAppNativeEventFilter filter;
app.installNativeEventFilter(&filter);
return app.exec();
}
but it just gives me thre errors while compile:
Code:
C:\Qt\Projects\Sources\Inventory\main.cpp:-1: error: error: undefined reference to 'vtable for MyAppNativeEventFilter'
:-1: error: the vtable symbol may be undefined because the class is missing its key function
:-1: error: linker command failed with exit code 1 (use -v to see invocation)
so I would very much kindly like to ask you if you can help me on this issue
Re: HID keyboard Unhandled key code 10036 !
Quote:
Originally Posted by
shokarta
but it just gives me thre errors while compile:
Code:
C:\Qt\Projects\Sources\Inventory\main.cpp:-1: error: error: undefined reference to 'vtable for MyAppNativeEventFilter'
:-1: error: the vtable symbol may be undefined because the class is missing its key function
:-1: error: linker command failed with exit code 1 (use -v to see invocation)
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:
Code:
// Declare
class MyAppNativeEventFilter : public QAbstractNativeEventFilter
{
virtual bool nativeEventFilter
(const QByteArray &eventType,
void *message,
long *result
) override
};
// Implement
bool MyAppNativeEventFilter
::nativeEventFilter(const QByteArray &eventType,
void *message,
long *result
) override
{
return false;
}
Re: HID keyboard Unhandled key code 10036 !
Code:
expected function body after function declarator
on line:
Code:
bool MyAppNativeEventFilter
::nativeEventFilter(const QByteArray &eventType,
void *message,
long *result
) override
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.
Re: HID keyboard Unhandled key code 10036 !
Quote:
Originally Posted by
d_stranz
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 ;)