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

Thread: teensyduino -> USB Type: Keyboard + serial

  1. #1
    Junior Member
    Join Date
    Oct 2016
    Posts
    5

    teensyduino -> USB Type: Keyboard + serial

    Currently I can select:
    - Keyboard
    - Serial + Keyboard + Mouse + Joystick

    I would like only "Serial + Keyboard".
    Is this somehow possible? Eventually bypassing teensyduino ide?

    Thanks,
    Karel.

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,728
    Quote Originally Posted by karelv View Post
    Currently I can select:
    - Keyboard
    - Serial + Keyboard + Mouse + Joystick

    I would like only "Serial + Keyboard".
    Is this somehow possible? Eventually bypassing teensyduino ide?

    Thanks,
    Karel.
    Yes it is possible, but since you asked, I fear it may be a little bit too demanding.
    So stick with the two add ons (Mouse + Joystick) they cost you nothing with respect to performance
    If you really wanted to try, have a look into usb_desc.(h/c) and usb_def.(h/c) in cores/teensy3
    Last edited by WMXZ; 08-23-2017 at 07:36 PM. Reason: corrected usb_def to usb_desc

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,539
    Yes, you can create custom combinations, but you need to edit usb_desc.h. See the comments in that file for instructions.

  4. #4
    Junior Member
    Join Date
    Oct 2016
    Posts
    5
    Thanks for info.
    I will definitely try it out.
    I have tried the keyboard message default example with the 4 types active, as WMXZ suggested, but my laptop's touchpad has not 'button' function anymore.
    Probably it is due to mouse or joystick...

    And of course I will share my results here ...

  5. #5
    Senior Member Jp3141's Avatar
    Join Date
    Nov 2012
    Posts
    485
    Can someone please post an example of how to do this ?

    I'm confused over the number of endpoints I need; where the unique number is for each interface (is it 'PRODUCT_ID') ? Is DEVICE_CLASS necessary ?

    Also, I'm running on MacOS Catalina and changes I make to usb_desc.h don't show up in the Tools..USB Type menu. (Edit -- it seems I also have to edit boards.txt). If I edit these files, won't they get overwritten the next time I update Teensyduino ? Can I replace usb_desc.h in my project directory ? or the new pieces of it in my .ino file ?

    I just want a USB type that has Serial + Keyboard (a simple keyboard; media keys not necessary).

    I want my application to work as a USB keyboard in an iPhone, (and also have a serial port, although that's not for the iPhone) but the iPhone seems to complain about the joystick also included in the USB device.
    Last edited by Jp3141; 07-26-2020 at 11:09 PM.

Posting Permissions

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