{"id":24790535,"url":"https://github.com/spacedubby07/lazy-mouse","last_synced_at":"2026-05-10T09:39:56.445Z","repository":{"id":241820847,"uuid":"807718795","full_name":"SpaceDubby07/Lazy-Mouse","owner":"SpaceDubby07","description":"Expo app to control your desktop with your phone.","archived":false,"fork":false,"pushed_at":"2024-05-29T18:13:55.000Z","size":213,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T18:16:29.419Z","etag":null,"topics":["expo","mobile","nutjs","react-native","robotjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpaceDubby07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-29T16:36:02.000Z","updated_at":"2025-01-21T20:25:48.000Z","dependencies_parsed_at":"2024-05-30T06:48:39.840Z","dependency_job_id":"2c06e944-f4bf-4920-85df-566e90972513","html_url":"https://github.com/SpaceDubby07/Lazy-Mouse","commit_stats":null,"previous_names":["spacedubby07/lazy-mouse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceDubby07%2FLazy-Mouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceDubby07%2FLazy-Mouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceDubby07%2FLazy-Mouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceDubby07%2FLazy-Mouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpaceDubby07","download_url":"https://codeload.github.com/SpaceDubby07/Lazy-Mouse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245276177,"owners_count":20588894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expo","mobile","nutjs","react-native","robotjs"],"created_at":"2025-01-29T18:16:31.106Z","updated_at":"2026-05-10T09:39:56.374Z","avatar_url":"https://github.com/SpaceDubby07.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### This app - used with either an iPhone or Android device connects to an api hosted on a users machine. It is not published on any store so in my case i run it locally since its really just for a local machine\n### ***[Expo Go](https://expo.dev/go) is required to run this locally, unless you plan on building the app yourself and ejecting.***\n\n### I created this app because i read a lot of webtoons/manga/manwha/manhua on my computer and got sick of endlessly having to use my scroll wheel on my mouse.\n### With this app i can control my mouse to an extend in a more confortable position in my chair and hold a button to scroll instead of swiping my mouse wheel. \n\n***Feel free to fork this and use it however you wan't, i use [robotjs](https://robotjs.io/), and [nutjs](https://nutjs.dev/) since both have some functionality i prefer over the other\n\n### To use the app locally just pull it to a folder of your choosing or download the zip, and run npm install in the main folder, and again in the api folder to install packages.\n### to run, npm start in both the main folder, and api folder. You will know if it's running correctly if it says a user is connected in the logs.\n\n## in app.js - adjust the socket IP address to match your computers local ip address\nin index.js - the socket runs on port 3000, there are no adjustments needed here unless you decide to change the monitor features.\n```\nconst socket = io('http://192.168.0.103:3000');\n```\n\nFor my setup at home\nI have 3 monitors [2, 1, 3] - in this position.\nso in app.js i have a view, and i just set the buttons to select which monitor i want to use from left to right [monitor 2, monitor 1, monitor 3]\nthese buttons force the mouse position to somewhat centered on the monitor i want, because for whatever reason the joystick i built doesn't move monitor to monitor. \n\nFirst we need to emit to the socket, so since i have 3 monitors i have 3 emits, you can add or remove depending on your setup.\n```\n  const monitor1Select = () =\u003e {\n    socket.emit('monitor1');\n  };\n  const monitor2Select = () =\u003e {\n    socket.emit('monitor2');\n  };\n  const monitor3Select = () =\u003e {\n    socket.emit('monitor3');\n  };\n```\ndisplay the buttons\n```\n\u003cView style={{ flexDirection: 'row' }}\u003e\n  \u003cTouchableOpacity style={styles.button} onPress={monitor2Select}\u003e\n    \u003cText style={styles.buttonText}\u003emonitor 2\u003c/Text\u003e\n  \u003c/TouchableOpacity\u003e\n  \u003cTouchableOpacity style={styles.button} onPress={monitor1Select}\u003e\n    \u003cText style={styles.buttonText}\u003emonitor 1\u003c/Text\u003e\n  \u003c/TouchableOpacity\u003e\n  \u003cTouchableOpacity style={styles.button} onPress={monitor3Select}\u003e\n    \u003cText style={styles.buttonText}\u003emonitor 3\u003c/Text\u003e\n  \u003c/TouchableOpacity\u003e\n\u003c/View\u003e\n```\n\n\n\nin index.js i set the coordinates i want the mouse to be positioned at when i hit the monitor buttons.\nto find the x,y coords i have a log on my left click which shows me my current mouse position, and i just set my coords accordingly.\n```\n  socket.on('click', (button) =\u003e {\n    if (button === 'left') {\n      mouse.leftClick();\n      console.log(mousePosition); // shows x,y coords on left click\n      console.log(current); // fallback\n    } else if (button === 'right') {\n      mouse.rightClick();\n    }\n  });\n```\n\n```\n // adjust x and y coords depending on your setup\nsocket.on('monitor1', async () =\u003e {\n    await mouse.setPosition({ x: 932, y: 604 });\n  });\n  socket.on('monitor2', async () =\u003e {\n    await mouse.setPosition({ x: -941, y: 591 });\n  });\n  socket.on('monitor3', async () =\u003e {\n    await mouse.setPosition({ x: 2600, y: -100 });\n  });\n```\n\nto adjust scroll speed, in index.js adjust the value in scrollUp, or scrollDown, this is steps and varies on screen size and os etc...\n```\n      const scrollFunction = () =\u003e {\n        if (key === 'up') {\n          mouse.scrollUp(75); // adjust this value\n        } else if (key === 'down') {\n          mouse.scrollDown(75); // adjust this value\n        }\n      };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacedubby07%2Flazy-mouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacedubby07%2Flazy-mouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacedubby07%2Flazy-mouse/lists"}