Problem keyboard input with Qt + DirectFB.



  • Hello~

    I using Qt 4.8.6 with DirectFB 1.2.8 on my ARM device.

    When I enable USB keyboard via linuxinput, Qt event->key() always return 0 in keyPressEvent().

    Here is my test code and log message.

    Could you let me know some check point or functions?
    Someone help me, please~

    • Test Code
      void myWidget::keyPressEvent(QKeyEvent *event)
      {
      qDebug() << "Key Press" << event->key() ;
      }

    • Result

           (c) 2001-2008  The world wide DirectFB Open Source Community
           (c) 2000-2004  Convergence (integrated media) GmbH
         ----------------------------------------------------------------
      
      

    () DirectFB/Core: Single Application Core. (2015-05-12 06:23) [ DEBUG ]
    (
    ) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
    () DirectFB/Input: USB USB Keykoard (1) 0.1 (directfb.org)
    (
    ) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
    () DirectFB/Input: USB USB Keykoard (2) 0.1 (directfb.org)
    (
    ) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
    () DirectFB/Core/WM: Default 0.3 (directfb.org)
    (
    ) FBDev/Surface: Allocated 800x600 16 bit ARGB1555 buffer (index 0) at offset 0 and pitch 1600.
    (!!!) *** WARNING [letting unprivileged IDirectFBDisplayLayer::GetSurface() call pass until cooperative level handling is finished] *** [idirectfbdisplaylayer.c:174 in IDirectFBDisplayLayer_GetSurface()]
    () Direct/Thread: Started 'EventBufferFeed' (-1) [MESSAGING OTHER/OTHER 0/0] <8388608>...
    (
    ) Direct/Thread: Started 'EventBufferFeed' (-1) [MESSAGING OTHER/OTHER 0/0] <8388608>...
    (*) Direct/Interface: Loaded 'PNG' implementation of 'IDirectFBImageProvider'.
    Key Press 0
    Key Press 0

    • DirectFB debug log
      (-) [Linux Input 100.206] ( 1340) Core/Input: dfb_input_dispatch( 0x1d2b1a8, 0x43b80bdc )
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: -> (01) KEYPRESS
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: -> TIMESTAMP 208.524981
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: -> KEYCODE 30
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: -> KEYID 0xf601
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: => TIMESTAMP 208.524981
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: => KEYCODE 30
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: => KEYID 0xf601
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: => KEYSYMBOL 0x0000
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: => MODIFIERS 0x0000
      (-) [Linux Input 100.209] ( 1340) Core/Input/Evt: => LOCKS 0x0000
      (-) [Linux Input 100.217] ( 1340) Core/WindowStack: _dfb_windowstack_inputdevice_listener( 0x43b80bdc, 0x1d39580 )
      (-) [Linux Input 100.217] ( 1340) Core/WM: dfb_wm_process_input( 0x1d39580, 0x43b80bdc )
      (-) [Linux Input 100.221] ( 1340) WM/Default: Processing input event (device 0, type 0x00000001, flags 0x000000f9)...
      (-) [Linux Input 100.224] ( 1340) IDirectFBWindow: IDirectFBWindow_React()
      (-) [Linux Input 100.224] ( 1340) IDFBEventBuffer: IDirectFBEventBuffer_InputReact( 0x43b80bdc, 0x1d36448 ) <- type 000001
      (-) [Linux Input 100.224] ( 1340) Direct/Mem: + 92 bytes [idirectfbinputbuffer.c:827 in IDirectFBEventBuffer_InputReact()]
      (-) [EventBufferFeed 100.225] ( 1351) IDFBEventBuffer: Going to write 80 bytes to file descriptor 14...
      (-) [EventBufferFeed 100.231] ( 1351) IDFBEventBuffer: ...wrote 80 bytes to file descriptor 14.
      (-) [EventBufferFeed 100.231] ( 1351) Direct/Mem: - number of bytes of item [idirectfbinputbuffer.c:906 in IDirectFBEventBuffer_Feed()] -> 0x1d936f8
      Key Press 0

    Thank you.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.