Use C++ to move mouse cursor

This is a discussion on Use C++ to move mouse cursor within the C++ Programming forums, part of the General Programming Boards category; Hey, i was wondering how to use C++ to move my mouse cursor using my keyboard buttons, I use linux, ...

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    3

    Use C++ to move mouse cursor

    Hey, i was wondering how to use C++ to move my mouse cursor using my keyboard buttons, I use linux, and was wondering how to do that.

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    682
    SendInput Function (Windows)

    Simpler, but deprecated:

    mouse_event Function (Windows)

    EDIT:

    Sorry, I forgot you meant Linux.
    Last edited by kmdv; 01-31-2011 at 10:15 AM.
    I never put signature, but I decided to make an exception.

  3. #3
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,339
    `XWarpPointer'

    Soma

  4. #4
    Registered User
    Join Date
    Jan 2011
    Posts
    3
    Thanks a lot Soma, exactly what i required.
    Could you just tell me this, will i require extra libs to make it work? I use fltk, and can i use the xlibs from there, because it is built on top of it unless i am mistaken. And could you please point me to some sample code on Xwrappointer?
    Thanks a lot.
    Last edited by AJk101; 01-31-2011 at 02:20 PM.

  5. #5
    printf("Hello Cboard\n"); codeprada's Avatar
    Join Date
    Jan 2011
    Location
    In a little room at the back of your brain
    Posts
    68
    another function is the

    Code:
    SetCursorPos( x, y )
    SetCursorPos Function (Windows)

  6. #6
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    Quote Originally Posted by codeprada View Post
    another function is the

    Code:
    SetCursorPos( x, y )
    SetCursorPos Function (Windows)
    Quote Originally Posted by AJk101 View Post
    Hey, i was wondering how to use C++ to move my mouse cursor using my keyboard buttons, I use linux, and was wondering how to do that.
    .....
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you help me about tolower() in file
    By nctar in forum C Programming
    Replies: 7
    Last Post: 05-12-2010, 10:04 AM
  2. Retrieving data from a file
    By kamitsuna in forum C++ Programming
    Replies: 45
    Last Post: 02-27-2010, 08:37 PM
  3. get visible mouse cursor height
    By eXistenZ in forum Windows Programming
    Replies: 10
    Last Post: 09-05-2008, 09:46 PM
  4. Formatting Output
    By Aakash Datt in forum C++ Programming
    Replies: 2
    Last Post: 05-16-2003, 08:20 PM
  5. Filestream Out + move cursor back one place
    By h3lm3t in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 06:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21