Introduction: Arduino Stream Deck

I saw something from my trip to America that I thought was really cool and useful - The Stream Deck. It is basically shortcut keys for whatever app you want, great for multitasking. But the thing is it is way too expensive for me (100$) and it is not even available in my country. Still, I thought that it would be incredibly helpful to my work, so I decided to make one myself (which costed almost 10$ since the cheap Chinese Pro Micro) and share it so students and people on a budget could have one and make their life a bit simpler.

It is not in anyway even remotely as nice looking as the 100$ one but it functions just fine.

(The picture of my Deck was missing the Arduino Pro Micro since I dropped and broke it, the HC - 05 and Arduino Pro Mini was for another project so don't mind it).

Supplies

Arduino Pro Micro x 1

Buttons x 12 (Arduino Pro Micro can support 12 buttons max)

PCB size that would fit your prefered number of buttons

10k Ohm resistors

Step 1: The Buttons

To make the Arduino recognize when a button is pushed, we will need to wire the buttons as such:

Button pin 1 -> 10k resistor -> GND

Button pin 2 -> VCC

Button pin 4 -> One of the Digital Pins or Analog Pins of the Arduino

Repeat until you get your desired number of buttons

My PCB is stupidly messy so its really hard to track down when an error happen, you would want it to be more organized for easier troubleshooting.

Step 2: Programming the Arduino

Programming with the Pro Micro is a bit different from the other Arduinos and would require some additional steps. I would suggest the guides that helped me program the Pro Micro:

Sparkfun's official guide:

https://www.sparkfun.com/products/12640

An Instructables guide:

https://www.instructables.com/id/Set-up-and-Instal...

After you have successfully connected your Pro MIcro to your PC and can now program it, here is the code for my Project:

<p>#define KEY_RIGHT_SHIFT    0x85<br>#define KEY_RIGHT_ALT  0x86
#define KEY_RIGHT_GUI  0x87</p><p>#define KEY_UP_ARROW   0xDA
#define KEY_DOWN_ARROW 0xD9
#define KEY_LEFT_ARROW 0xD8
#define KEY_RIGHT_ARROW    0xD7
#define KEY_BACKSPACE  0xB2
#define KEY_TAB        0xB3
#define KEY_RETURN 0xB0
#define KEY_ESC        0xB1
#define KEY_INSERT 0xD1
#define KEY_DELETE 0xD4
#define KEY_PAGE_UP    0xD3
#define KEY_PAGE_DOWN  0xD6
#define KEY_HOME   0xD2
#define KEY_END        0xD5
#define KEY_CAPS_LOCK  0xC1
#define KEY_F1     0xC2
#define KEY_F2     0xC3
#define KEY_F3     0xC4
#define KEY_F4     0xC5
#define KEY_F5     0xC6
#define KEY_F6     0xC7
#define KEY_F7     0xC8
#define KEY_F8     0xC9
#define KEY_F9     0xCA
#define KEY_F10        0xCB
#define KEY_F11        0xCC
#define KEY_F12        0xCD
#define KEY_LEFT_CTRL  0x80
int buttonPin = 9;  
int buttonPin1 = 10;  
int buttonPin2 = 8;  
int buttonPin3 = 6; 
int buttonPin4 = 5;  </p><p>#include <Keyboard.h></p><p><keyboard.h>void setup()
{
  pinMode(buttonPin, INPUT);
  pinMode(buttonPin1, INPUT);
  pinMode(buttonPin2, INPUT);
  pinMode(buttonPin3, INPUT);
  pinMode(buttonPin4, INPUT);<br></keyboard.h></p><p>}</p><p>void loop()
{
  if (digitalRead(buttonPin) == 1)  //When button 1 is pressed
  {
    Keyboard.print("Print whatever phrase you want");  //</p><p>    delay(1000);
  }
  if (digitalRead(buttonPin1) == 1)  
  {
    Keyboard.print(""); //Whatever phrase you want
  }
  if (digitalRead(buttonPin2) == 1)  //This is a shortcut for changing my keyboard's language 
  {
    Keyboard.press(KEY_RIGHT_SHIFT);
    Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.release(KEY_LEFT_CTRL);
    Keyboard.release(KEY_RIGHT_SHIFT); 
    delay(1000);
  }
  if (digitalRead(buttonPin3) == 1)  // Open App with shortcut Ctrl + Alt + t
  {
    Keyboard.press(KEY_LEFT_ALT);
    Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.print('t');
    Keyboard.release(KEY_LEFT_ALT);
    Keyboard.release(KEY_LEFT_CTRL);
    delay(1000);
  }
  if (digitalRead(buttonPin4) == 1)  // Open App with shortcut Ctrl + Alt + p</p><p>
  {
    Keyboard.press(KEY_LEFT_ALT);
    Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.print('p');
    Keyboard.release(KEY_LEFT_ALT);
    Keyboard.release(KEY_LEFT_CTRL);
    delay(1000);
  }
}

If you want your Keyboard to press "Enter" key: Keyboard.write(10); (ACSII code for Enter key is 10)

The delay after each action is to prevent the key from being spammed.

Here is the code for download:

Step 3: Creating Shortcuts Keys for Apps

Step 1: Create shortcut for the Apps you want to use

Step 2: Right click and choose "Properties"

Step 3: Click on the "Shortcut" (shown on image) and pick the key you want

For example if you choose "p" the shortcut for the App will be Ctrl + Alt + p

Now you should be good to go

//You can see in the code
<p>if (digitalRead(buttonPin4) == 1)  // Open App with shortcut Ctrl + Alt + p</p><p>  {
    Keyboard.press(KEY_LEFT_ALT);
    Keyboard.press(KEY_LEFT_CTRL);
    Keyboard.print('p');
    Keyboard.release(KEY_LEFT_ALT);
    Keyboard.release(KEY_LEFT_CTRL);
    delay(1000);
  }</p>

Step 4: Suggestions

I got all 12 keys of the Arduino Pro Micro binded to something, here is what you could do:

- Game commands or Spams (CS:GO, TF2)

- Universal Hotkeys for Windows Media Player since my keyboard does not have the Media Function Keys

Here is the guide for the plugin:

https://www.howtogeek.com/howto/19356/add-global-h...

Download Link :

http://wmpkeys.sourceforge.net/

- Auto fill passwords: If you don't want to remember password on your browser, bind it to one of the buttons (it have risks but if you don't label the keys it should be fine, use :

<p>if (digitalRead(buttonPin) == 1)  //When button 1 is pressed<br>  {
    Keyboard.print("Password");  </p><p>    delay(1000);</p><p>Keyboard.write(10); // To press Enter</p><p> }</p>

Step 5: Expansions

You could try and add sensors and modules to the Pro Micro to have different ways of unlocking your PC.

Maybe an RFID reader, IR reader so that when you scan the card, or press your remote, the Pro mini could print out the password.

For example, you boot up your PC, instead of typing in your password, you scan the RFID key and the PC is unlocked.

I have been thinking about this for a while but never made it since my PCB is out of room for the scanner, but I hope you guys could make it a reality.