mouse

NodeJS native mouse and keyboard bindings [closed]

大憨熊 提交于 2019-11-29 01:33:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 months ago . I've been looking for a native nodejs module that supports mouse and keyboard listening and execution i found this.. https://npmjs.org/package/mouse but the source code looks like it only supports the browsers. 回答1: I've been working on a module for sending mouse and keyboard events, RobotJS. Example code: var

How can I handle multiple mouse inputs in Java?

半世苍凉 提交于 2019-11-29 01:24:16
问题 A friend of mine asked me to implement a blue and a red pointer to represent the inputs of two separate mice to expedite a mixing desk scenario for real time audio mixing. I'd love to, but as much as I think it is a great idea, I don't have a clue as to where to start looking for a possible solution. Where should I start researching a viable method of implementing dual mouse inputs? 回答1: Look at jinput. I have had multiple keyboards working with it, I am nearly certain it supports multiple

How to change the mouse cursor into a custom one when working with Windows Forms applications?

為{幸葍}努か 提交于 2019-11-29 00:22:25
问题 In a UserControl I want to change the mouse cursor from the arrow, to a hand icon. What I currently do is this: this.Cursor = Cursors.Hand; This is very nice, it gives me a mouse cursor looking like this: But here comes my problem... this shows a hand with a pointing finger. What I need is a "grabbing" hand, more like this one: How do I do this?, How can I load an icon file (.ico), a cursor file (.cur), or image file (.png), and use it as the mouse cursor? 回答1: If you have a cursor file:

Move mouse cursor with node.js [closed]

被刻印的时光 ゝ 提交于 2019-11-28 23:57:56
Is there is any way or module to move cursor and simulate mouse clicks in windows7/8 with node.js? I found this library https://www.npmjs.org/package/win_mouse but seems like it doesn't work I've been working on a module for this, RobotJS . Example code: var robot = require("robotjs"); //Get the mouse position, retuns an object with x and y. var mouse=robot.getMousePos(); console.log("Mouse is at x:" + mouse.x + " y:" + mouse.y); //Move the mouse down by 100 pixels. robot.moveMouse(mouse.x,mouse.y+100); //Left click! robot.mouseClick(); It's still a work in progress but it will do what you

Disabling mouse movement and clicks altogether in c# [duplicate]

前提是你 提交于 2019-11-28 23:42:22
This question is an exact duplicate of: Block/Nullify mouse movement/click in C# 1 answer At work, i'm a trainer. I'm setting up lessons to teach people how to "do stuff" without a mouse... Ever seen people click "login" textbox, type, take the mouse, click "password", type their password, then take the mouse again to click the "connect" button beneath ? So i'll teach them how to do all that without a mouse (among many other things, of course) At the end of the course, i'll make them pass a sort of exam. So i'm building a little wizard based app in which i present some simili-real-life

Simulate Mouse Clicks on Python

喜夏-厌秋 提交于 2019-11-28 22:50:04
问题 I'm currently in the process of making my Nintendo Wiimote (Kinda sad actually) to work with my computer as a mouse. I've managed to make the nunchuk's stick control actually move the mouse up and down, left and right on the screen! This was so exciting. Now I'm stuck. I want to left/right click on things via python when I press A, When I went to do a search, All it came up with was tkinter? So my question is, What do I call to make python left/right click on the desktop, and if it's possible

Swapping left and right mouse button in .NET

廉价感情. 提交于 2019-11-28 21:59:36
How do I swap left and right mouse buttons in .NET (preferably C#)? Basically the result should be the same as if the user checked the "Switch primary and secondary buttons" checkbox in the Mouse Properties through the control panel. I'm dealing with Windows XP, in case that makes a difference. You can use a Windows API call to SwapMouseButton : using System.Runtime.InteropServices; // ... [DllImport("user32.dll")] public static extern Int32 SwapMouseButton(Int32 bSwap); // ... // Swap it. SwapMouseButton(1); // Back to normal. SwapMouseButton(0); Something like this: using Microsoft.Win32;

How would I get the current mouse coordinates in bash?

怎甘沉沦 提交于 2019-11-28 21:17:12
问题 I need to get the current mouse coordinates in bash and xdotool does not work for me. How would I do this? 回答1: To avoid all the sed/awk/cut stuff, you can use xdotool getmouselocation --shell In particular, eval $(xdotool getmouselocation --shell) will put the position into shell variables X , Y and SCREEN . After that, echo $X $Y will give a snippet ready for a later xdotool mousemove or any other use. My extra for sequential clicking into a few positions is a file positions.txt (given by a

Detect touchpad vs mouse in Javascript

陌路散爱 提交于 2019-11-28 20:33:36
Is there any way to detect if the client is using a touchpad vs. a mouse with Javascript? Or at least to get some reasonable estimate of the number of users that use touchpads as opposed to mice? In the general case, there is no way to do what you want. ActiveX might allow you to see and examine USB devices, but in the best case, even if that is somehow possible, that limits you to IE users. Beyond that, there is no way to know. You might be able to discern patterns in how (or how often) a touchpad user moves the cursor versus how a mouse user might move the cursor. Differentiating between

JScrollPane - Zoom relative to mouse position

我们两清 提交于 2019-11-28 19:51:26
I need to calculate the new position of the viewport when zooming in to an image. The UI is built up as follows: ImagePanel draws the image ImagePanelWrapper is a JPanel wrapping around the imagePanel JScrollPane contains the ImagePanelWrapper When zooming in or out, the ImagePanel's zoom factor is changed and the preferred size of the ImagePanel is being recalculated. Therefore the image on this panel moves, even though the ImagePanel stays at the same viewport point. The following methods are called when the user holds down CTRL and uses the mouse wheel. The given point is the cursor