So yeah I'm a fairly new coder but I'm trying to learn to do some various things.
I can't find any straight forward answers to this anywhere else on the internet but I was wondering if my idea was possible before I spend time on it, and if possible could anyone give me hinters as to where to go.

I want a program that can run in the background, and when I press designated keys on the keyboard, the cursor will move to a position on the screen that I have set.

Thanks in advance

Recommended Answers

All 2 Replies

Yes possible. You will constantly have to monitor the keypress of your computer and on a certain combination key pressed, you can positioned the mouse to some absolute coordinate.

Assuming you're running Windows (which isn't necessarily a valid assumption), you're probably interested in the function GetAsyncKeyState() described here. In general, while it isn't always obvious what function you may need, or how to filter out all the irrelevant chatter, http://msdn.microsoft.com/ seems to be the go-to reference source for all things Windows. (I'd been a *nix developer for years, and avoided the Windows-based PC world until just the past couple of years.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.