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

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

  1. #1

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

    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\us b_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

  2. #2
    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?

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,538
    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.

  4. #4
    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?

Posting Permissions

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