Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everybody, i am write a module (fakemouse) which is base swinput to fake mouse event. My module can fake mouse click ( left, right and middle button) well, but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    1

    Ask about mouse motion event


    Hi everybody, i am write a module (fakemouse) which is base swinput to fake mouse event. My module can fake mouse click ( left, right and middle button) well, but it had some problem with mouse 's moving.
    I use function input_report_rel( ) to change position of mouse from current position (assume (x,y)) to
    position (x + dx, y+dy)
    Code:
       input_report_rel(fkmouse.idev, REL_X, dx);
       input_report_rel(fkmouse.idev, REL_Y, dy);
       input_sync(fkmouse.idev);
    But with this function it not move from (x,y) to (x+dx, y+dy), it just jump from (x,y) to (x+dx, y+dy). I have some look at in the kernel, but i cant find the solution for this problem. Anyone can help me?
    Attached Files Attached Files
    Last edited by 5primes; 04-26-2008 at 07:18 PM. Reason: attach file

  2. #2
    Just Joined! wildpossum's Avatar
    Join Date
    Apr 2008
    Location
    Sydney/Australia
    Posts
    92
    I don't completely understand what your problem is, but if you are expecting the mouse to move "slowly" so you can see it travel from (x,y) to (x+dx, y+dy) then your got to do some intermediate stepping. i.e.: you have to provide a programming loop of some type to "visually see" this movement.

    As the fake pointer does move from its source point (x,y) to destination point (x+dx, y+dy) is that not exactly as you would expect it to do?

    This is certainly not a Kernel issue, more likely the driver implementation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •