mouse

Why is Gosu hiding my mouse pointer?

I'm doing some graphics programming using the Gosu gem. The thing is, when I create a Window my mouse pointer is hidden. I can guess where the mouse is at a certain moment, and I can intuitively click, but my users may not. Is there a way to show the pointer? ...

C# Not all keyboard events are being replayed correctly

I'm writing a tool for validation engineers to log session interaction when attempting to reproduce failure. It creates a video of the desktop, and I'm hooking the keyboard and mouse in C#, to record their interaction with the OS. The events are serialized out to a file to be read in at a later time. I use SendInput to replay the mouse ...

Simulate mouse select with Javascript?

Hello, I would like to select text on the page by simulating a left mouse button down and drag it to a specified x,y location (in pixels) Can this be done with JavaScript? Thank you. ...

Mouse movement capture

I have an application wich open a modal form with the ShowDialog method. Once this form is displayed I want to capture the mouse movement even if the cursor is outside the form. How can I capture the mouse movement? I saw something with the Capture property but I cannot manage to make it work. [edit] I want to be notified if the mouse ...

[Java] get mouse position

Hi ! I would like to simulate a natural mouse movement in Java (going from here to there pixel by pixel). To do that I need to know the starting coordinates. I've found the method event.getX() and event.getY() but I need an event... How can I know the positions without doing anything (or something not visible) ? Thank you ...

JQuery mouseout timeout

Similar problems have been dealt with before but I believe mine's slightly different owing to the use of the bind() function. Anyhow... $('.overlay').bind("mouseenter",function(){ $(this).fadeTo('slow', 0); }).bind("mouseleave",function(){ setTimeout(function() { $(this).fadeTo('slow', 1); }, 2000); }); I want to fad...

Is a mouse click a WM_* message or a combination of up & down messages?

I'm used to working with a Windows framework that provides events for things like a mouse click or a mouse double click. Are click events a Windows construct (i.e. does Windows send a WM_DOUBLECLICK or similar message) or does it send WM_MOUSEDOWN and WM_MOUSEUP to applications which then do some math to decide if the event was a click ...

JQuery mouseout timeout part 2

Hi again. This is an additional question following on from this one. $('.overlay').bind("mouseenter",function(){ $(this).fadeTo('slow', 0); }).bind("mouseleave",function(){ var $this = $(this); setTimeout(function() { $this.fadeTo('slow', 1); }, 2000); }) Beneath my .overlay div I have bits ...

Take control of mouse using mouse hooks in VC#

Hi, is there any way to take control of all the mouse events entirely using mouse hooks? I'm developing an application (VC# exe that is) and I've to fulfill the following requirement: Whenever the application is active, it has to display a virtual cursor instead of the windows cursor and when the user tries to move the mouse, the mouse e...

Controlling mouse in linux

Basically I'm currently using the wiiuse library to get the wiimote working on linux. I want to now be able to control the mouse through the IR readings. Can somebody point me in the right direction as to how to approach this? I know of uinput but there doesn't seem to be a lot of tutorials/guides on the web. I'm working with c/c++ so ...

how to create own MouseButtonEventHandler in WPF

hello, I create MyWindow class derived from Window, and I capture the Window Messages refer nonclient area, for example WM_NCLBUTTONDOWN, it works :). I want create my event and rise them when the message comes. public event MouseButtonEventHandler MouseButtonDownOnCaption; protected virtual void OnMouseButtonDownOnCaption(obj...

mouse moved -crosshair cursor

I developed a program to draw polygon triangles. The triangles were drawn using mouse drag. The coordinate of the triangles were stored in array list. Every times the mouse cursor, mouse over on the existing drawn triangles(within the area of triangle), the mouse cursor should turns to "CROSSHAIR_CURSOR", however this were not happened. ...

Draw a triangle using mouse drag (how can I move the previous drawn triangle using mouse drag)

How to move a triangle to a new location using mouse drag (which was previous drawn using mouse drag)? ... java.util.List<Polygon> triangles = new LinkedList<Polygon>(); Point startDrag, endDrag, midPoint; Polygon triangle; ... public PaintSurface() { this.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEven...

How to get the global mouse cursor type?

How do you get the cursor type (hand, arrow, etc.) as enum (int) or Bitmap? It should work globally, not only in the application's forms. I believe, Cursor.Current doesn't work if the mouse is outside of the application scope. I've looked at interopping Win32 GetCursorInfo() and GetCursor(), but don't understand how to use these to get...

mouse click events in an NSView subclass

Hello, I have an NSView subclass that gets initialized with an OpenGL context and has a bunch of mouse event handling (onMouseDown, etc...). I have an app using it which has a main Cocoa window that contains the view and all the mouse events are working properly. However, I'm trying to use it now in another app where i have a secondary...

What's the difference between using Cursor.Position, SetCursorPos(), SendInput() and mouse_event()?

Cursor.Position, SetCursorPos(), SendInput() and mouse_event() all set the mouse position to a specified coordinate. So what's the difference between them? ...

Mouse click detection and Transformation2D in Direct3D

I use Sprites to draw images in a D3D window. I draw an image on every sprite within a rectangle (0, 0, width, height) and use Matrix.Transformation2D to place the image in the rendered view. Example: using (Sprite s = new Sprite(device)) { s.Begin(SpriteFlags.AlphaBlend); Matrix tranz = new Matrix(); tranz = ...

How do I read events from a HID device under Ubuntu Jaunty?

I have a Linux USB HID device (a Hama MCE), and I can read its events manually by reading cat /dev/input/event7 and cat /dev/input/event8. Whenever I press a key on the device, a few bytes become available for reading with one of the cat commands above. I have a default installation of Ubuntu Jaunty 64-bit desktop on the machine. I thin...

How to tell if a a mouse button has been released outside the window?

Usually, when a user holds the mouse pressed over a button, moves the mouse away from the window, and then releases it, the button can tell that the mouse has been released even though the release has actually occured outside the window. When I inspect mouse clicks in my window, how can I imitate the same behavior? When a mouse button ...

Equivalent of GetCursorPos() in Mac's Carbon

Background We're porting our PythonOgre-based games to Mac, and the publishers demand ability for mouse to leave the window. On Windows, we're going around OIS (Object-oriented Input System) for the purposes of mouse control; that is, we don't let OIS keep the mouse captured inside window borders, and then track the mouse cursor in scree...