Giter Club home page Giter Club logo

mouselock's Introduction


Mouselock


Lock mouse cursor to a centered area of the screen for MacOS.

Why?

In League of Legends (and potentially other games), the cursor is not locked properly in borderless mode. This app tries to fix that.

Requirements

Requires MacOS 11.0 or later.

Tips

mouselock's People

Contributors

mxrlkn avatar relalis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mouselock's Issues

Please give a hand to CatchMouse

Hi mxrlkn,

I know this is not related to mouselock app, but I am a super big fan of using CatchMouse app:

https://github.com/round/CatchMouse/issues

But it seems the original owner don't support this amazing yet simple app.

Is there any chance you may give a hand on continuing making this app great and supported?

All of my friends are using this app, yet this app hasn't been updated for so long and started to have glitches in latest macOS (i.e. after each unplug of thunderbolt of external screens, the allocation of screens is misaligned so need to reset each time).

Btw the mouseLock works awesome! Thank you again for the amazing app makes our life much easier!

Control Keys feature not working

My understanding is that the "control keys" should be set to the same keybinds as ping and emotes and possibly others.

I have typed "g,t" into the field but it does not appear to be working.

let controlkey = AppState.shared.controlkeys

From testing it seems that the controlkey variable is never true.

Mouse Position Update Optimization Query

I have used the application a couple of times and would like to address a question, as I've noticed some peculiar mouse behavior within the application (League of Legends). It's a bit challenging to detect this movement, but it becomes noticeable on certain occasions. I understand that the idea is to update the mouse position when it leaves the application's area or the screen resolution. After examining the code and logic a bit, I would like to clarify this doubt: Is the mouse position updated every time it moves, or is there a validation to determine when it has actually left the area? In the latter case, there should be no need to update the position, preventing unnecessary updates whenever a movement event is triggered

Does not work for Steam's Dota2

I just tried it on Steam's Dota2, and it doesn't seem to work.

Can we:
(1) Make it work on Steam's Dota2 as well
(2) Add a checkbox for "Steam's Dota2", just like we did for League of Legend.

OS: Ventura 13.0

Thank you!

[BUG] using this with polling rate >250hz causes the cursor to jitter/jump ingame

Update: I figured out what the problem is. The problem is the polling rate and the amount of events sent. 250hz is the maximum I could get running without issues using the method implemented by @mxrlkn.

I may or may not look for a better solution than to downgrade my mouses polling rate e.g. according to https://stackoverflow.com/a/40922095 wine developers impl. of mouse capture. But I am probably going to buy a gaming pc soon TM anyways so... probably not.

EDIT: With an MX Master 3, a G502 (not hero) and a very old Performance MX it is not reproducible btw. I could only reproduce it with G Pro Wireless and Pro X Superlight so far. Peronally running out of mouses by now lmao

Steps to reproduce:

install OS Ventura 13.1
use mouselock
start League of legends using G pro wireless or Pro X Superlight
produce high apm with mouse like clicking around or, simpler way to cause teleportation -> hold left click and drag your mouse around.

This happens especially while holding left click but also happens if having a high clickrate on rightclick ingame combined with movement. It's like the tracking just stops frequently.

Doesnt matter if Linear Mouse or GHub is used parallel to mouselock.

Mouselock crashes with Wine and League of Legends option ticked

Steps to reproduce:

  1. Launch mouselock
  2. Execute any wine command to start wineserver (e.g. WINEPREFIX=~/.testing-wine wine64 winecfg)

Console output from debug binary (xcodebuild -quiet -configuration Debug -target mouselock):
mouselock/mouselockApp.swift:62: Fatal error: Unexpectedly found nil while unwrapping an Optional value
zsh: illegal hardware instruction ./build/Debug/mouselock.app/Contents/MacOS/mouselock

It's probably worth noting that this is reproducible on both wine-crossover from Gcenx/homebrew-wine, and a fresh wine64 build, both on macOS 12.1

Trackpad click drag erratic behavior.

There is a strange behavior that I have noticed while using the trackpad. Trying to click and drag causes the mouse to become erratic and skip, almost as if its dropping inputs or operate at a very low framerate. Consequently the trackpad feels unresponsive and seems to move about half the distance it should normally. This does not seem to happen when using a connected mouse, or as an experiment, while using the mouse to click and the trackpad to move. Tested on a 2017 intel macbook pro on 12.6.1

version locked to monterey

Awesome bit of software, thanks alot for it! Recently got rid of the gaming pc and went solely Mac, and this has saved me from having to bootcamp to play league! I am sure you are aware, but it requires monterey to install, I did try and build on big sur, but it still needed monterey, I upgraded in the end, so all good, but might be nice for people that don't want to run a beta.

Thanks again!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.