Mar 17, 2017 Replies: 4 In the attached .zip is a project that includes and demonstrates the use of three code modules. Keyboard.bas and Mouse.bas wrap the Arduino Keyboard and Mouse libraries using their own syntax. Reference: https://www.arduino.cc/en/Reference/MouseKeyboard There is also a Robo.bas module that uses the same syntax as the jAWTRobot library. This enables you to use the jAWTRobot library in B4J to test out code before pasting it into a B4R project. This library works only on boards that don't use a dedicated USB-Serial chip (like an FTDI chip or a CH340). The Leonardo and the Pro Micro are examples of boards where the main processor also provides USB functionality. These boards can make use of these code modules. Attachments KeyboardMouse.zip KeyboardMouse.zip 5.4 KB · Views: 883 Click to expand...
In the attached .zip is a project that includes and demonstrates the use of three code modules. Keyboard.bas and Mouse.bas wrap the Arduino Keyboard and Mouse libraries using their own syntax. Reference: https://www.arduino.cc/en/Reference/MouseKeyboard There is also a Robo.bas module that uses the same syntax as the jAWTRobot library. This enables you to use the jAWTRobot library in B4J to test out code before pasting it into a B4R project. This library works only on boards that don't use a dedicated USB-Serial chip (like an FTDI chip or a CH340). The Leonardo and the Pro Micro are examples of boards where the main processor also provides USB functionality. These boards can make use of these code modules.
M Mostez Well-Known Member Licensed User Longtime User Mar 23, 2017 #2 very good work, I was looking for this for long time, thanks
M Mostez Well-Known Member Licensed User Longtime User Mar 27, 2017 #3 Hello, I've tried the code and it works ok, just wanted to ask if it's possible to control character sending speed! because I use leonardo to emulate keyboard, the software on PC performs text check every time it receives a new character (textbox text changed event) I want to allow PC to finish text check before receiving next character. for now, I used delay inside for next loop, Code: For m = 0 To 9 Keyboard.Write2 (Arr(m)) Delay(10) Next
Hello, I've tried the code and it works ok, just wanted to ask if it's possible to control character sending speed! because I use leonardo to emulate keyboard, the software on PC performs text check every time it receives a new character (textbox text changed event) I want to allow PC to finish text check before receiving next character. for now, I used delay inside for next loop, Code: For m = 0 To 9 Keyboard.Write2 (Arr(m)) Delay(10) Next
R Roycefer Well-Known Member Licensed User Longtime User Mar 27, 2017 #4 If the Delay call doesn't interfere with other tasks like receiving Serial data then you can just stick with the Delay calls. If you want something that doesn't block, you can try using CallSubPlus or a Timer. But this is more about program flow than it is about the KeyboardMouse library. The library just sends the keystrokes at the speed at which the code is executed.
If the Delay call doesn't interfere with other tasks like receiving Serial data then you can just stick with the Delay calls. If you want something that doesn't block, you can try using CallSubPlus or a Timer. But this is more about program flow than it is about the KeyboardMouse library. The library just sends the keystrokes at the speed at which the code is executed.