New contribution or keep custom builds ?
-
Hello,
For a project of mine which uses Android tablets for outdoor motorbike activities, I uses physical buttons on those devices (Crosscall Core-T4 and Cleyver XTremtab8). Each has 2 physical buttons, with keycodes that are not supported by Qt (5 and 6).
Keycodes are usable if I use Android Studio, and I can use them if I build my own Qt for Android from source, after patching androidjniinput.c and qnamespace.h to map them.
My question is : should I submit a patch to Qt via Gerrit or should I keep building from source with my own branch, as that only concern only 2 devices ?
-
Hi and welcome to devnet,
What kind of changes are they ?
-
In qnamespace.h, I add some key_code mappings :
For example :
enum Key { [...] KEY_CLEYVER_F1 = 0x01002122, // unused Qt keycode map for Cleyver XTremTab8 F1 Key KEY_CLEYVER_F2 = 0x01002121, // unused Qt keycode map for Cleyver XTremTab8 F2 Key [...] }
And in androidjniinput, I add switches in
static QKeyCombination mapAndroidKey(int key) { [...] switch (key) { case 0x00000122: // XTREMTAB f1 return Qt::KEY_CLEYVER_F1 ; [...] }
I have four android keycodes : 0x121, 0x122 (for Cleyver) , 0x1a0 and 0x1a1 (for Crosscall).