mouse

Can you program buttons on a gamepad to bind with mouse/keybourd input?

I was wondering if there was a way to write a program that could bind buttons on a gamepad to certain mouse/keyboard inputs. For example moving an analog stick on the gamepad to move the mouse, and clicking certain buttons on the gamepad == pressing keyboard keys or mouse clicks. Which language would be able to do this? Thanks! ...

Call to TMouse.GetCursorPos sometimes fails with "A call to an OS function failed"

On occasion my application gets the error below. Normally this happens when the user steps away from their desk leaving my program open. When they come back this error has appeared. TMouse.GetCursorPostion does not do anything except make the Windows API call to GetCursorPosition. Then it checks the return value and calls GetLastEr...

Delphi Form Drag Lockup

Make a Delphi 2007 application, TForm as main window. Run application. Try to drag the form using the caption bar. The debugger shows an unending stream of error messages, complaining it can't find some unnamed routine. Escape and Break don't work. 3 finger salute doesn't work. Clicking in some other window and then back to the Delph...

Why isn't WH_MOUSE hook global anymore?

I have this global mouse hook setup in a DLL that watches for mouse gestures. Everything works perfectly but with a hook set for WH_MOUSE_LL which is a low-level hook and one that doesn't need to be in an external injectable DLL. Once I switch - to the more suitable one would say - WH_MOUSE mouse hook, everything falls apart. Once I cl...

Flash 8 AS2 Mouse click behaviour: clicked spot becomes unclickable until mouse moved

Hi all I have a series of buttons on the stage, they can be double clicked using a timer that detects a double click. this all works great until I refresh the page and load another lot of buttons. The the problem starts... If I click on a spot on the screen I am unable to reclick that same spot. I have to move the mouse slightly to be ...

Flash CS4 AS3 horizontal movieclip scrolling with mouse move

I'm new to AS3 and have been working on an XML driven navigation system written in AS3. At present, I've imported the contents of an XML file and plotted it inside a containing MovieClip created at root level dynamically on the stage. This MovieClip is called 'container'. What I want to accomplish is a smooth, accelerating / decelerati...

touchpad horizontal scrolling in emacs

Hello: I use emacs.app on Mac OS X on a MacBook. Most applications on the computer allow me to scroll both vertically and horizontally with a two-finger drag on the trackpad. I would like to use this ability to position the cursor in emacs. Adding the following lines to .emacs allows me to move the cursor vertically: (global-set-ke...

WM_MOUSEHOVER in a global hook

I have implemented custom tooltips for a couple of controls in my application (MFC) but I would like to make it general for all the controls. Right now I am calling TrackMouseEvent in WM_MOUSEMOVE and then catching WM_MOUSEHOVER (both in the overwritten function WindowProc of the control). But this way I have to duplicate code for every...

how to do click and drag in a winforms application

I have a simple winforms application with a number of controls in it. I want to be able to click and drag from anywhere on the form and move the whole set of stuff around (panning). I have figured out the respositioning bit already. What I still need to figure out is how to tie the click and drag into updating my offsets. What I have tr...

Mouse control in C#

I have an application written in .NET. I would like to add the ability for users to control my application by using a mouse, e.g. a high end gaming mouse, with 10-15 buttons on it. Is this going to be easy to do, or will I need a mouse vendor with a .NET SDK that I can use - can you recommend any? I would like all control to be within...

VB6 - Move mouse pointer smoothly between two points?

It's been yonks since I've done any VB6... I need to take control of the mouse pointer and move it smoothly between two points. Is the best way to do this a combination of GetCursorPos, SetCursorPos and a timer or two, or is there a better way? Thanks for any help. ...

wxPython - Trapping Mouse & Keyboard Events without window Focus

I am attempting to write a time management tool with wxPython that is ideally non-obtrusive and very much out of the way. The app so far can be used normally and minimized to the system tray for the duration of its use. However, I notice that once the frame is not in focus, as it is when its 'Iconized', the mouse and keyboard trappin...

Capture and send keyboard / mouse input in C#

I am looking for a way to send and receive keyboard information regardless of what app has focus. I remember back in College seeing a presentation about an old Windows API that let you change the cursor position and send right clicks and such. Besides User32.dll is there a way to do this with the .net framework? ...

Cocoa: Getting the current mouse position on the screen

I need to get the mouse position on the screen on a Mac using Xcode. I have some code that supposedly does that but i always returns x and y as 0: void queryPointer() { NSPoint mouseLoc; mouseLoc = [NSEvent mouseLocation]; //get current mouse position NSLog(@"Mouse location:"); NSLog(@"x = %d", mouseLoc.x); NSLog...

Adding mouseListener to my object in java

hi, I'm trying to make an applet which I can simply drag an image. And I want image object to listen events. So here is the applet code which simple run in a thread: import java.awt.*; import java.net.URL; import javax.swing.JApplet; public class Client extends JApplet implements Runnable { private static final long serialVersionUID =...

Mouse position using jQuery outside of events

I need to get a hold of the absolute mouse position / coordinates (X and Y) using (preferably) jQuery like in this tutorial but outside of any JavaScript event. Thank you. ...

Background Mouse simulation

I'm writing a program in C# that is attaching on to another process and reading memory etc. from this other process. I'm looking for a way to simulate mouse movements in this other process, but the other process specifically blocks methods such as PostMessage, SendMessage etc. I'm trying to stay away from injection or memory writes, so t...

Python Xlib catch/send mouseclick

Hello, At the moment I'm trying to use Python to detect when the left mouse button is being held and then start to rapidly send this event instead of only once. What I basically want to do is that when the left mouse button is held it clicks and clicks again until you let it go. But I'm a bit puzzled with the whole Xlib, I think it's ver...

Parent Control Mouse Enter/Leave Events With Child Controls

I have a C# .NET 2.0 WinForms app. My app has a control that is a container for two child controls: a label, and some kind of edit control. You can think of it like this, where the outer box is the parent control: +---------------------------------+ | [Label Control] [Edit Control] | +---------------------------------+ I am trying...

In Cocoa, what is the best way to change the cursor when hovering over a circular view?

What I want to do I have a circular custom NSView subclass, and I want to change the appearance of the cursor when the mouse is hovering over the circular portions of the view, but not when over the portions of the view's rectangle that fall outside the circle. Here's an illustration. I would have inlined it with an image tag, but I'm ...