Hardware USB keyboard and mouse emulator

What is a hardware keyboard and mouse emulator for? Many people often have to do routine work and the thought arises of somehow automating this process so that the computer itself clicks in the windows and presses the keyboard buttons while you are leisurely drinking coffee or doing other things. Software emulation is not always suitable for this purpose, and in such cases a hardware emulator is required.



What is a hardware keyboard and mouse emulator? Usually it is a small device connected to a computer via a USB port and which it identifies as a keyboard and mouse. In addition, there is a channel for transmitting control commands (usually through the same USB port) through which the device receives commands to press or release a keyboard button or move the mouse and click it with buttons. Such a device can be various microcontrollers that include a USB communication module and are stitched with a special program for a keyboard and mouse emulator.

The Blue Pill debug board works well for this purpose.







It has everything you need - an STM32F103C8T6 microcontroller with a USB interface connected to the microUSB connector and all the necessary harness for the microcontroller. You just need to flash the microcontroller with the emulator program. Also for this purpose, other debugging boards and devices with an STM32F103C8T6 microcontroller, for example, an ST-Link debugger in a flash drive form factor, are suitable. The use of ready-made components allows almost everyone to make this emulator.



The capabilities of the emulator depend on the firmware and the offered ones are as follows:



  • Emulation of an extended keyboard containing 230 buttons.
  • Simultaneous pressing of up to 14 keyboard buttons excluding modifier buttons.
  • Emulation of an additional multimedia keyboard.
  • Emulation of a standard mouse with 8 buttons, a wheel and the ability to position the cursor within coordinates 0 - 32000.
  • Up to 500 emulations per second (2 ms for each emulation).


Video of the emulator. It first shows the code that sends commands to the hardware emulator, and then the code is executed and the emulator typed the word Emulator 200 times.





Instructions for the firmware of the emulator, examples, documentation, firmware, etc. can be found on the website emulator.ucoz.org



All Articles