kwisp
13th December 2008, 14:23
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
// file "main.cpp"
#include <QApplication>
#include <QWebView>
#include <QUrl>
int main(int a, char** b)
{
QApplication app(a,b);
QWebView view;
view.load(QUrl("keycode.html"));
view.show();
return app.exec();
}
file keycode.html
<html>
<head>
<script type="text/javascript">
document.onkeydown = function(event) {
var kCode = window.event ? window.event.keyCode : (event.keyCode ? event.keyCode : (event.which ? event.which : null));
alert(kCode);
}
</script>
</head>
<body>
<input type="text">
</body>
</html>
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
// file "main.cpp"
#include <QApplication>
#include <QWebView>
#include <QUrl>
int main(int a, char** b)
{
QApplication app(a,b);
QWebView view;
view.load(QUrl("keycode.html"));
view.show();
return app.exec();
}
file keycode.html
<html>
<head>
<script type="text/javascript">
document.onkeydown = function(event) {
var kCode = window.event ? window.event.keyCode : (event.keyCode ? event.keyCode : (event.which ? event.which : null));
alert(kCode);
}
</script>
</head>
<body>
<input type="text">
</body>
</html>