Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141122

Can physical button keycodes be added to Qt or should I keep building my own Qt from source

XMLWordPrintable

    • Android
    • 2025wk44s3QtforAndroid

      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/feature request or should I keep building from source with my own branch, as that only concern only 2 devices ?

      I have four android keycodes : 0x121, 0x122 (for Cleyver) , 0x1a0 and 0x1a1 (for Crosscall).

       

      I locally patch as following :

      • qnamespace.h
        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
        [...]
        } 
      • androidjniinput.c as
        static QKeyCombination mapAndroidKey(int key)
            {
        [...]
                  switch (key) {
                  case 0x00000122: // XTREMTAB f1
                             return Qt::KEY_CLEYVER_F1 ;
        [...]
        } 

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtandroidteam Qt Android Team
            tqhien Hien TRAN QUANG
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes