<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div class="" style="">Hi everyone,</div><div class="" style="">I have a problem with QtWebKit 5.3.1 not forwarding custom keycodes to the Javascript layer. Basically the "onkeypress" event is not fired.</div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">I am developing my own IR remote control driver inside the eglfs plugin. I submit the keycodes to the upper layers like this:</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida
 Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="background-color: transparent;" class="">QWindowSystemInterface::handleKeyEvent(0, QEvent::KeyPress, keyCode, Qt::NoModifier);<br class="" style=""></div><div style="background-color: transparent;" class="">QWindowSystemInterface::handleKeyEvent(0, QEvent::KeyRelease,&nbsp;keyCode, Qt::NoModifier);<br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">As long as I send Qt
 keycodes (like&nbsp;Qt::Key_0,&nbsp;Qt::Key_Up, etc..) I receive the Javascript event. When I send custom keycodes like&nbsp;61506,&nbsp;61507, etc, they get marked as not accepted. I guess by the QWebView class.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">In my previous system I was using QtWebKit 2.3.3 + Qt 4.8.6 + DirectFB and it was working fine with the same keycodes.<br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light',
 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">In my simple browser application I redefined the&nbsp;keyPressEvent method like this:</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="background-color: transparent;" class="">void MainWindow::keyPressEvent(QKeyEvent *ev)</div><div style="background-color: transparent;" class="">{</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; qDebug() &lt;&lt; "key pressed:" &lt;&lt; ev-&gt;key() &lt;&lt; "accepted:" &lt;&lt; ev-&gt;isAccepted();</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; ev-&gt;accept();</div><div style="background-color: transparent;"
 class="">&nbsp; &nbsp; m_view-&gt;event(ev);</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; if (ev-&gt;isAccepted())</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; &nbsp; &nbsp; qDebug() &nbsp;&lt;&lt; "Event accepted";</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; else</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; &nbsp; &nbsp; qDebug() &nbsp;&lt;&lt; "Event NOT accepted";</div><div style="background-color: transparent;" class="">&nbsp; &nbsp; QWidget::keyPressEvent(ev);</div><div style="background-color: transparent;" class="">}</div><div style="background-color: transparent;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">m_view
 is a pointer to QWebView.</div><div style="background-color: transparent;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">I receive all the keycodes and at the beginning of the function the events are still marked as accepted.&nbsp;</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">But even if I try to force to accept them, when they enter the QWebView they are always not accepted, thus not forwarded to the Javascript layer.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica
 Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">Is there a particular reason for this or is there a way to workaround it ?</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">Thanks in advance,</div><div
 style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">Massimo</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><br></div></div></body></html>