Make the spaetzle batter: In a mixing bowl, combine the flour and salt. In a separate bowl, whisk together the eggs and milk. Pour the wet ingredients into the flour mixture and mix until you have a smooth, thick batter.
Prepare the spaetzle: Bring a large pot of salted water to a boil. Using a spaetzle maker or a colander, push small portions of batter through into the boiling water. Cook for about 2-3 minutes or until the spaetzle float to the surface.
Drain the spaetzle: Once cooked, use a slotted spoon to transfer the spaetzle to a colander and drain well. You can rinse them briefly with cold water to stop the cooking process.
Sauté the onions: While the spaetzle is boiling, melt the butter in a large skillet over medium heat. Add the sliced onions and cook until they are golden brown and caramelized, about 10-15 minutes.
Combine ingredients: Reduce the heat to low and add the spaetzle to the skillet with the onions. Sprinkle half of the cheese over the pasta and stir until melted. Season with black pepper to taste.
Garnish and serve: Transfer the Käsespätzle to a serving dish, sprinkle the remaining cheese on top, and add more sautéed onions for garnish. You can also add a sprinkle of chives or parsley for a fresh touch.