Mouse Hid: working demo

This commit is contained in:
2020-05-25 02:35:10 +02:00
parent e319aab0c4
commit bd2540cbc0
2 changed files with 26 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Klávesnice remote SSH</title>
<title>Mouse remote</title>
<style>
</style>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
@@ -12,15 +12,20 @@
<div>
</div>
<button onclick="sendMouse()" value="Test mouse"/>
<input type="button" onclick="sendMouse(0, 0, -10);" value="^" />
<input type="button" onclick="sendMouse(0, -10, 0);" value="<" />
<input type="button" onclick="sendMouse(0, 10, 0);" value=">" />
<input type="button" onclick="sendMouse(0, 0, 10);" value="v" /><br />
<input type="button" onclick="sendMouse(1, 0, 0);" value="LEFT" />
<input type="button" onclick="sendMouse(2, 0, 0);" value="RIGHT" />
<script>
function sendMouse() {
function sendMouse(btn, x, y) {
var obj = {
x: 0,
y: 0,
btn: 0,
x: x,
y: y,
btn: btn,
wheel: 0,
}
@@ -37,4 +42,4 @@ function sendMouse() {
</script>
</body>
</html>
</html>