mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Add events listen test html
This commit is contained in:
parent
34d0fbf4bc
commit
93a9f8194f
37
examples/index.html
Normal file
37
examples/index.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<h1>Type and check the console</h1>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.onclick = function(events) {
|
||||||
|
console.log({
|
||||||
|
event: "click",
|
||||||
|
altKey: events.altKey,
|
||||||
|
shiftKey: events.shiftKey
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onkeydown = function(events) {
|
||||||
|
console.log({
|
||||||
|
event: "keydown",
|
||||||
|
key: events.key,
|
||||||
|
keyCode: events.keyCode,
|
||||||
|
keyChar: events.charCode
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onkeyup = function(events) {
|
||||||
|
console.log({
|
||||||
|
event: "keyup",
|
||||||
|
key: events.key,
|
||||||
|
keyCode: events.keyCode,
|
||||||
|
keyChar: events.charCode
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
window.onmousemove = function(events) {
|
||||||
|
console.log({
|
||||||
|
event: "move",
|
||||||
|
x: events.x,
|
||||||
|
y: events.y
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user