Categories
Guides

Poor man’s Stream deck

How to add a keyboard to your system, and make it work as a button box or macro keyboard

I started streaming in October, and have been enjoying it a lot, especially after slowly figuring out what it all is about. I also realized why Stream Decks are so popular. Sitting in a sim rig, I believe that Stream Decks are even more useful than for shooter games because we don’t always have the keyboard at hand. I very quickly started feeling that I was short of buttons.

The problems

  • You never have enough buttons. I already have an F1 style rim and a side panel, that originally is sold for Farming Simulators, but work just fine for racing too. I use a lot of them for voice chat and radio control, but also for in car functions, as well as pit strategies, black box assignments etc.
  • OBS only recognizes keyboard inputs and does not register button presses from the rim, panel or button boxes.
  • I found out that using sound effects and showing explanatory videos or video teasers works really well on my stream, but I need to trigger them on the fly with simple button presses
  • You can’t add an exptra keyboard, and have it register as a button presses from a controller

The idea

I originally wanted to connect a second keyboard to my PC and somehow register that as a controller or button box. The way extra keyboard really work is that they simply work as you’d expect a keyboard to work. I didn’t want that though, because a key press on the extra keyboard, should not register as the same key press on the regular keyboard. I was hopping that when I press “A” on my extra keyboard, it wouldn’t register as an “A” but as a unique button press similar to the ones I have on my F1 rim, or the side panel. Unfortunately, there were two problems with my hopes. This is not possible, and even if it had been, OBS would not have registered them, because it only accepts button presses and shortcut combinations from an actual keyboard – no controller buttons.

Luckily, some gamers have had the same issues as me, almost 20 years ago and found a solution that I could use.

The Solution

Notice all the keyboards from this Flight Sim in the early 00s.
FOTO: x-plane.org
MFD by Thrustmaster
FOTO: Thrustmaster.com

It turns out that Flight Simulators use a lot more buttons that I would ever need. They have now come up with clever MFD solutions, that actually are very clever, but 20 years back, sim pilots had the same problems as me. They simply didn’t have enough buttons to simulate all the buttons that a real life airplane would have. The solution was a combination of using macros and key shortcuts to trigger commands. A macro is a scripted combination of commands. It could be something like “go to this page, press tab twice and then press space once”. They could then assign a trigger to that command, by creating a shortcuts. Shortcuts are not new to us. You probably know a few already, like Ctrl + C and Ctrl + V. So instead of having the button “A” trigger a command, you can use Crtl + Shift + A instead. This would not get in the way of you using the keyboard for typing. It caused a new problem though. Remembering all the combinations, and actually physically pressing them with one hand.

HID Macros

HID Macros is an oldschool program but works fantastically well. It identifies each keyboard or other controller and assigns unique key identities to each button. It then gives you the option to assign macros to each button. I am no programmer. I actually have no clue about programming, so I am sure that HID Macro offers many more functions that what I have used, but I won’t venture into the possibilities it offers. Instead, I’ll explain how I used it to trigger sound effects, videos and scenes in my OBS. I have even set buttons to start and stop my stream.

Install the HID macro program, and make sure to run it as Administrator. This program will need to run whenever you want your shortcuts to work. For me, this is more or less always, so i have set it to launch when Windows loads.

What we’ll be using here, is the scripted macro for each button. So the basic idea is that when you press “A” on the new keyboard, it will trigger Ctrl + Shift + Alt + A on your regular keyboard. Then you can go into OBS and define that as a shortcut for the action that you need triggered. This could be to play a sound effect, a video, change scene, start recording or anything else really.

  1. Click on New..
  2. Name your new macro something that you’ll remember.
  3. Press the Scan button and then press the button on the new keyboard that you want to assign the new macro to.
  4. Note what letter that is.
  5. Go to the script tab, and aaste the script bellow into the code and replace “YOURKEY” with the key you want it to trigger.
  6. Press Compile and then Save
HIDMacros.SendKeysSlow "+^%{YOURKEY}",50

What you have just done, is create a macro that says “When you press a key on your new keyboard, Windows should translate this into Ctrl + Shift + Alt + YOURKEY” on your regular keyboard. Eg. you can press your 5 button on the new keyboard, and have it trigger Ctrl + Shift + Alt + N on the regular keyboard.

Now we need to go to OBS to define what that shortcut should do.

  1. In OBS go to Settings
  2. Go to Hotkeys
  3. Find the function that you want to trigger (for example start streaming)
  4. In the hotkey field, press Ctrl + Shift + Alt + N (or the button you need)
  5. Press save or aply

What you have just done is when you press 5 on your new keyboard, it will start your stream. This is hugely practical and opens up for a whole new way of managing your stream or any software shortcuts really. The way it works is that it won’t register as pressing 5 on your regular keyboard, but as pressing Ctrl + Shift + Alt + N. This in turn triggers the hotkey combination that you have set to start your stream. If one keyboard is not enough, you can connect many keyboards and add more complicated shortcuts for even more functionality.

Tips

  • To understand the script, or to make your own, “+” means Shift, ^ means Ctrl and % is Alt. ~ is Enter
  • Use parenthesis to modify a group of letters. +abc shifts only a but +(abc) shifts all three letters.
  • When you need to specify a button in the script, like space, backspace or an F1-F12 button, you need to write it out. Use {} around these words, like {CAPSLOCK}. Available words are BKSP, BS, BACKSPACE, BREAK, CAPSLOCK, CLEAR, DEL, DELETE, DOWN, END, ENTER, ESC, ESCAPE, F1 to F16 (yes F13 to F16 exist even though they are not on keyboards), HELP, HOME, INS, LEFT, NUMLOCK, PGDN, PGUP, PRTSC, RIGHT, SCROLLLOCK, TAB and UP.
  • You can follow the keyname with a space and a number to send a sepcifik number of times you want that button pressed. For example {ESC 3} would press the escape button 3 times.
  • Use a spreadsheet to keep track of letters assigned to functions and buttons, while you are batch creating them and assigning them to functions. It can get a bit hairy if you do too many at one time.
  • Get free sound effects from ZapSplat. It is even worth the low monthly fee, compared to how much value you’re getting!

Finishing Touches

This part, I would expect many of you would be better than me at solving. I initially used the letters of the new keyboard to remember what they did. So I’d use 1 through 5 to select scenes 1, 2, 3, 4 or 5. This gave me two issues though. Scenes were easy to remember, but i kept forgetting what each letter meant. Also i don’t have enough space on my rig to have the keyboard horizontally so i needed to mound it sideways and that made it hard to read the letters. I realized though that I don’t really need the actual values of the buttons, so I could simply just add icons to them.

I simply made a grid of squares on Photoshop, filled them with colors depending on functions (yellow for scenes, blue for sound effects and pink for functions) and added an icon in each grid that I somehow could relate to the button. There are many places you can get icons. I used icons from Noun Project, but you can also use FlatIcon or you can even make your own!

I used a regular white glue (the kind kids eat in school), to stick the grids on the keyboard. This is strong enough to keep the paper in place when I press the buttons, but will allow you to peel it off, without messing up your keyboard too much. To protect the “stickers” from wear, I added a few layers of top coat nail polish. This is the stuff that you put on your nails to protect them from wear. I am sure that there are other options but this seemed to be the most affordable solution without having to buy in bulk.

Alternatives

Streamdeck is the obvious alternative for this, because it has been designed specifically for steaming. You can use it for racing too though, and add commands for you car, pit etc. It has the option to add sub-folders, so that the same physical button can trigger different actions. This gives many options, and is very flexible, for me it was expensive and still would require me to press more buttons instead of just one, for my sound effects.

Macro keyboards are also an option and cover your problems with having to stick paper on to your buttons. They look a lot nicer, but are also very expensive.

This has been a project that has been in my mind for some time, but never really seemed to solve itself. It ended somewhere else than i had expected it, but I am very happy with the way it works, and the process of getting it to work. I still think that would preference a large stream deck though. I can clearly see advantages of using this solution compared to a stream deck, but stream decks have in built features that seem to be great for streaming and racing too

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.