Hid: mouse
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
</head>
|
||||
<body>
|
||||
HID input service, POST data to /keyboard or /mouse <br/>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
||||
|
40
templates/mouse.html
Normal file
40
templates/mouse.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Klávesnice remote SSH</title>
|
||||
<style>
|
||||
</style>
|
||||
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
HID mouse service, POST data to /mouse <br/>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
<button onclick="sendMouse()" value="Test mouse"/>
|
||||
|
||||
<script>
|
||||
|
||||
function sendMouse() {
|
||||
var obj = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
btn: 0,
|
||||
wheel: 0,
|
||||
}
|
||||
|
||||
var ret = $.ajax({
|
||||
type: "POST",
|
||||
url: "hid/mouse",
|
||||
data: JSON.stringify(obj),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json"
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user