Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mouseEvent = {};
- var mouseUp = false;
- var mouseOver = false;
- window.onkeydown = e => {
- keysPressed[e.code] = "down";
- };
- window.onkeyup = e => {
- keysPressed[e.code] = "up";
- };
- window.onmouseup = e => {
- mouseUp = true;
- mouseEvent = e;
- };
- window.onmouseover = e => {
- mouseOver = true;
- mouseEvent = e;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement