Trolltech Home | Qt-embedded-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-embedded-interest Archive, November 2007
Qt 3.3.8 and EVM9200 keyboard


Message 1 in thread

Hi. I have one problem with keyboard and qt-embedded-free-3.3.8 on embedded Linux/framebuffer, AT91RM9200-based device. Our device has attached small LCD display and EVM9200 keyboard, keyboard has arrow buttons. These buttons work properly in terminal - we can scroll through shell history, etc. I also wrote simple terminal program to test whether arrow buttons are identified properly (according to linux/input.h), and yes they are identified correctly.

But in Qt Embedded application they don't work AT ALL. I reimplemented QApplication::notify() to catch all keypress events, and all events are working, except arrows. Qt doesn't seem to understand them at all. I wrote all keypress events to log file. After application is started, I pressed B, A, Left Arrow, Right Arrow. In log file I got only "B, A". My notify() method:

bool SQ_Application::notify(QObject *receiver, QEvent *e)
{
    FILE *f  = fopen("log", "a");

    if(e->type() == QEvent::KeyPress)
    {
        QKeyEvent *ke = (QKeyEvent *)e;
        fprintf(f, "KEY %d - %c\n", ke->key(), (char)ke->ascii());
    }

    fclose(f);

    return QApplication::notify(receiver, e);
}

Any ideas ?

Regards, Krasu.

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx