Commenting out the keyboard, mouse, and keymedia on a Teensy 2.0

Status
Not open for further replies.

Doon1

Member
Hi all,
My goal is to have the board show up in Windows as solely a game controller/joystick.
This was a fairly easy, straightforward process on the Teensy LC. I just commented out the relevant #define lines in the C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3\usb_desc.h file like so:
Code:
 //#define KEYBOARD_INTERFACE    2	// Keyboard
  //#define KEYBOARD_ENDPOINT     1
  //#define KEYBOARD_SIZE         8
  //#define KEYBOARD_INTERVAL     1

There is no usb_desc.h file in the usb_hid folder nor the teensy folder. When I comment the lines out of the usb_private.h file (where I changed the VID/PID) there is a cascade of errors. I've tried commenting out the resulting errors in the other files but new errors spring up with each subsequent round of error corrections.
What am I doing wrong?
Thanks
John
 
I've commented out all references to keyboard, mouse, and keymedia in the usb_private.h, usb_app.h, and usb.c files. No more errors but Windows still sees the board as a keyboard, mouse, and joystick. Where else should I look?
 
Microsoft loves their Windows Registry, so much that they cache USB device detection into and pull it from the registry and use that cached info, even when it's just been freshly read from the USB device.

You need to either increase the BCD version number or change the VID or PID, since those are the 3 fields they use to index it in the registry. Or run some sort of program to delete the cached data.
 
Hi Paul,
It's just not working for me. Old dog, new tricks...
Do you know if anyone has made a stand alone joystick usb_hid folder?
BTW: Why is the joystick is grouped with the keyboard and mouse?
 
Status
Not open for further replies.
Back
Top