Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: USB mouse/touchscreen with Teensy3.2 for Android

  1. #1
    Junior Member
    Join Date
    Dec 2017
    Posts
    6

    USB mouse/touchscreen with Teensy3.2 for Android

    Hello,
    here is a brief description of the setup:
    7" capacitive touch screen with a FT5316 controller talking to Teensy via i2c, the function returns coordinates from the FT5316 as x=0~800, y=0~480, so far I'm not trying multitouch, but the controller is capable of it, just single touch.

    I use arduino ide 1.8.5 with teensyduino 1.40
    I've tried all possible combinations of USB types selected in the IDE, and I've tried the absolute mouse approach and the touchscreen class, couldn't get the touchscreen class to work with Android (tried 6.0 and 7.0) at all, it sort of did work with Windows7, but it was registering single clicks even though I was holding my finger down, and generally not behaving like I expected it to at all, setting it up as a mouse has gotten me the furthest so far.

    this code lets me draw stuff in Windows paint like I expect it to, but once plugged in into the Android device - nothing happens, at best the the cursor pops up in the middle of the screen, but clicks are not registered, nor there is any "movement", meaning - clicking on different parts of the touch screen gives the same result - nothing happens. The method of calculating XX/YY values to be used for Mouse.moveTo is crude, but this was just for general testing, I didn't try to refine it since it doesn't do what I need to on the Android device.
    Code:
    #include <SPI.h>
    #include "Wire.h"
    #include "FT5xx6.h"
    
    #define CTP_INT           2    // touch data ready for read from touch panel
    FT5xx6 cmt = FT5xx6(CTP_INT);
    
    word prev_coordinates[10]; // 5 pairs of x and y
    byte nr_of_touches = 0;
    
    int isLeftPressed = 0;
    int didMouseMove = 0;
    
    
    void setup() {
      cmt.init(true);
      Mouse.begin();
    }
    
    void loop() {
        byte registers[FT5xx6_NUMBER_OF_REGISTERS];
        word coordinates[10];
            
          if (cmt.touched()){
            cmt.getRegisterInfo(registers);
            nr_of_touches = cmt.getTouchPositions(coordinates, registers);
            //singleTouchOutput(coordinates);
            int doImoveMouse = 1;
            word x = coordinates[0];
            word y = coordinates[1];
            word XX = 12.5*x ;
            word YY = 20.8*y ;
                
            if (y > 2000 || y <= 0 || x > 2000 || x <= 0 ){
              doImoveMouse = 0;
            }
              
            if (doImoveMouse == 1){
              Mouse.moveTo(XX, YY);
            } 
                
            if (registers[2] == 1 && isLeftPressed == 0){
              Mouse.press(MOUSE_LEFT);
              isLeftPressed = 1;
            }
            
          } 
    
          if (registers[2] == 0 && isLeftPressed == 1){
            Mouse.release(MOUSE_LEFT);
            isLeftPressed = 0;
          }
          delay(25);
    }
    So I was googling around for solution, and red these topics and tried everything that was in there:
    https://forum.pjrc.com/threads/32331...support-needed
    https://forum.pjrc.com/threads/28943...also-on-Linux)
    I also tried the older IDE with the older teensyduino and edited usb descriptor files by mr.Elmue, but couldn't get it to work like it should with the android device. https://www.codeproject.com/Articles...-emulator-with

    Then I tried to figure out the usb descriptors, but the official text is basically unreadable for an amateur like me, but I opened up the usb_desc.c from teensy/avr/cores/teensy3/ and had a look around, and as soon as I recompiled my sketch with these changes, the thing started exhibiting some life when plugged into the Android device:
    Code:
    #ifdef MOUSE_INTERFACE
    // Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension
    static uint8_t mouse_report_desc[] = {
           // 0x05, 0x01,                     // Usage Page (Generic Desktop)  <---- I commented out these 2 lines
           // 0x09, 0x02,                     // Usage (Mouse)                         <---- and added 2 first lines from the touch multitouch descriptor
            0x05, 0x0D,                     // Usage Page (Digitizer)
            0x09, 0x04,                     // Usage (Touch Screen)
    Android device started to actually react to me touching the touchscreen, it is registering a click and a movement, but the movement is relative, and I tried editing few other lines in that same mouse descriptor section that had some meaningful comment, but nothing seemed to result is anything resembling an absolute coordinate system, at best nothing happened, or the android just wouldn't respond to recompiled sketch with additional modifications to descriptor file at all.

    Am I doing something really wrong or there are some known problems that I wasn't able to google solutions for?
    Last edited by jz11; 12-29-2017 at 09:12 PM.

  2. #2
    Junior Member
    Join Date
    Dec 2017
    Posts
    6
    So I fiddled around a bit more with Mr.Elmues work, and his touch descriptors #1 and #3 didn't work, #1 is detected by Android as mouse, some events can be observed via shell>getevent, but movement doesn't work, #3 is not detected at all, no events.
    But by modifying the #2 I got so far as to move to absolute coordinates, mouse.press(mouse_left) works, but press-hold-drag doesn't work, and mouse cursor is being showed.
    Under windows though, absolute movement doesn't work, but press/release still works.
    Hopefully someone more knowledgeable can have a look at this and at least hint to potential fixes.
    Code:
        #elif TOUCH_DEVICE == 1 // single touch device (product ID: 0x048C + 0x048D)
    	// ================================================================================
    
            0x05, 0x0d,                    // USAGE_PAGE (Digitizer)
            //0x09, 0x02,                    // USAGE (Pen)
    	0x09, 0x04,                    // USAGE (Touch Screen)
            0xa1, 0x01,                    // COLLECTION (Application)
    		
    		// declare a finger collection
            0x09, 0x20,                    //   Usage (Stylus)
            0xA1, 0x00,                    //   Collection (Physical)
    
            // Declare a finger touch (finger up/down)
            0x09, 0x42,                    //     Usage (Tip Switch)
    	0x09, 0x32,                    //     USAGE (In Range)
            0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
            0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
            0x75, 0x01,                    //     REPORT_SIZE (1)
            0x95, 0x02,                    //     REPORT_COUNT (2)
            0x81, 0x02,                    //     INPUT (Data,Var,Abs)
    
            // Declare the remaining 6 bits of the first data byte as constant -> the driver will ignore them
            0x75, 0x01,                    //     REPORT_SIZE (1)
            0x95, 0x06,                    //     REPORT_COUNT (6)
            0x81, 0x01,                    //     INPUT (Cnst,Ary,Abs)
    
            // Define absolute X and Y coordinates of 16 bit each (percent values multiplied with 100)
            // http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
            // Chapter 16.2 says: "In the Stylus collection a Pointer physical collection will contain the axes reported by the stylus."
            0x05, 0x01,                    //     Usage Page (Generic Desktop)
            0x09, 0x01,                    //     Usage (Pointer)
            0xA1, 0x00,                    //     Collection (Physical)
            0x09, 0x30,                    //        Usage (X)
            0x09, 0x31,                    //        Usage (Y)
            0x16, 0x00, 0x00,              //        Logical Minimum (0)
            0x26, 0x10, 0x27,              //        Logical Maximum (10000)
            0x36, 0x00, 0x00,              //        Physical Minimum (0)
            0x46, 0x10, 0x27,              //        Physical Maximum (10000)
            0x66, 0x00, 0x00,              //        UNIT (None)
            0x75, 0x10,                    //        Report Size (16),
            0x95, 0x02,                    //        Report Count (2),
            0x81, 0x02,                    //        Input (Data,Var,Abs)
            0xc0,                          //     END_COLLECTION
    
            0xc0,                          //   END_COLLECTION
            0xc0                           // END_COLLECTION
    
            // With this declaration a data packet must be sent as:
            // byte 1   -> "touch" state          (bit 0 = pen up/down, bit 1 = In Range)
            // byte 2,3 -> absolute X coordinate  (0...10000)
            // byte 4,5 -> absolute Y coordinate  (0...10000)

  3. #3
    Senior Member
    Join Date
    May 2015
    Posts
    105
    > I also tried the older IDE with the older teensyduino and edited usb descriptor files by mr.Elmue, but couldn't get it to work like it should with the android

    I never tried Android but people reported on Codeproject that it works on Android.

    A user wrote:
    > I applied these examples in Android and I found Android supports multi-touch only.

    It seems you did not read the comments section.

    __________________________

    > but press-hold-drag doesn't work,

    This may be because your code is wrong.
    If move works alone and press works alone then drag must also work!
    Drag is only a combination of press, move and release.

    ___________________________

    > Under windows though, absolute movement doesn't work,

    Wrong.
    Under Windows ALL my descriptors work perfectly.

    My article says:
    > I tested my project on Windows XP, 7, 8, 10 and on Linux (Suse, Ubuntu, Knoppix) where it works seamlessly.

    If it does not work you, your controlling code is wrong.

    _________________________

    The use of the variable doImoveMouse does not make any sense.
    You set this variable to 1 even if you do NOT move the finger.
    You don't even check if the coordinates have changed since the last call to loop().
    And the variable didMouseMove is never used.
    This looks to me like a quite sloppy code.

    Every 25 ms you send data to the poor Android device that is flooded with always the same coordinates.

    To see what your code is exactly doing I recommend strongly to print debug output with Serial.println() and check in the Serial monitor the data that you are exactly sending.

  4. #4
    Junior Member
    Join Date
    Dec 2017
    Posts
    6
    Hi Elmue, don't think of my posts like a criticism of your work, the Android device I tried your exact code on resulted on with descriptors #1 and #2 being detected as a mouse, I see some activity with getevent command in shell, but it doesn't register absolute movement or clicks not being processed, something like that, #3 is being detected as touchscreen and there is absolutely nothing in getevent when I touch the sensor panel. #2 was the closest (detected as mouse) to what I thought of being correct, and with some tweaks in the modified #2 descriptor I posted above, it started working, sort of.
    The drag-and-drop is odd, when I longpress on an icon on the desktop, and drag my finger on the sensor to where the delete/uninstall icons are, I can delete/uninstall that app, but the animation of the icon being dragged doesn't show, also in navigation software, when I use real usb mouse, click and hold somewhere on the map, then move the mouse, I can move the map around, but when I do the same thing with the code above and touchscreen, then all I get is cursor being moved on the map, but the map is not "picked up" and moved.
    This leads me to think that there are peculiarities regarding how the data sent is being interpreted by the Android device driver, that is compiled with the kernel there, and probably the people from codeproject comments reporting your descriptors working with their android had different mouse driver, or maybe some additional touch screen driver that I simply don't have in the build that is in my device.
    And the modified descriptor #2 that worked on my Android doesn't work on windows indeed, well, it being detected, and clicks are being registered, but not the absolute movement events, so in paint I can touch the screen, drag the finger, and nothing happens, but when I touch the screen and move my regular mouse with the other hand, then then I can see that the left-press was indeed registered.

    doImoveMouse was there to catch a bug with the ft5xx6 driver, where sometimes on the touch or release the coordinates are being interpreted wrong and I get some really large numbers, so I simply wanted to eliminate those events, it is all it is there for.

    Also, when I do the getevent on the Android, and touch and hold the screen, the androids getevent doesn't show repeated flooding of the same movement coordinates, the event log stays still till I actually move my finger or release it, I'm not arguing that the code above is not flooding the android with repeated data, so I didn't really think of that as a problem before, but now that you mentioned it, I'll implement a filter to not send anything over the usb, if the state on the touch screen hasn't changed. My sketch wasn't perfect, it was only the start to get things happen somewhat, and now that they do, I can start polishing it, that was my line of thought.

    thanks a lot for the previous work you've done, it has helped a lot to get some understanding of how the usb descriptors work.
    There was another good site I found, with a link to a descriptor build and validation tool - http://eleccelerator.com/tutorial-ab...t-descriptors/ - this is what helped me to get some understanding of how to actually read them, because the info on the usb.org is like chinese to me...
    Last edited by jz11; 12-30-2017 at 03:06 PM.

  5. #5
    Senior Member
    Join Date
    May 2015
    Posts
    105
    Hello jz11

    In your last answer you explain the problem much better.
    Intead of just saying "Drag does not work" you explain the problem more detailed.
    In this case I also suppose that the driver is not very well programmed and does not work with that specific descriptor.
    Very weird.

    I suppose the reason is simply that the descriptor is a pen.
    And with a pen you draw lines but with a pen you never do drag operations.
    Therfore you must use the USAGE(Finger) instead of USAGE(Pen).
    But it will not be enough to simply replace Pen with Finger.
    Sadly USB is much more complex, documentation and examples are sparse and drivers have lots of bugs.


    You are only talking about descriptors #1, #2, #3.
    Did you ever try descriptor #4 which has been reported to work an Android?


    If I understand you correctly it still does not work 100% yet?


    In this case the fastest way to get this to work would be if you could buy any hardware USB touchscreen that works on Android correctly and just copy it's descriptor. If you get it working 100% finally you could send me the descriptor for Android and I publish it on Codeproject because a lot of people are asking for that.


    But it would teoretically also be possible that the touchscreen support in Android is simply buggy and you cannot do anything to get it work.
    (The built-in touchscreen is surely not USB)
    You can try to file a bugreport posting your descriptor and explaining the problem. Maybe any Android developer answers you.


    > and probably the people from codeproject comments reporting your descriptors working with their android had different mouse driver.

    You could try to get an answer from them.

  6. #6
    Junior Member
    Join Date
    Dec 2017
    Posts
    6
    I think I'm starting to understand where the problem is, I took another look at the Android device and the getevent output
    here is a link describing it - http://newandroidbook.com/Book/Input.html?r

    If I read this correctly, then when I plug the programmed teensy into the android device, it is being detected as 3 devices:
    event5, event6 and event7

    and when I touch the screen, the commands from the teensy don't seem to originate from one device, but rather 2, which is confusing the android os into thinking that clicks/holds etc come from one device, and absolute movement coordinates come from a different device - hence the presses and releases sort of work, the movement works, but android doesn't think that the individual press and consequent movement originated at one device, so there is some confusion regarding the drag-and-drop operation.
    Code:
    add device 6: /dev/input/event5
      name:     "Teensyduino Keyboard/Mouse/Touchscreen"
    could not get driver version for /dev/input/mouse2, Not a typewriter
    add device 7: /dev/input/event6
      name:     "Teensyduino Keyboard/Mouse/Touchscreen"
    could not get driver version for /dev/input/mouse3, Not a typewriter
    add device 8: /dev/input/event7
      name:     "Teensyduino Keyboard/Mouse/Touchscreen"
    /dev/input/event6: EV_MSC       MSC_SCAN             00090001
    /dev/input/event7: EV_KEY       BTN_DIGI               DOWN
    /dev/input/event6: EV_KEY       BTN_MOUSE            DOWN
    /dev/input/event7: EV_ABS       ABS_X             00000ad7
    /dev/input/event6: EV_SYN       SYN_REPORT           00000000
    /dev/input/event7: EV_ABS       ABS_Y             000018f1
    /dev/input/event7: EV_SYN       SYN_REPORT           00000000
    /dev/input/event7: EV_ABS       ABS_X             00000af0
    /dev/input/event7: EV_ABS       ABS_Y             00001906
    /dev/input/event7: EV_SYN       SYN_REPORT           00000000
    /dev/input/event7: EV_ABS       ABS_X             00000ad7
    /dev/input/event7: EV_ABS       ABS_Y             0000191b
    /dev/input/event7: EV_SYN       SYN_REPORT           00000000
    /dev/input/event7: EV_ABS       ABS_X             00000ae3
    /dev/input/event7: EV_ABS       ABS_Y             00001906
    /dev/input/event7: EV_SYN       SYN_REPORT           00000000
    /dev/input/event6: EV_MSC       MSC_SCAN             00090001
    /dev/input/event6: EV_KEY       BTN_MOUSE            UP
    /dev/input/event6: EV_SYN       SYN_REPORT           00000000
    when I plug in just a regular usb mouse and do the same thing, then all the events originate from the same device, and the drag-and-drop works like it should
    here is the getevent report:
    Code:
    /dev/input/event4: EV_MSC       MSC_SCAN             00090001
    /dev/input/event4: EV_KEY       BTN_MOUSE            DOWN
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    /dev/input/event4: EV_REL       REL_Y               00000001
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    /dev/input/event4: EV_REL       REL_Y               00000001
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    /dev/input/event4: EV_REL       REL_Y               00000001
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    /dev/input/event4: EV_REL       REL_X               00000001
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    /dev/input/event4: EV_REL       REL_Y               00000001
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    /dev/input/event4: EV_MSC       MSC_SCAN             00090001
    /dev/input/event4: EV_KEY       BTN_MOUSE            UP
    /dev/input/event4: EV_SYN       SYN_REPORT           00000000
    this leads me to think that something is wrong with the usb code, it is not just a descriptor problem, the thing is that since I started learning writing code from arduino ide, which is sort of higher level code, it is quite difficult for me to understand the lower level usb related code, but now that the issue is sort of narrowed down somewhat, I'll have a longer look at it and try to find out why some Mouse. commands go to one device, and some to another...

  7. #7
    Junior Member
    Join Date
    Dec 2017
    Posts
    6
    And a thought regarding the USB Type:
    it might be not a bad thing to be able to select from the base code which USB option to include in the device, for instance, this project of mine will just a touch screen, but the drop down menu in the Arduino IDE for Teensy doesn't allow to select just one single touch screen, keyboard, mouse etc is together with it, and might compound the issue...

  8. #8
    Senior Member
    Join Date
    May 2015
    Posts
    105
    You are surprised that there are 3 USB devices?
    The title of my article says:

    A USB HID Keyboard, Mouse, Touchscreen emulator with Teensy

    Obvioulsy these are 3 USB devices.

    _______________________

    > and when I touch the screen, the commands from the teensy don't seem to originate from one device,

    Then there is something wrong in your code.
    This is surely the reason that drag does not work.

    After looking your first post I see now that you use:
    Mouse.press(MOUSE_LEFT);
    and
    Mouse.moveTo()

    This is definitely wrong.
    As the name already says: MOUSE_LEFT is a mouse button.
    You send the press event to the mouse and the move event to the touch screen.


    My article explaines this even with examples:

    The command Mouse.move() simulates RELATIVE movements with the mouse device.
    The command Mouse.moveTo() simulates ABSOLUTE movements with the touchscreen device.

    If you mix the devices a drag operation will not work.

    To do a drag/drop operation use:

    moveTo() to define the absolute coordinate (drag = start position) where the finger goes down
    and then
    set_buttons(0, 0, 0, 1) to define the finger of the TOUCHSCREEN is down now
    and then
    moveTo() to drag the finger to the specified absolute coordinate (drop = end position)
    and then
    set_buttons(0, 0, 0, 0) to release the finger.

    Have a look into the sourcecode (usb_mouse.h and usb_mouse.c) to understand this.

    I don't know how Android behaves but it may be necessary to do the drag movement in multiple steps.
    For example:

    moveTo(10,10);
    delay(5);
    moveTo(20,20);
    delay(5);
    moveTo(30,30);
    delay(5);

    etc..

    _______________________

    > it might be not a bad thing to be able to select from the base code which USB option to include in the device, for instance, this project of mine will just a touch screen,

    This is completely correct.
    I also complained to Paul that this is not very flexible.
    I tried to change that but it would be so EXTREMELY complicated that it would mean to rewrite everything and I gave up.

    If there is a keyboard device that you don't use it will make no harm.
    So this is not really a problem.

    But to change that I would have to change several header files from Paul's Teensyduino library
    This would be a huge work and as long as Paul does not integrate these changes into his Teensydiuno library it would be a work in vain.


    The reason why Paul's library defines the USB devices in form of C compiler switches is that this is the only way to store the USB descriptors precompiled in the EEPROM of the Teensy. But it would be possible to design a more flexible code that builds the USB descriptors on the fly when the host computer asks for them. It would be possible to define in the sketch which devices to expose to the computer. But this would mean to rewrite everything and this work must be done by Paul. The drawback would be that the code becomes longer and more EEPROM is used for code.
    Last edited by Elmue; 01-04-2018 at 03:43 PM.

  9. #9
    Senior Member
    Join Date
    May 2015
    Posts
    105
    Well. You don't reply anmore.
    This shows several things:

    SUMMARY:
    - Your problem had nothing to with Android.
    - You made a severe programming error in your sketch.
    - The reason for this error was that you did not read my article thoroughly.
    Last edited by Elmue; 01-08-2018 at 01:17 PM.

  10. #10
    Junior Member
    Join Date
    Dec 2017
    Posts
    6
    I didn't have free time to develop this further yet, but I'm going to get this working eventually and post the end result

    couple things I did check, mouse.set_buttons didn't fix the issue of click events and movement events origin, I was going back and forth testing different versions of android ide and teensyduino, and found that (afair) the latest one had some really weird behavior, where mouse.press(left_button) resulted as 'up' or 'lift' event, and mouse.release as 'down' - basically the opposite of what it should be, the very same sketch with mouse.set_button(1,0,0,0) did work as expected and result in the 'down' on the android device, and 0,0,0,0 was a 'up'.

    I did dig up an old project, where I had atmega32u4 as a "mouse" with resistive touch screen attached to it, the code originated from a Russian carpc forum site, but the usb portion seems to be some version of teensy usb code that has been modified, I'll attach the source code so anyone interested can have a look - when this hex is written to the 32u4 it is acting like a usb mouse, drag and drop works like it should, events originate from the same device etc, the only "problem" is that the android is showing the mouse cursor wherever you touch, which is a bit ugly.

    here is the latest sketch I was using with the teensy, one note regarding the code, it is silent (no messages on the usb) if I don't touch the screen, when I do, the interrupt is being activated by the touchscreen controller and teensy begins to read registers, as long as I touch it and don't move my finger, the usb event log stays still, so there is no flooding going on as far as I can tell, I put that one safeguard there just in case, but I think it might be turned later into a filter, where small movements would be filtered out, to reduce the traffic on the usb.

    Code:
    /***************************************************************************************
     Connections:
    
     ER-TPC070-6     teensy3.2
    
     1                           GND
     2               18          SDA
     3               19          SCL
     4                           RESET
     5               2           INT
     6                           NC
     7               3.3V        VDD
     8                           VDD
     9                           GND
     10              GND         GND
    
    ****************************************************************************************/
    #include <SPI.h>
    #include "Wire.h"
    #include "FT5xx6.h"
    
    #define CTP_INT           2    // touch data ready for read from touch panel
    FT5xx6 cmt = FT5xx6(CTP_INT);
    
    byte nr_of_touches = 0;
    int isLeftPressed = 0;
    word  previous_x = 0,
          previous_y = 0;
          
    void setup() {
      cmt.init(true);
      Mouse.begin();
    }
    
    void loop() {
        byte registers[FT5xx6_NUMBER_OF_REGISTERS];
        word coordinates[10];
            
          if (cmt.touched()){
            cmt.getRegisterInfo(registers);
            nr_of_touches = cmt.getTouchPositions(coordinates, registers);
            
            int doImoveMouse = 1;
            
            word x = coordinates[0];
            word y = coordinates[1];
    
            if (x == previous_x && y == previous_y){ // prevent repeated coordinates being sent over the usb
              doImoveMouse = 0;
            }
                
            if (y > 2000 || y <= 0 || x > 2000 || x <= 0 ){
              doImoveMouse = 0;
            }
              
            if (doImoveMouse == 1){
              word XX = 12.5*x ;
              word YY = 20.8*y ;
              Mouse.moveTo(XX, YY);
            } 
                
            if (registers[2] == 1 && isLeftPressed == 0){  // report the 'down' only when the touch screen controller has successfully registered a touch event, and do that only once
              Mouse.press(MOUSE_LEFT); // tested with Mouse.set_buttons(1,0,0,0) as well, result was the same, 'click' event reported from a different usb device, not the same as Mouse.moveTo messages come from
              isLeftPressed = 1;
            }
    
            
            
          } 
    
          if (registers[2] == 0 && isLeftPressed == 1){
            Mouse.release(MOUSE_LEFT);
            isLeftPressed = 0;
          }
          
          delay(25);
    }
    Attached Files Attached Files

  11. #11
    Senior Member
    Join Date
    May 2015
    Posts
    105
    Russian project ???
    You are searching at the completely wrong place.

    You are incredible!
    It becomes obvious that you did neiter read my article nor did you read my answer from second january here.

    YOUR CODE IS STILL WRONG !

    > didn't fix the issue of click events and movement events origin

    OBVIOUSLY !
    Because your code has STILL the same bug.


    > Mouse.press(MOUSE_LEFT);
    > // tested with Mouse.set_buttons(1,0,0,0)

    BOTH are wrong !

    Is it really so difficult to read THOROUGHLY what I wrote ????

    Just fix your bug and it will work.


    P.D.
    A programmer who is not able to read a documentation is not a programmer.

Posting Permissions

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