This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to program Left cilk mouse to PageDown?


If I want to use Keil uVision to write a program to make the mouse to left click to have page_down function. How can I do?
<Use Nordic nRf24LU1 two feature boards and the wireless mouse demo.>

Parents
  • Hi! After i changed the code, something funny happend.If i move the wireless mouse, a string of charactors come out! And what more interesting is that some of my keyboard keys have chaged thire functions. When i press "F" the "search rpage "will come out. If I press "E" or
    "M" the page of "computer drives" come out!
    I cannot use my keyboard any more. So i chage back the code and restart my PC. The keyboard became normal again. here are the code i chaged, i donnot know why it will affect my keyboard on PC which is not wireless one. And why only move the mouse ""abc"things came out,why PAGEDOWN never affect? I am so confused...here are the code i have changed

    switch(dev_type)
          {
            case WDP_MOUSE:
                                   // If mouse data
              if(length == APP_MOUSE_PL_LENGTH)
              {
    
                usb_send_packet
                (
                  &radio_data[APP_DATA],
                  USB_EP_KEYBOARD,
                  (APP_KEYBOARD_PL_LENGTH - APP_DATA)
                );
            switch(radio_data[APP_MOUSE_BUTTONS])
        {
          case 0x09:radio_data[APP_MOUSE_BUTTONS]=0x4E;
          default radio_data[APP_MOUSE_BUTTONS]=0;
        }
    
                       }
              break;
    


    the origianl code is

            switch(dev_type)
          {
            case WDP_MOUSE:
                                   // If mouse data
              if(length == APP_MOUSE_PL_LENGTH)
              {
    
                usb_send_packet
                (
                  &radio_data[APP_DATA],
                  USB_EP_MOUSE,
                  (APP_MOUSE_PL_LENGTH - APP_DATA)
                );
    
    
                       }
              break;
            case WDP_KEYBOARD:
                             // If keyboard data
              if(length == APP_KEYBOARD_PL_LENGTH)
              {
                usb_send_packet
                (
                  &radio_data[APP_DATA],
                  USB_EP_KEYBOARD,
                  (APP_KEYBOARD_PL_LENGTH - APP_DATA)
                );
              }
              break;
          }
            }
    

Reply
  • Hi! After i changed the code, something funny happend.If i move the wireless mouse, a string of charactors come out! And what more interesting is that some of my keyboard keys have chaged thire functions. When i press "F" the "search rpage "will come out. If I press "E" or
    "M" the page of "computer drives" come out!
    I cannot use my keyboard any more. So i chage back the code and restart my PC. The keyboard became normal again. here are the code i chaged, i donnot know why it will affect my keyboard on PC which is not wireless one. And why only move the mouse ""abc"things came out,why PAGEDOWN never affect? I am so confused...here are the code i have changed

    switch(dev_type)
          {
            case WDP_MOUSE:
                                   // If mouse data
              if(length == APP_MOUSE_PL_LENGTH)
              {
    
                usb_send_packet
                (
                  &radio_data[APP_DATA],
                  USB_EP_KEYBOARD,
                  (APP_KEYBOARD_PL_LENGTH - APP_DATA)
                );
            switch(radio_data[APP_MOUSE_BUTTONS])
        {
          case 0x09:radio_data[APP_MOUSE_BUTTONS]=0x4E;
          default radio_data[APP_MOUSE_BUTTONS]=0;
        }
    
                       }
              break;
    


    the origianl code is

            switch(dev_type)
          {
            case WDP_MOUSE:
                                   // If mouse data
              if(length == APP_MOUSE_PL_LENGTH)
              {
    
                usb_send_packet
                (
                  &radio_data[APP_DATA],
                  USB_EP_MOUSE,
                  (APP_MOUSE_PL_LENGTH - APP_DATA)
                );
    
    
                       }
              break;
            case WDP_KEYBOARD:
                             // If keyboard data
              if(length == APP_KEYBOARD_PL_LENGTH)
              {
                usb_send_packet
                (
                  &radio_data[APP_DATA],
                  USB_EP_KEYBOARD,
                  (APP_KEYBOARD_PL_LENGTH - APP_DATA)
                );
              }
              break;
          }
            }
    

Children