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

Thread: Basic Teensy USB Keyboard Q

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    8

    Question Basic Teensy USB Keyboard Q

    Hi guys,

    I'm new to teensy and also electronics (including coding). I've recently purchased a Teensy++ 2.0 and am building a controller which will act as a replacement for keyboard shortcuts (for example, 1 momentary switch will result in Command + T being pushed simultaneously) which will hopefully make using my music production software (Ableton) a bit easier.

    I think I've got most of the idea on coding a Teensy for a USB keyboard, but there is one function which I'm not sure whether it is feasible/possible. What I need in this function, is when holding down a button, to have that button keep the command key (for example) activated until I release the button. So when the button is pushed down, command/option/shift/control is held active until the button is released. This is quite vital as I often need to hold down one of these keys whilst clicking and dragging with my mouse.

    I will be wanting to run this on a mac (if that makes any difference)

    Is this possible with a Teensy? I'm SURE it is, but this is all quite foreign to me so I thought I'd get some clarification/insight from knowledgable people.

    Cheers,

    Stephen

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    Yes, you can do this. Read this page and scroll down to The Micro Manager Way.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,581
    The mac's "command key" is MODIFIERKEY_GUI.

  4. #4
    Junior Member
    Join Date
    Oct 2013
    Posts
    8
    Great, thanks a lot. I'm still in the building stages before programming so hopefully once I get to the programming I don't get too lost.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,581
    Well, if you do need help, just post here. But please, read these guidelines. Composing your question with enough info saves everyone time, and it really increases your chances of getting a useful answer.

Tags for this Thread

Posting Permissions

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