About six years ago, some engineers at Razer got the idea to put a mechanical keyboard into a laptop. The goal was to bring the satisfying clickiness of classic desktop keyboards–and Razer’s

That’s partly because laptops are getting thinner, but it’s also because they’re slimming down in other dimensions. Over the past few years, the thick bezels that once surrounded laptop displays have given way to screens that almost run from edge to edge. When those bezels shrink, the rest of the laptop has to get smaller as well, which in turn leaves less room around the keyboard for other components, like the battery or cooling systems.

“That very thin form factor that we had is now getting pushed in the X and Y, so every square millimeter matters,” says Kevin Turchin, an engineering technologist director at Dell.

This demand for all-screen laptops–along with the gradual elimination of thick ports like Ethernet, VGA, and even the familiar USB-A–has pushed the traditional membrane and scissor switch keyboard mechanism to its breaking point. Make them any thinner, and the keys become too squishy. Even worse, the keyboard itself doesn’t last as long.

“I think we’ve reached the point of diminishing returns on a rubber dome design, where you can only get so much thinner,” Turchin says. “And if we drove it too thin, we’d just really compromise that user experience.”

Hence the much-maligned butterfly mechanism–so named for the way it lifts up each key with a pair of slim butterfly-like wings–that’s made its way into recent MacBooks.

Dell is dabbling in butterfly mechanisms as well, though its approach is a bit different from Apple’s. While MacBook keys still have a collapsible metal dome at the center, Dell’s “MagLev” keyboard dispenses with domes entirely. Instead, each key has a magnet sitting on it, and on top of that is a metal butterfly mechanism, whose wings hold up the keycap above. When the user presses a key, the wings invert, lifting the base of the butterfly mechanism off the magnet and detecting the keystroke. As the user’s finger lifts back up, the magnet reengages, and the butterfly wings help push the keycap back up.