AnsweredAssumed Answered

gpio_key and QT5.6 KO

Question asked by Xavier RAZAVET on Sep 25, 2017
Latest reply on Sep 26, 2017 by Xavier RAZAVET

Hello,

I have a problem with gpio_key and Qt5.6, no problem with Qt4.8.

My configuration is buildroot2016.05 with kernel 3.10.17 and Qt5.6 for now + imx6dl

 

In device tree, the gpio is set to recover the key you want in Qt application. For exemple, Key_Up (103d or 0x67) as below:

   gpio_keys {
        compatible = "gpio-keys";
        #address-cells = <1>;
        #size-cells = <0>;

 

        Key_Up {
                label = "Key_Up";
                linux,code = <103>;
                gpios = <&gpio4 12 4>;  /* 4 = active high level-sensitive */
        };

...

 

In Qt4.8 configuration, there is the package BR2_PACKAGE_QT_KEYBOARD_TTY=y which is included.

But this package does not exist anymore under Qt5.6. I suppose it is ok under Qt4.8 due to this package.

 

remark: with the command "hexdump -C /dev/input/event1", i can see the IO ON/OFF on the KEY_Up (103d or 0x67) as below:

00000000  3f 2b 00 00 6f e2 09 00  01 00 67 00 00 00 00 00  |?+..o.....g.....|
00000010  3f 2b 00 00 6f e2 09 00  00 00 00 00 00 00 00 00  |?+..o...........|

00000020  40 2b 00 00 f5 56 01 00  01 00 67 00 01 00 00 00  |@+...V....g.....|
00000030  40 2b 00 00 f5 56 01 00  00 00 00 00 00 00 00 00  |@+...V..........|

 

This command shows the kernel is OK.

 

Someone has an idea.

 

Thanks in advance for your help.

Best Regards.

Outcomes