Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt Contribution
  4. New contribution or keep custom builds ?
Forum Updated to NodeBB v4.3 + New Features

New contribution or keep custom builds ?

Scheduled Pinned Locked Moved Unsolved Qt Contribution
3 Posts 2 Posters 79 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    TQHien
    wrote last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi and welcome to devnet,

      What kind of changes are they ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TQHien
        wrote last edited by TQHien
        #3

        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).

        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