mouse

Simulate mouse clicks in kernel space

隐身守侯 提交于 2020-05-28 07:56:56
问题 I am trying to simulate keyboard and mouse clicks in kernel space, so they won't be able to be blocked in other applications (in contrast to user space simulation). To achieve that goal, i found this library that is a C# wrapper for this project. As I understood, it installs a driver to communicate hardware devices such as mouse and keyboard. However, in contrast to the keyboard simulation that works flawlessly, i can't manage to make mouse simulation work: No right or left clicks, only mouse

How do you change the mouse pointer style in A-Frame

家住魔仙堡 提交于 2020-05-28 04:55:24
问题 I don't want the default drag hand. I just want the normal mouse pointer and CSS isn't doing it. 回答1: You have to override CSS: .a-canvas.a-grab-cursor:hover{cursor:default !important}.a-canvas.a-grab-cursor:active,.a-grabbing{cursor:default !important} 来源: https://stackoverflow.com/questions/39817522/how-do-you-change-the-mouse-pointer-style-in-a-frame

How to control the mouse in Minecraft using Python?

左心房为你撑大大i 提交于 2020-05-25 07:42:29
问题 All in all, I'm trying to programmatically -and externally- control the Minecraft player's orientation. No APIs, no Java mods to the game environment Typically this requires the movement of the mouse, but every single mouse movement simulating python3 library that I've tried doesn't move the player's head in-game. Each library does something different, too. For example, pyautogui doesn't do anything until you move the mouse manually after the script has finished. Doing this will jerk the

How to make cursor dissapear after inactivity in Unity

二次信任 提交于 2020-05-24 05:36:12
问题 My goal is simple, like a lot of applications, I want to make my cursor invisible after a certain time of inactivity of my user. My solution doesn't seem really optimized , here's the algorithm : void Start { Timer t = new Timer(5000);//Create a timer of 5 second t.start(); } void Update { if(MouseMoved){ t.reset(); } timeLeft = t.deltaTime; if ( timeLeft == 5000 ) { Cursor.visible = false; } } I really don't like to check at every frame if the mouse is moved, I'd prefer that my mouse moved

Mouse control with python

五迷三道 提交于 2020-05-08 19:11:03
问题 I'm running Ubuntu 12.04 and working with python 2. I would like to be able to control my mouse, and I have found several different python modules intended to do this, but cannot get them to work. I installed dogtail, but when I try: dogtail.rawinput.click(x,y) I get: AttributeError: 'module' object has no attribute 'rawinput' I then tried pymouse and although I used pip to install it when I import pymouse: from pymouse import PyMouse I get: TypeError: Object value must be tuple, dictionary

Delphi Mouse.curpos appears to be returning incorrect coordinates

走远了吗. 提交于 2020-04-17 22:44:07
问题 I have a VCL form application with a tedit that will use FindVCLWindow (Mouse.CursorPos) to act upon a the control if it is beneath the mouse. When I left click on the tedit, my program returns nil for the result and the reason appears to be the mouse.curpos sent in the function. In my test I used a form size of 500+ x 500+ and located it at screen coordinates 100,100. The Tedit is located at 100,100 and is sized and displayed at 100,50. When I point at the edit, the mouse.curpos is returned

How to fetch the middle mouse button in java?

做~自己de王妃 提交于 2020-03-26 04:27:17
问题 I use public boolean mouseDown(Event ev, int x, int y) to detect a click of the mouse. I can distinguish between the right mouse button (ev.metaDown() is true) and the left and middle. How can i differentiate the left from the middle button? Or if it is impossible with mouseDown, what should i use? 回答1: Try using ALT_MASK: This flag indicates that the Alt key was down when the event occurred. For mouse events, this flag indicates that the middle mouse button was pressed or released. So your

Python: Use mouse to draw a rectangle around objects in any window? Also store start and end coordinates as variables relative to said window?

主宰稳场 提交于 2020-03-22 09:49:52
问题 I'm very new to Python and need an approach for accomplishing an important function I've done before in macro-scripting languages: I have a Python program that will be processing a screengrab image using pyscreenshot. In order to feed pyscreenshot the necessary x1, y1, x2, y2 coordinates to create the image, I need the user to define the portion of the screen by drawing a rectangle around it. Think "snipping" tool in Windows and cmd+shift+4 in OSX. I am open to using any BSD module necessary

Python: Use mouse to draw a rectangle around objects in any window? Also store start and end coordinates as variables relative to said window?

隐身守侯 提交于 2020-03-22 09:49:30
问题 I'm very new to Python and need an approach for accomplishing an important function I've done before in macro-scripting languages: I have a Python program that will be processing a screengrab image using pyscreenshot. In order to feed pyscreenshot the necessary x1, y1, x2, y2 coordinates to create the image, I need the user to define the portion of the screen by drawing a rectangle around it. Think "snipping" tool in Windows and cmd+shift+4 in OSX. I am open to using any BSD module necessary

How to detect mouse acceleration in javascript?

心不动则不痛 提交于 2020-03-20 23:06:10
问题 I'm logging the mouse movements in a web app. I'd like to detect the mouse acceleration on a platform (e.g. Windows). Is it possible to do it from javascript, even just in an approximated way? I could ask the user to check their settings with a questionnaire, but it would be much better to detect it automatically. Cheers 回答1: Check distance the mouse has moved over a set interval of time: var mX:Number = _xmouse; var mY:Number = _ymouse; function checkDistance() { clear(); //trace('new