- thinvnc_0.9b3.zip
- thinvnc_0.9b3_src.zip
- server
- .svn
- all-wcprops
- entries
- prop-base
- props
- text-base
- tmp
- prop-base
- props
- text-base
- Windows
- .svn
- all-wcprops
- entries
- prop-base
- props
- text-base
- tmp
- prop-base
- props
- text-base
- Delphi2010
- web
|
var mouseX = -1;
var mouseY = -1;
var mouseMoved = false;
function clearMouse() {
mouseMoved = false;
}
function sendMouse(x, y,button, action) {
clearMouse();
var url = baseUrl + "mouse?x=" + (x - getDeltaX()) + "&y=" + (y- getDeltaY()) + "&btn=" + button + "&action=" + action;
$.get(url, function (data) { })
}
function sendMouseMove() {
if (mouseMoved) {
sendMouse(mouseX,mouseY,0,"move");
}
setTimeout(sendMouseMove, 100);
}
function hookKM() {
$("#desk").mousedown(function (e) {
sendMouse(e.pageX, e.pageY, e.button, "down");
event.stopPropagation();
event.preventDefault();
});
$("#desk").mouseup(function (e) {
sendMouse(e.pageX, e.pageY, e.button, "up");
event.stopPropagation();
event.preventDefault();
});
$("#desk").mousemove(function (e) {
if ((mouseX != e.pageX) || (mouseY != e.pageY)) {
mouseX = e.pageX;
mouseY = e.pageY;
mouseMoved = true
}
});
$("#desk").bind("contextmenu", function (e) {
return false;
});
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.