Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Unable to detect touch key in qt
Forum Update on Monday, May 27th 2025

Unable to detect touch key in qt

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 827 Views
  • 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.
  • J Offline
    J Offline
    jigarp
    wrote on last edited by jigarp
    #1

    Hello i'm using beagleboard x-15 with goodix touchscreen where touchscreen has a button which is mapped in linux as KEY_LEFTMETA .
    My application uses qt virtual keyboad with EGLFS Qt 5.9.6.
    I'm able to detect key and touchevents using evtest .
    I'm able to use touchscreen in qt environment but not able to detect key [KEY_LEFTMETA].
    Here is my evtest output

    root@am57xx-evm:~# evtest                                                                          
    No device specified, trying to scan all of /dev/input/event*                                       
    Available devices:                                                                                 
    /dev/input/event0:      Goodix Capacitive TouchScreen                                              
    Select the device event number [0-0]: 0                                                            
    Input driver version is 1.0.1                                                                      
    Input device ID: bus 0x18 vendor 0x416 product 0x3a0 version 0x1060                                
    Input device name: "Goodix Capacitive TouchScreen"                                                 
    Supported events:                                                                                  
      Event type 0 (EV_SYN)                                                                            
      Event type 1 (EV_KEY)                                                                            
        Event code 125 (KEY_LEFTMETA)                                                                  
        Event code 330 (BTN_TOUCH)                                                                     
      Event type 3 (EV_ABS)                                                                            
        Event code 0 (ABS_X)                                                                           
          Value    621                                                                                 
          Min        0                                                                                 
          Max     1280                                                                                 
        Event code 1 (ABS_Y)                                                                           
          Value    690                                                                                 
          Min        0                                                                                 
          Max      800                                                                                 
        Event code 47 (ABS_MT_SLOT)                                                                    
          Value      0                                                                                 
          Min        0                                                                                 
          Max        9                                                                                 
        Event code 48 (ABS_MT_TOUCH_MAJOR)                                                             
          Value      0                                                                                 
          Min        0                                                                                 
          Max      255                                                                                 
        Event code 50 (ABS_MT_WIDTH_MAJOR)                                                             
          Value      0                                                                                 
          Min        0                                                                                 
          Max      255                                                                                 
        Event code 53 (ABS_MT_POSITION_X)                                                              
          Value      0                                                                                 
          Min        0                                                                                 
          Max     1280                                                                                 
        Event code 54 (ABS_MT_POSITION_Y)                                                              
          Value      0                                                                                 
          Min        0                                                                                 
          Max      800                                                                                 
        Event code 57 (ABS_MT_TRACKING_ID)                                                             
          Value      0                                                                                 
          Min        0                                                                                 
          Max    65535                                                                                 
    Properties:                                                                                        
      Property type 1 (INPUT_PROP_DIRECT)                                                              
    Testing ... (interrupt to exit)                                                                    
    Event: time 1568630308.729659, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1                   
    Event: time 1568630308.729659, -------------- SYN_REPORT ------------                              
    Event: time 1568630308.959110, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 0                   
    Event: time 1568630308.959110, -------------- SYN_REPORT ------------                              
    Event: time 1568630417.185487, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 6              
    Event: time 1568630417.185487, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 170             
    Event: time 1568630417.185487, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 679             
    Event: time 1568630417.185487, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 25             
    Event: time 1568630417.185487, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 25             
    Event: time 1568630417.185487, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1                      
    Event: time 1568630417.185487, type 3 (EV_ABS), code 0 (ABS_X), value 170                          
    Event: time 1568630417.185487, type 3 (EV_ABS), code 1 (ABS_Y), value 679                          
    Event: time 1568630417.185487, -------------- SYN_REPORT ------------                              
    Event: time 1568630417.260888, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1             
    Event: time 1568630417.260888, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0                      
    

    I've enabled qt.qpa.*=true in filter rules here is its output.

    qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_emu", "eglfs_kms")
    qt.qpa.egldeviceintegration: Using base device integration
    qt.qpa.input: evdevkeyboard: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Keyboard)
    qt.qpa.input: Found matching devices ("/dev/input/event0")
    qt.qpa.input: Adding keyboard at "/dev/input/event0"
    qt.qpa.input: Try to create keyboard handler for "/dev/input/event0" ""
    qt.qpa.input: Opening keyboard at "/dev/input/event0"
    qt.qpa.input: Create keyboard handler with for device "/dev/input/event0"
    qt.qpa.input: Unload current keymap and restore built-in
    qt.qpa.input: numlock=0 , capslock=0, scrolllock=0
    qt.qpa.input: evdevmouse: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Mouse|Device_Touchpad)
    qt.qpa.input: Found matching devices ()
    qt.qpa.input: evdevtouch: Using device discovery
    qt.qpa.input: udev device discovery for type QFlags<QDeviceDiscovery::QDeviceType>(Device_Touchpad|Device_Touchscreen)
    qt.qpa.input: Found matching devices ("/dev/input/event0")
    qt.qpa.input: evdevtouch: Adding device at "/dev/input/event0"
    qt.qpa.input: evdevtouch: Using device /dev/input/event0
    qt.qpa.input: evdevtouch: /dev/input/event0: Protocol type B  (multi), filtered=no
    qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 1280
    qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 800
    qt.qpa.input: evdevtouch: /dev/input/event0: min pressure: 0 max pressure: 0
    qt.qpa.input: evdevtouch: /dev/input/event0: device name: Goodix Capacitive TouchScreen
    
    qt.qpa.input.keymap: Processing key event: keycode=330, modifiers=00 pressed=1, autorepeat=0  |  plain=-1, withmod=-1, size=612
    qt.qpa.input.keymap: Could not find a suitable mapping for keycode: 330, modifiers: 00
    qt.qpa.input.keymap: Processing key event: keycode=330, modifiers=00 pressed=0, autorepeat=0  |  plain=-1, withmod=-1, size=612
    qt.qpa.input.keymap: Could not find a suitable mapping for keycode: 330, modifiers: 00
    
    qt.qpa.input.keymap: Processing key event: keycode=125, modifiers=00 pressed=1, autorepeat=0  |  plain=-1, withmod=-1, size=612
    qt.qpa.input.keymap: Could not find a suitable mapping for keycode: 125, modifiers: 00
    qt.qpa.input.keymap: Processing key event: keycode=125, modifiers=00 pressed=0, autorepeat=0  |  plain=-1, withmod=-1, size=612
    qt.qpa.input.keymap: Could not find a suitable mapping for keycode: 125, modifiers: 00
    

    How to enable detection of event KEY_LEFTMETA in Qt/Qml.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jigarp
      wrote on last edited by
      #2

      Is there anyone who can guide me how to troubleshoot this problem?

      Pablo J. RoginaP 1 Reply Last reply
      0
      • J jigarp

        Is there anyone who can guide me how to troubleshoot this problem?

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @jigarp you may want to take a look at QEvdevKeyboardHandler source code where the warning message is sent, and see if you could add the LEFT_META key event.

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        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