Mouse programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reorxer
    New Member
    • Mar 2008
    • 2

    Mouse programming

    Hello everyone!
    Me and my partner are working on some project, which involves the MSP430 MCU.
    Our task is to make the computer identify the board as a mouse, so that we can control the mouse by debugging the board in a certain way. (the debugging is done in C, and the mouse source code is needed in C, so that's why we post here :) )

    We think that we should imitate the signals that a mouse sends to the computer's processor when it operates.

    Is there a chance you can provide us with some mouse source codes, or share another way of doing this with us?

    Thanks, Alex
  • DaemonCoder
    New Member
    • Mar 2008
    • 43

    #2
    I think that the best solution is a mouse driver. That is, make a program that recieves signals from the keyboard and then sends them bask to the os as the mouse signals... Basically you would be writing the windows equivilant of MouseKeys.... This would in effect take a section of the keyboard and make it function only as the mouse. (might as well use the number pad on the right, egh...)

    7 8 9
    4 5 6
    1 2 3

    8, 2, 4, 6 would then be up, down, left, and right respectively.

    I thnk this could be done using a _cscanf_s_ for a scancode of the key and then convert it to the specific operating system mouse movement code. I hope this helps.

    Comment

    • Reorxer
      New Member
      • Mar 2008
      • 2

      #3
      Thanks for the reply!
      Hmm yes, I see what you're saying, basically this is what we need to do, only instead the keypad we'll be operating the mouse cursor with the external device.
      I thnk this could be done using a _cscanf_s_ for a scancode of the key and then convert it to the specific operating system mouse movement code. I hope this helps.
      This is exactly what we're looking for, the operating system mouse movement code (we're using the windows OS, so there's a bit of an issue with that)
      If anyone did something similar, we'd appreciate any help on this front :)

      Comment

      Working...