1.4 DP L1KVM switch DIY remote

Thank you for explanation, that makes sense, i was wondering about these situations when you want to switch systems, but don’t want to switch audio etc. and buttons to help do that would be very useful. But i think i’ll start with two buttons and then see if i really need those additional buttons, i want my remote to contain only a single row of buttons and fixed next to my sit/stand desk controls, there’s only about 6cm of horizontal space.

I’ll start building my remote as soon as i’ll receive teensy and/or arduino and i hope my kvm will arrive sooner rather than later as i’m buying it through a “middleman” company (cheaper and much easier to deal with customs duties).

Post updates on your progress, i’m very interested on how it’s going for you. 4 systems is a lot, i bet your battle station is amazing.

Also are you planning to mount your remote (like i do), o make it a “stream deck” style? And what buttons are you planning to use? I was thinking about keyboard style keys, but i’m afraid they will be too easy to press by accident, as i’m planing to mount them next do my desk controls in front/right of the table.

1 Like

Yeah, my desk doesn’t really have a good place to mount it; I’m thinking the opposite side to my sit-stand controls because I’ve got a desk with a curved cutout. (never making that mistake again)

1 desktop, 2 thunderbolt docks, 1 VM running on the desktop. you can see it when it was 3 machines if you click the featured topic in my user card.

Cable management is such a nightmare on this one. nam flashbacks

I’d like to mount it under my desk, similar to you are, but I suppose the “stream deck” option could be another design.

As far as buttons go, I’m trying to find some nice 2ish mm actuation distance buttons but not mechanical keys. Unfortunately, they’re either expensive in small quantities or not high quality. I really need to reach out to my friend who designs hardware. Of course, I’m just at the software prototyping stage right now. I’ve got some Pi Picos on order, so I’m excited to try those. It seems like the toolchain is more vim-compatible than teensy. (which is an absolute nightmare to not use in the arduino IDE)

As for the accidental press, you could set it up so you have to hold it down for 2 seconds, or something like that, in the code so an accidental bump doesn’t re-arrange your windows.

Ideally, I’d do the same. pulls out calipers I’ve got the uplift desk stand-uper with the presets. The buttons are 10mm square, so my initial plans for 16mm buttons are definitely going to be too large. I think I’m going to have to rethink at least that part. I’ve got these 1mm actuation buttons (I’ll add a pic in a moment) but I’m not entirely sure how I’ll mount them because I think they’re designed to be mounted to a PCB. I’m also not a big fan of the pastel colors the button caps come in lol


(forgive the poor quality. My old phone’s camera is damaged and Google still hasn’t shipped the pixel 6 I ordered middle of last month)

I see we are doing the same thing, this is me at the moment (arduino i use does not support HID):

and yeah those buttons you use have to be soldered to pcb or glued with a glue gun :)) and they are a little bit wobbly, but a case which would hold them from the sides would definitely help.

I’m in search of a nice looking push buttons, ones i have are decent, but far from perfect, at the moment i’m leaning towards the one with red cap (in photo), if i won’t be able to find better ones, a little bit of force is needed to press it and almost impossible to press them by accident. Pressing and holding to switch is an option too, but i’d rather find a button with the firmness i want.

Nice setup you have there, one day i’m going to change my desk to a wider one and was interested in ones with a cut out, but i never sat at one, why is it bad? it looks comfortable. And how did you mount kvm under your desk? its not obvious from just looking at the photo you posted, did you screw it to the table or used velcro or double side tape?

1 Like

Saw those on mouser, didn’t like the style, but it does look cleanest of the ones you have. Maybe I’m too picky.

3m command strips. I can de-velcro it if I need to, and its not permanent.

Its very comfortable, but it reduces usable space and my racing wheel won’t stay on the beveled lip.

I’ve taken to using my arm wrests instead of the desk edge, and that helps with my posture anyways.


I’ve found an STL for the tactile buttons that you and I have. I’ll attempt printing it this weekend. If the prints come out good (I would much prefer a gray button on black housing or something to that effect) I’ll be ordering a few more of those buttons and I’ll figure out a way to mount them.

So I just test printed the cap, and while the dimensions are a tiny bit off, I do like it, almost more than the cast ones.

Sorry again for potato cam.

Hey, how’s your remote going? Yesterday I built mine, tested keyboard commands with a simple script, works like a charm. Today i’m planing on finishing writing the script. My l1kvm is finally in my country, but still in delivery center, but I hope i’ll receive it till new years eve. Bought all new Club 3d cables, so excited to finishing up this project :relieved: :grin:

Here’s some pictures, i’m using buttons from AliExpress, box was “designed” by me on Fusion 360 (man it was not easy for such a noob like me, but youtube saved me), for arduino i’m using A-Star 32U4 Micro it’s so tiny





2 Likes

Definitely coming along.

I have the software done, but the printer is giving me trouble. Here’s the CAD I have so far.

Part A:

Part B:

There will be a third one that mounts behind Part B and houses the Pi Pico. I think I want to rough print the first two to see how they come out and test clearances before I waste filament on a third piece that probably won’t even fit correctly. I’m using 0.05mm clearances, which is probably too tight. I think it probably needs more like 0.15mm.

And for the record, I know this is probably over-engineered.


So I’ve been using the breadboarded system for about a week now, and it works great, only downside is that I need to snake my way past the wires on the breadboard to get to the buttons haha

1 Like

I’ve got to say, that’s a very clean design. For someone who’s new to CAD, it looks very solid.

FWIW, I’ve only been working with CAD software on and off for about a year. After a while, you learn to think in terms of the type of operations CAD allows you to do and it gets much easier.

What filament did you use for that print?

Took me like a week of few hours a day and multiple remakes till I got where i am :smiley: but yeah, need to change how i think in terms of CAD and not some photoshop/paint and practice practice practice.

I’m using PETG Prusa Galaxy Black

From your CAD design i’m guessing that your buttons will be “living” on the desk? Are you planing on sticking something made from rubber to make it not so slippery?

1 Like

Its going to mount under the desk, just like yours, I just haven’t made the mounting holes yet. I should really plan those out haha.

Oh, excellent. That explains the flecks. I’ll have to give that a go some day, but I don’t print much petg.

Finally received my l1kvm switch, sadly it came with uk/ca power plug (don’t know if it was my middleman who made a mistake, o l1), but already bought an adapter. Now printing a holder to mount it under the table and tomorrow i’ll try to finish this project or a day after tomorrow, because you’ll never know what happens on those new year eves :DD

What library are you using to send the key strokes? I’m trying to do it with arduino Keyboard library, sending Keyboard.write(…), it “sends” those keys if i plug it to usb3 port (but does not change pc, just types ctrl ctrl 1 for example), but nothing happens when i plug it to hid usb port :confused:

I’m using tinyusb as distributed with the PicoSDK.

Give me a bit to clean up the code and I’ll publish a repo.

The problem with the keyboard libraries, which I also ran into, is that you need to make sure its in bios compatibility mode, and that’s a bit tricky on some libs.

I did some research on arduino pro micro, it works as a keyboard, but some more magic is needed to make it work on a HID port, it seems like kvm switches first sees arduino as serial device and stops checking for HID :frowning: i’ll switch to teensy board, but my remotes 3d model file is empty :frowning: so i’ll have to use my master fusion 360 skills again :DD

one more problem i’ve encountered is usb-c to DisplayPort cables are not loved by kvm switches, switching from pc to mac which uses such cables often end up in black screen (more like most of the time). Maybe its the cable, but i think i’m using a good one from club 3d :frowning: already ordered caldigit usb-c pro dock, it has 2 display ports and connects through thunderbolt or usb-c. I have a belkin dock but displaylink software and two 4k monitors makes it impossible to use because of HUDGE lag, but at least it worked all the time while switching form pc to mac.

further more i noticed, that sometimes my logitech mx keys mini get confused if i’m on mac os or windows, as it has one key for cmd on mac and same key acts as alt on windows, and options key on mac and start key on windows. After switching for example form windows to mac’os, logitech keyboard still thinks that it has start key when it should be option, but i’ll do more testing later.

Edit: Also Logitech Unifying receiver works like a charm on hid usb port, but logitech bolt receiver works only on usb3 port.

So I did it!

I dropped the idea to re-solder l1kvm switch button and went Teensy board way. I think it’s way better as the kvm switch has only one button (I thought those lights are buttons, but they are not) and with custom remote you can have as many buttons as there are hot keys for the switch or more. I have tried Arduino Pro Micro, but did not manage to make it work as a HID device (it works as a keyboard, but more magic is needed to make it work as hid device). I used two buttons from AliExpress and printed a case for them and Teensy board running usb-a to micro usb cable from remote to l1kvm switch.

Here’s my code for teensy keyboard:

const int pc1BtnPin = 22;
const int pc2BtnPin = 21;

const int MODIFIER_KEY = MODIFIERKEY_CTRL;
const int PC_1_KEY = 1;
const int PC_2_KEY = 2;

int currentPC = 0;

int cycles = 0;
int cyclesLimit = 100;


void setup() {
  pinMode(pc1BtnPin, INPUT);
  pinMode(pc2BtnPin, INPUT);

  Keyboard.begin();
  Serial.begin(9600); 
}


void loop() {
  if (digitalRead(pc1BtnPin) == HIGH && currentPC != 1) {
    switchPC(1);
  } else if (digitalRead(pc2BtnPin) == HIGH && currentPC != 2) {
    switchPC(2);
  }

  cycles++;
  resetCycles();
  
  delay(100);
}

void switchPC(int no) {

  Keyboard.press(MODIFIER_KEY);
  Keyboard.releaseAll();
  delay(100);

  Keyboard.press(MODIFIER_KEY);
  Keyboard.releaseAll();
  delay(100);

  switch (no) {
    case 1:
      
      Keyboard.write('1');
      break;
      
    case 2:
      Keyboard.write('2');
      break;
  }
  
  currentPC = no;
  cycles = 0;

  Serial.print("PC: "); 
  Serial.println(no);
}

void resetCycles() {
  if (cycles > cyclesLimit) {
    cycles = 0;
    currentPC = 0;
  }
}

My setup is my personal PC and work MacBook Pro 2020 with two 4k Dell displays (U4320Q and U2718Q) PC is connected straight to l1kvm switch using display port cables and USB Type-A to Type-C cable. MacBook is connected to CalDigit USB-C Pro Dock using 2m thunderbolt cable and display port cables from dock to l1kvm switch and another usb-c cable from MacBook straight to l1kvm switch. All display port cables are Club3D as recommended. I have tried to connect usb-c cable from dock to kvm switch and have only one cable going to MacBook but I ran into problems - all usb devices randomly disconnects and never connects back unless I reconnect thunderbolt cable to MacBook, then it starts working again but after some random time disconnects again. Connecting USB-C cable straight from MacBook to l1kvm switch solved the problem.

I also tried to connect MacBook using one Club3D display port to usb-c cable and CableMatters USB-C dongle which has display port connection, but ran into problems when switching - pc side works great, but switching to mac only sometimes turned on displays, sometimes it shows mac desktop for a second and goes black, sometimes only 1 display connected though dongle worked, but most of the time displays went straight to standby mode. Also usb did not work at all (cablematters dongle usb type-a to kvm switch type c). I have belkin usb-c dock, it worked but display link sucks, felt like using 30Hz, so i decided to try thunderbolt dock and it worked great.

I also have Logitech unifying receiver connected to kvm switch hid port - works great, Logi Bolt receiver connected to first usb3 port - works great and usb3 hub to second usb3 port on l1kvm which has Logitech Brio 4k camera, Stream Deck Mini, Mayflower ARC MK2 dac and Audioengine A2+ speakers connected to it. All devices work great, only problem is with Logitech MX Keys Mini - sometimes when I switch for example from Windows PC to MacBook, keyboard still thinks that the layout is windows and Start button works as CMD and vice versa - CMD works as Start. It fixes itself after some time and sometimes stays like that :)) i’ll do more debugging as I’ll use my setup.

Thanks to everyone for your input and help from this thread and others and @wendell for a great KVM switch!

Some more photos




3 Likes

Wendell should probably add a port for a remote on these. Would be a good feature

I thought the same when I was looking for a kvm switch, but in a way there already are 4 ports for remote - usb hid ports. And if remotes would be added then question is how many buttons should they contain - one, two or for every computer or as many as there are hot keys.

Okay, so I had to take a leave of absence for a family thing, but during that time I was able to finalize the hardware design (turns out, babysitting covid patients is a great time to do CAD work) and print off the last of the parts.

I felt the need to switch from plastic tabs to M3 screws, since I couldn’t get the tabs to snap in just right. and was too worried about breaking them after a couple installs. I found that the M3 screws work just fine, but I might release a version of the front panel that supports M3 heat-set inserts. I did self-tapping since I didn’t have access to heat-sets during the construction. They’ve since been ordered.

Here’s the repo:

Images

1 Like

Congrats! thats a nice looking button box, i like the color scheme. Much more code compared to Teensy board, but the price of pi pico justifies the amount of code for sure!

A question about usb follow - what about keyboard, if it won’t follow it means that you would not be able to do anything (unless you plug a new keyboard to switched system) just view the screens is that the only use case for usb not to follow?

The thing about this code is that it’s a much lower level library than what Teensy provides, which is specifically why I chose it, so it’ll be BIOS compatible and work with the KVM.

USB follow is only for the USB 3.0 ports on the KVM. I wasn’t entirely clear on that, sorry.

I think the idea is that you can keep your USB storage/audio devices plugged into a single computer (through the KVM) for communication and file transfer, while switching to another machine for whatever reason.

I don’t personally use it, but I wanted an engineering challenge.

Thanks, I don’t know how I feel about the button colors, but I designed some 3d printed buttons, so I could make my own if the need strikes me. Plus I just ordered 10 spools of filament from Proto Pasta, so I’m going to be making gucci prints for a while.


Doing the math, here’s my cost breakdown:

Filament, assuming $20 spool of eSUN PLA+ (my go to for non-exotic prints):

  • $0.60 for the housings
  • $0.08 for all 5 buttons if needed.

Electronics:

  • $8 wire
  • $4 Pi Pico
  • $6 button switches
  • $6 M3x20mm BHCS

All in: $24.68 assuming printed button caps.

Of course, I printed probably 3-4 iterations of this so I could get the dimensions correct and revising the attachment method and whatnot, so I think I probably closer to $30 on this project.