本文介绍了设置鼠标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够将鼠标位置设置到屏幕/窗口的中间。
我该如何做?

解决方案

文档似乎表明或 CGWarpMouseCursorPosition 要匹配您的最新评论,我将进一步推荐

CGWarpMouseCursorPosition ,其中的文档状态:


I need to be able to set the mouse location to the middle of the screen/window.How can I do that?

解决方案

The documentation seems to indicate that CGDisplayMoveCursorToPoint or CGWarpMouseCursorPosition will do what you're after.

EDIT: To match your latest comment, I would further recommend CGWarpMouseCursorPosition, about which the docs state:

这篇关于设置鼠标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 05:11