DIY Keyboard Can Handle Up To Three Host Devices

A Planck-inspired 40% ortholinear keyboard.

Here’s a story that may be familiar: [der-b] is a Linux developer who is forced two carry two laptops — one for work with unavoidable work stuff on it, and one for software development. Unfortunately this leads to keyboard confusion between the two when one is connected to an external display.

In an attempt to overcome this, [der-b] designed a keyboard that can be connected to more than one device at a time, despite ultimately thinking that this will lead to another layer of confusion. The point was to try to make something as lightweight as possible, since carrying two laptops is already a struggle. As a bonus, this project was a learning experience for soldering SMD parts.

The keyboard itself is based on the Planck and uses an ATMega32u4 running QMK firmware, so that means it’s a 40% ortholinear with 48 keys total. [der-b] used low-profile Cherry MX switches to keep things sleek.

In order to switch between different host devices, [der-b] uses shortcuts as you’ll see in the short video after the break. This is accomplished with a FSUSB36 IC on the USB connections between the ATMega and the host.

[der-b] encountered a spate of issues while building this keyboard, which you can read all about in the blog post. We love to see transparency when it comes to your write-ups, especially when the projects become learning experiences. (Aren’t they all?) But if 48 keys aren’t nearly enough for you, check out this learning-experience keyboard build.

16 thoughts on “DIY Keyboard Can Handle Up To Three Host Devices

  1. I am not sure what would be easier: adding a new device into the equation (the switching keyboard) or just getting rid of one of the laptops. Pretty sure one of them can be left plugged to a wall adapter and Ethernet, then used remotely from the other one. Less things to carry, less wires to connect. The only possible problem is the lack of Internet connectivity (on train, plane, etc.)

    1. its easier to carry two laptops and a custom keyboard than it is to convince your employer (occasionally for good reasons) to let up on the app whitelisting for dev work, particularly if your employer is involved in the supply chain for federal/sovereign governments

      personally I use a Logitech K480

      1. Let me assure you that this might be virtually impossible. You can have all the “good reasons” you want, if the it security manager only knows how to make tick marks on his audit pamphlet or gets his clues from the last “IT-Manager Magazine”, nothing will change.

        Remember: It’s not the productivity (or, god forbid, employee motivation) that counts, it’s tick marks on a powerpoint slide. So you can show your other management besties who has the most tick marks!

        And most importantly: Everyone puts the new cover sheets on their TPS report!

        1. No, it’s keeping you from infecting the network with ransomware and making the evening news.
          If you can’t do your development work and be productive on a computer without access to data on the corp-net, then you’re doing something very wrong.
          Devs managed to learn programming at home/school on a computer without access to sensitive corp-net data, why would this suddenly be different at work?

          People bad at their jobs is an entirely unrelated issue.
          I know it’s unreasonable to expect you to understand IT when that isn’t your job, but you should realize it is a necessary job just as much as your job is necessary.

    2. yeah that’s exactly what i thought. i use ‘screen’ and vnc to keep a variety of separate environments at my fingertips. but i’m the kind of weirdo who already uses vnc to run a browser on my pc so that javascript doesn’t melt my laptop battery. (p.s., it’s awesome and everyone should use a remote browser)

  2. Multi-device keyboards/mice already exist. I use a Logitech MK850 for this. Your primary is connected via a dongle, the second and third are bluetooth connected. One press of a button and you’re controlling the different device

  3. It reads like a solution looking for a problem, so perfectly understandable ;) Perhaps in the next iteration have it use bluetooth (x2) and use the webcams in the laptop to determine at which one it’s looking and automagically switch the keyboard to that one.
    For me a macbook is the perfect middle ground between having to use a full Microsoft Office stack and dwelling in the land of Linux (OK, Unix). For the high security stuff we require our users to connect to VDI’s on our internal networks, which also works well from macbooks

    1. I have found the WSL stuff in Windows to work pretty well. Not as good as just running Linux, but if you are forced into a Windows only machine, WSL for development works for a lot of things. The WSLg stuff for the GUI apps is a little janky, but anything you need to do command line works well. My favorite setup is VS Code with the WSL remote development plugin, do all your git and such from within WSL, and run docker containers for development environments.

    1. Having a common ground is actually safer than not. Plus, if both devices are plugged into the same power source (i.e. the outlets in your walls), they are sharing a common ground anyway. Even if it is only the 2 prong variety of plug.

      1. Yeah, that was the thinking when I connected a programming dongle to device plugged into outlet. The lid of programmer fell on desk after about a second, making pretty big ruckus in fully silent office. Luckily hard disk survived, but ram and mainboard were toast.

  4. It’s a shame that laptops don’t already have a keyboard built into them so carrying an external keyboard wasn’t necessary. /s

    As someone who carries a work and personal laptop a lot (remote working from campus so I can work in between classes), this setup just seems unnecessary. If I need both systems up at the same time, I just have them sitting side by side and switch to whichever one I need to work on at the moment. My home setup is a little nicer with USB-C docking stations, external ultrawide monitor, mechanical keyboard, and a nice mouse. In that setup, I have my personal laptop on 1 side of my desk, work laptop on the other, the monitor has 2 inputs and gets swapped between systems as needed and I run Synergy to share my keyboard and mouse between the 2 systems. If Synergy wasn’t an option due to computer lockdown issues (not likely due to the nature of my job, but possible), then they keyboard and mouse are connected to both docks via a switchable USB hub. So, I could manually switch between the 2 if needed.

  5. Sounds like a KVM switch with a built-in keyboard, minus the “V” and the “M”.

    From a “ooh, I need this, I wish someone invented it before” it’s a nothingburger, because, well, there are multiple existing solutions to the problem at hand that are at least as good.

    From a “ooh, interesting exercise, thanks for the writeup and lessons-learned” it’s Hackaday.com-worthy. der-B, keep those posts coming.

  6. If Bluetooth is acceptable an easier path is to just build one of the many keyboards that ZMK supports. They generally store 5 Bluetooth saved devices, selectable with a key press. Many have a small OLED display that shows the connected device.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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