Results 1 to 2 of 2

Thread: webkit and keycode - F1...F12.

  1. #1
    Join Date
    Dec 2008
    Location
    TaganrogNativelandChehov,Russia
    Posts
    64
    Thanks
    1
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default webkit and keycode - F1...F12.

    hello all.
    WebKit doesnot return some keycode or return zerro code - 0. Keys such as F1....F12.
    Help me please to find place when webkit filtered this keycode in WebKit code.
    MinGW 3.4.2 Windows XP Qt 4.4.3

    file main.cpp
    Qt Code:
    1. // file "main.cpp"
    2. #include <QApplication>
    3. #include <QWebView>
    4. #include <QUrl>
    5.  
    6. int main(int a, char** b)
    7. {
    8. QApplication app(a,b);
    9. QWebView view;
    10. view.load(QUrl("keycode.html"));
    11. view.show();
    12. return app.exec();
    13. }
    To copy to clipboard, switch view to plain text mode 

    file keycode.html
    Qt Code:
    1. <html>
    2. <head>
    3. <script type="text/javascript">
    4. document.onkeydown = function(event) {
    5. var kCode = window.event ? window.event.keyCode : (event.keyCode ? event.keyCode : (event.which ? event.which : null));
    6. alert(kCode);
    7. }
    8. </script>
    9. </head>
    10. <body>
    11. <input type="text">
    12. </body>
    13. </html>
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: webkit and keycode - F1...F12.

    I can reproduce the problem with Qt 4.5.0-beta1. Try sending the snippet to the task-tracker.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    kwisp (2nd June 2009)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.