Author Topic: Simulate key press using USB HID  (Read 14189 times)

theoracle39

  • Member
  • ***
  • Posts: 8
Simulate key press using USB HID
« on: July 19, 2011, 11:07:27 am »
I am using a PIC 18F4550 to detect when a switch is pressed and then transmit the data via USB to a program written in VB.NET.  What I want to do is send data through USB to simulate a key press without a program running on the PC.  I realize that I could easily send a signal from the PIC to the program on the PC and use VB.NET to trigger a key press event, but I want to do it without using VB.NET.  Is there a way to do this?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simulate key press using USB HID
« Reply #1 on: July 19, 2011, 12:11:44 pm »
Make the PIC a USB HID-class system keyboard. Microchip has example firmware. Write code to send the desired keypress code to the PC.

Jan