How to handle "Unhandled key code"
-
Hello,
I'm developing software for PDA running Android. PDA has a few keys that I would like to handle in QML. While pressing the key I'm getting error in console: "Unhandled key code 294".
How can I handle unknown keys?
I do have eventFilter, but the message still shows up.
-
@Oleg-R
my guess is that this message comes from a 3rd party code/element you are using in your code? -
@raven-worx said in How to handle "Unhandled key code":
@Oleg-R
my guess is that this message comes from a 3rd party code/element you are using in your code?It might be from the android QPA plugin.
https://code.woboq.org/qt5/qtbase/src/plugins/platforms/android/androidjniinput.cpp.html#763In namespace QtAndroidInput,
static int mapAndroidKey(int key) { ... switch (key) { ... case 0x000000de: // KEYCODE_MEDIA_AUDIO_TRACK return Qt::Key_AudioCycleTrack; default: qWarning() << "Unhandled key code " << key << '!'; return 0;
Receiving the key press may require using a native event filter.
https://doc.qt.io/qt-5/qabstracteventdispatcher.html#filterNativeEvent